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, 28 Oct 2009 11:27:04 +0100
From:	Arnd Bergmann <arndbergmann@...glemail.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	David Miller <davem@...emloft.net>, airlied@...il.com,
	linux-kernel@...r.kernel.org, dri-devel@...ts.sourceforge.net
Subject: Re: is avoiding compat ioctls possible?

On Wednesday 28 October 2009, Andi Kleen wrote:
> > > However some architectures need special operations on compat pointers
> > > (s390 iirc), but if you don't support those it might be reasonable
> > > to not support that.
> > 
> > s390 has to sign extend all 32-bit compat process pointers when
> > processing them in the 64-bit s390 kernel.  I think one other
> > architecture has this kind of situation too.
> 
> Which other architure? I reviewed all the definitions in tree
> and don't see any other than s390 doing magic there.

I'm also pretty sure that s390 is the only one needing this, I
added the compat_ptr stuff initially.

Note that a cast from pointer to unsigned long to u64 and back
in C does the correct 31 to 64 bit extension, which btw is not
a sign-extend but a unsigned extend clearing the upper 33 bits.

The easier rule to remember should be to always to compat_ptr()
on any pointer coming from user space, and to avoid pointers in
data structures where possible, as DaveM pointed out.

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