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: <20180913020757.GP19965@ZenIV.linux.org.uk>
Date:   Thu, 13 Sep 2018 03:07:57 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 01/17] compat_ioctl: add generic_compat_ioctl_ptrarg()

On Wed, Sep 12, 2018 at 05:01:02PM +0200, Arnd Bergmann wrote:
> Many drivers have ioctl() handlers that are completely compatible
> between 32-bit and 64-bit architectures, except for the argument
> that is passed down from user space and may have to be passed
> through compat_ptr() in order to become a valid 64-bit pointer.
> 
> Using ".compat_ptr=generic_compat_ioctl_ptrarg" in file operations
> should let us simplify a lot of those drivers to avoid #ifdef
> checks, and convert additional drivers that don't have proper
> compat handling yet.

Just keep in mind that this should *only* be used when all
ioctls implemented in a given instance do take pointers.
Because otherwise you are asking for trouble - e.g. if one of
them takes an u32 used as a bitmap, this will run into trouble
as soon as somebody uses bit 31.  With no visible warnings.

IOW, it shouldn't be used blindly and it should come with big
fat warning.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ