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] [day] [month] [year] [list]
Date:	Tue, 12 May 2009 14:30:05 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Nick Piggin <npiggin@...e.de>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch] mm: madvise correct return code

On Tue, May 12, 2009 at 1:21 PM, Nick Piggin <npiggin@...e.de> wrote:
> This is a pretty obscure case, but it doesn't hurt to follow standards
> if they're there. I can't imagine any real program relying on a 0 range
> madvise call with invalid behaviour *not* failing... We have this in
> SLES11 FWIW, and no problems reported.
> --


But it was not consistent with the man page... we should fix it.

>
> mm: madvise correct return code
>
> The posix_madvise() function succeeds (and does nothing) when called with
> parameters (NULL, 0, -1); according to LSB tests, it should fail with EINVAL
> because -1 is not a valid flag.
>
> When called with a valid address and size, it correctly fails.
>
> So perform an initial check for valid flags first.
>
> Reported-by: Jiri Dluhos <jdluhos@...ell.com>
> Signed-off-by: Nick Piggin <npiggin@...e.de>

Reviewed-and-Tested-by: WANG Cong <xiyou.wangcong@...il.com>
--
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