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:	Wed, 11 Aug 2010 21:30:13 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>,
	linux-kernel@...r.kernel.org, gcosta@...hat.com, lenb@...nel.org,
	mingo@...e.hu, tglx@...utronix.de, ying.huang@...el.com,
	Linux Arch Mailing List <linux-arch@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: +
 drivers-acpi-apei-erst-dbgc-get_useru64-doesnt-work-on-i386.patch added to
 -mm tree

On Wed, 11 Aug 2010 21:22:51 -0700 "H. Peter Anvin" <hpa@...or.com> wrote:

> [Adding Linux and linux-arch.  The context is that get_user/put_user
> don't work on 64 bit values on i386.]
> 
> On 08/11/2010 05:33 PM, Andrew Morton wrote:
> > 
> > Anyway, this should be fixed in x86 core, I suspect.
> 
> After looking at it -- and suffering a bad case of d__j__ vu -- I'm
> reluctant to change it, as get/put_user are specified to work only on
> locally atomic data:
> 
>  * This macro copies a single simple variable from user space to kernel
>  * space.  It supports simple types like char and int, but not larger
>  * data types like structures or arrays.
> 
> Given that u64 is not a simple type on 32 bits, it would appear that the
> behavior is intentional.
> 
> A user might very well find that supporting u64 and/or structure types
> would be beneficial, but it would a) be a semantic change, and b) would
> introduce the possibility of a partially completed transfer.  That is a
> semantic change to the interface.  However, it may very well be nicer to
> have a generally available get_user()/put_user() for the cases which
> would just kick an EFAULT up the stack when they fail anyway.
> 
> If there is consensus for making get_user/put_user a general interface,
> I'm more than willing to do the x86 changes, but I don't want to do them
> a) unilaterally and b) for 2.6.36.  This seems like .37 material at this
> point.

It occurs so rarely that it's probably not worth bothering about, IMO.

However we should arrange for it to fail at compile time rather than
at link time, please.



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