"> AR# 53926: PetaLinux v12.12 - Kernel API: strncpy_from_user() incorrect behavior on Microblaze

UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 53926

PetaLinux v12.12 - Kernel API: strncpy_from_user() incorrect behavior on Microblaze

Description

When compiling a third-party Kernel module against Petalinux for Microblaze, there seems to be a deviation of the behavior of function strncpy_from_user() to the description of the Kernel API According Kernel.org: http://www.kernel.org/doc/htmldocs/kernel-api/API-strncpy-from-user.html
The function strncpy_from_user() should return the length of the string (not including the trailing NULL). However, the length of the string including the trailing NULL is returned.
How can I fix this?

Solution

This is a known issue that has been fixed in the latest version of the PetaLinux. However, if you believe you are seeing the issue, please patchthe uaccess_old.S into your environment.

Attachments

Associated Attachments

Name File Size File Type
AR53926.zip 2 KB ZIP
AR# 53926
Date Created 01/23/2013
Last Updated 03/02/2013
Status Active
Type General Article
Tools
  • EDK - 14.4