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]
Message-ID: <20140512231604.GT28907@ld-irv-0074>
Date:	Mon, 12 May 2014 16:16:04 -0700
From:	Brian Norris <computersforpeace@...il.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: Fix warning in access_ok() parameter passing

On Thu, May 01, 2014 at 08:40:54PM +0200, Geert Uytterhoeven wrote:
> On m68k, where access_ok() doesn't cast the address parameter:
> 
> drivers/mtd/mtdchar.c: In function 'mtdchar_write_ioctl':
> drivers/mtd/mtdchar.c:575:4: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [enabled by default]
> arch/m68k/include/asm/uaccess_mm.h:17:90: note: expected 'const void *' but argument is of type '__u64'
> drivers/mtd/mtdchar.c:576:4: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [enabled by default]
> arch/m68k/include/asm/uaccess_mm.h:17:90: note: expected 'const void *' but argument is of type '__u64'
> 
> The address parameter of access_ok() is really a userspace pointer.
> On most architectures, access_ok() is a macro that casts the address
> parameter, hiding issues in its users.
> 
> Move around and use the existing usr_data and usr_oob temporary variables
> to kill the warnings. Add a few "consts", and make more use of the
> temporaries while we're at it.
> 
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>

Pushed to l2-mtd.git. Thanks!

Brian
--
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