[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006102001.E9779DFA5B@keescook>
Date: Wed, 10 Jun 2020 20:02:42 -0700
From: Kees Cook <keescook@...omium.org>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Sargun Dhillon' <sargun@...gun.me>,
Christian Brauner <christian.brauner@...ntu.com>,
"containers@...ts.linux-foundation.org"
<containers@...ts.linux-foundation.org>,
Giuseppe Scrivano <gscrivan@...hat.com>,
Robert Sesek <rsesek@...gle.com>,
Chris Palmer <palmer@...gle.com>, Jann Horn <jannh@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Matt Denton <mpdenton@...gle.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
Tejun Heo <tj@...nel.org>, Al Viro <viro@...iv.linux.org.uk>,
"cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH v3 1/4] fs, net: Standardize on file_receive helper to
move fds across processes
On Wed, Jun 10, 2020 at 08:48:45AM +0000, David Laight wrote:
> From: Sargun Dhillon
> > Sent: 10 June 2020 09:13
> In essence the 'copy_to_user' is done by the wrapper code.
> The code filling in the CMSG buffer can be considered to be
> writing a kernel buffer.
>
> IIRC other kernels (eg NetBSD) do the copies for ioctl() requests
> in the ioctl syscall wrapper.
> The IOW/IOR/IOWR flags have to be right.
Yeah, this seems like it'd make a lot more sense (and would have easily
caught the IOR/IOW issue pointed out later in the thread). I wonder how
insane it would be to try to fix that globally in the kernel...
--
Kees Cook
Powered by blists - more mailing lists