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]
Message-Id: <20080529121942.b6d768e7.akpm@linux-foundation.org>
Date:	Thu, 29 May 2008 12:19:42 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Howells <dhowells@...hat.com>
Cc:	torvalds@...ux-foundation.org, bunk@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] Werror: Fix casting wrong size integer to pointer

On Thu, 29 May 2008 19:17:26 +0100 David Howells <dhowells@...hat.com> wrote:

> --- a/drivers/message/i2o/i2o_config.c
> +++ b/drivers/message/i2o/i2o_config.c
> @@ -886,7 +886,7 @@ static int i2o_cfg_passthru(unsigned long arg)
>  			    flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) {
>  				// TODO 64bit fix
>  				if (copy_from_user
> -				    (p, (void __user *)sg[i].addr_bus,
> +				    (p, (void __user *)(unsigned long)sg[i].addr_bus,
>  				     sg_size)) {
>  					printk(KERN_DEBUG
>  					       "%s: Could not copy SG buf %d FROM user\n",
> @@ -942,7 +942,7 @@ static int i2o_cfg_passthru(unsigned long arg)
>  				sg_size = sg[j].flag_count & 0xffffff;
>  				// TODO 64bit fix
>  				if (copy_to_user
> -				    ((void __user *)sg[j].addr_bus, sg_list[j],
> +				    ((void __user *)(unsigned long)sg[j].addr_bus, sg_list[j],
>  				     sg_size)) {
>  					printk(KERN_WARNING
>  					       "%s: Could not copy %p TO user %x\n",

yup, what Linus said.  This one's been irritating me for years, and I
got close to tempting Markus into fixing it before he departed the
scene.  But it remains, as a little "might be busted on 64 bit" reminder.
--
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