lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@lst.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

\
 
 \ /
  Last update: 2020-06-29 21:12    [W:0.106 / U:2.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site