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: <alpine.LFD.2.00.0910282055330.9323@eddie.linux-mips.org>
Date:	Wed, 28 Oct 2009 21:05:08 +0000 (GMT)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	Andi Kleen <andi@...stfloor.org>
cc:	Dave Airlie <airlied@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	DRI Development Mailing List 
	<dri-devel@...ts.sourceforge.net>, Arnd Bergmann <arnd@...db.de>,
	David Miller <davem@...emloft.net>
Subject: Re: is avoiding compat ioctls possible?

On Wed, 28 Oct 2009, Andi Kleen wrote:

> > I'm just amazed that compat_ioctl should be required for all new code.
> > 
> > DrNick on irc suggested just doing:
> > if (is_compat_task()) ptr &= 0x00000000FFFFFFFF;
> 
> Such hacks often have problems on BE.

 And then some platforms (i.e. MIPS) require sign-extension rather than 
zero-extension, that is:

if (is_compat_task()) ptr = ((ptr & 0xffffffff) ^ 0x80000000) - 0x80000000;

if doing this explicitly (with compat stuff hardware will do the right 
thing automagically).

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