lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 02 Sep 2011 09:34:20 +1000
From:	Ryan Mallon <rmallon@...il.com>
To:	Mark Salter <msalter@...hat.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/24] fix default __strnlen_user macro

On 02/09/11 05:23, Mark Salter wrote:
> 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.
>

Agreed. Add a note to the comment that callers should check for a return 
value > n.

~Ryan


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ