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.DEB.2.00.0910280353080.19088@skynet.skynet.ie>
Date:	Wed, 28 Oct 2009 03:54:34 +0000 (GMT)
From:	Dave Airlie <airlied@...ux.ie>
To:	David Miller <davem@...emloft.net>
cc:	dri-devel@...ts.sourceforge.net, andi@...stfloor.org,
	linux-kernel@...r.kernel.org, arnd@...db.de
Subject: Re: is avoiding compat ioctls possible?

> 
> > we already opencoded this (probably before it was macroisied or we just 
> > pasted it), so the radeon one is buggy, I should just go and compat_* all 
> > of these then and we should be all happy?
> 
> It should be, it's only working because:
> 
> 1) A malicious userland hasn't put garbage in the upper bits for
>    you yet.
> 
> 2) Nobody has tested s390 yet :-)
> 

So will an inline like this work?

static inline void *__user convert_user_ptr(uint64_t ioctl_ptr)
{
#ifdef CONFIG_COMPAT
	if (is_compat_task())
		return compat_ptr((compat_uptr_t)ioctl_ptr);
	else
#endif
		return (void __user *)(unsigned long)ioctl_ptr;
}

then I can convert all the code to just use that instead of explicity 
casts or brokenness.

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