[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whE2_YcRRQhJ73s4kYqTNDkYqq2HHtieQ-R1J+Awgk=nA@mail.gmail.com>
Date: Mon, 29 Jun 2020 12:10:37 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christoph Hellwig <hch@....de>
Cc: David Laight <David.Laight@...lab.com>,
Al Viro <viro@...iv.linux.org.uk>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 03/11] fs: add new read_uptr and write_uptr file operations
On Mon, Jun 29, 2020 at 11:36 AM Christoph Hellwig <hch@....de> wrote:
>
> Having resurrect my work there really are tons of int cases. Which
> makes me thing that splitting out a setsockopt_int method which gets
> passed value instead of a pointer, then converting all the simple cases
> to that first and then doing the real shit later sounds like a promÑ–sing
> idea.
Try my hacky patch first, and just change the code that does
if (get_user(val, (int __user *)optval)) {
err = -EFAULT;
to do
val = *(int *)optval;
In fact, that pattern seems to be so common that you can probably
almost do it with a sed-script or something.
Linus
Powered by blists - more mailing lists