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, 9 Mar 2016 10:22:50 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Benjamin LaHaise <bcrl@...ck.org>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Russell King <rmk@....linux.org.uk>,
	Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86_32: add support for 64 bit __get_user()

On 03/09/2016 09:50 AM, Benjamin LaHaise wrote:
> On Wed, Mar 09, 2016 at 09:36:30AM -0800, H. Peter Anvin wrote:
>> On March 9, 2016 9:22:25 AM PST, Benjamin LaHaise <bcrl@...ck.org> wrote:
>>> The existing __get_user() implementation does not support fetching
>>> 64 bit values on 32 bit x86.  Implement this in a way that does not 
>>> generate any incorrect warnings as cautioned by Russell King.  Test 
>>> code available at http://www.kvack.org/~bcrl/x86_32-get_user.tar .  
> ...
>> Weird.  I could swear we had already fixed this a few years ago.
> 
> That surprised me as well, but Russell raised the fact that the approaches 
> previously tried on 32 bit architectures had caused various incorrect 
> compiler warnings for certain obscure cases -- see the code in test_module.c 
> in that URL that Russell provided to demonstrate the problem across all the 
> corner cases.

Oh, I see... I implemented it for put but not get... weird.  You may
want to look at the __inttype() macro defined earlier in this file; it
might be useful.

I presume you have already seen:

>> fs/select.c:710: Error: operand type mismatch for `movq'
>> fs/select.c:714: Error: incorrect register `%cx' used with `q' suffix
   fs/select.c:711: Error: operand type mismatch for `movq'
>> fs/select.c:715: Error: incorrect register `%si' used with `q' suffix
--
   fs/aio.c: Assembler messages:
>> fs/aio.c:1606: Error: operand type mismatch for `movq'
>> fs/aio.c:1610: Error: incorrect register `%si' used with `q' suffix

... which implies it used 16-bit registers for 64-bit operations when
compiling for 64 bits.

	-hpa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ