[lkml]   [2011]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 01/24] fix default __strnlen_user macro
On Thu, 2011-09-01 at 11:54 +1000, Ryan Mallon wrote:
> It should either be changed as I suggested, or the comment in uaccess.h
> should be updated to reflect the actual behaviour of the function
> (stating that it returns n + 1 in the case where n is reached). Either
> way, its probably worth doing a quick check through the arch specific
> versions to see what their behaviour really is. It looks like there are
> potentially some subtle bugs at the callsites.

I think commenting it in uaccess.h is the only sane way to go. Changing
the semantics means changing all the arch-specific versions, most of
which are asm code and changing most, if not all callsites. All of the
arch-specific versions I looked at include the NULL count.


 \ /
  Last update: 2011-09-01 21:25    [W:0.068 / U:0.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site