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] [day] [month] [year] [list]
Message-ID: <ZG2wrrZBLl1ApFDL@ip-172-31-38-16.us-west-2.compute.internal>
Date:   Wed, 24 May 2023 06:37:34 +0000
From:   Alok Tiagi <aloktiagi@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     viro@...iv.linux.org.uk, brauner@...nel.org,
        David.Laight@...lab.com, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, keescook@...omium.org,
        hch@...radead.org, tycho@...ho.pizza
Subject: Re: [RFC v6 1/2] epoll: Implement eventpoll_replace_file()

On Tue, May 23, 2023 at 02:31:58PM +0100, Matthew Wilcox wrote:
> On Tue, May 23, 2023 at 06:58:01AM +0000, aloktiagi wrote:
> > +/*
> > + * This is called from eventpoll_replace() to replace a linked file in the epoll
> > + * interface with a new file received from another process. This is useful in
> > + * cases where a process is trying to install a new file for an existing one
> > + * that is linked in the epoll interface
> > + */
> > +int eventpoll_replace_file(struct file *toreplace, struct file *file, int tfd)
> 
> Functions do not control where they are called from.  Just take that
> clause out:
> 
> /*
>  * Replace a linked file in the epoll interface with a new file received
>  * from another process. This allows a process to
>  * install a new file for an existing one that is linked in the epoll
>  * interface
>  */
> 
> But, erm, aren't those two sentences basically saying the same thing?
> So simplify again:
> 
> /*
>  * Replace a linked file in the epoll interface with a new file
>  */
>

thank you for pointing this out. I'll address this in the next version.
 
> > diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h
> > index 3337745d81bd..2a6c8f52f272 100644
> > --- a/include/linux/eventpoll.h
> > +++ b/include/linux/eventpoll.h
> > @@ -25,6 +25,14 @@ struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, unsigned long t
> >  /* Used to release the epoll bits inside the "struct file" */
> >  void eventpoll_release_file(struct file *file);
> >  
> > +/*
> > + * This is called from fs/file.c:do_replace() to replace a linked file in the
> > + * epoll interface with a new file received from another process. This is useful
> > + * in cases where a process is trying to install a new file for an existing one
> > + * that is linked in the epoll interface
> > + */
> > +int eventpoll_replace_file(struct file *toreplace, struct file *file, int tfd);
> 
> No need to repeat the comment again.  Just delete it here.

thank you. I'll update this in the next version.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ