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: <ZCH/C89TwQ/aM1Rr@ip-172-31-38-16.us-west-2.compute.internal>
Date:   Mon, 27 Mar 2023 20:39:39 +0000
From:   Alok Tiagi <aloktiagi@...il.com>
To:     Tycho Andersen <tycho@...ho.pizza>
Cc:     Christian Brauner <brauner@...nel.org>, viro@...iv.linux.org.uk,
        willy@...radead.org, David.Laight@...lab.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        keescook@...omium.org, hch@...radead.org, aloktiagi@...il.com
Subject: Re: [RFC v4 2/2] file, epoll: Implement do_replace() and
 eventpoll_replace()

On Mon, Mar 27, 2023 at 07:16:39AM -0600, Tycho Andersen wrote:
> On Mon, Mar 27, 2023 at 07:06:46AM -0600, Tycho Andersen wrote:
> > On Mon, Mar 27, 2023 at 11:01:06AM +0200, Christian Brauner wrote:
> > > On Fri, Mar 24, 2023 at 07:43:13AM -0600, Tycho Andersen wrote:
> > > > Perhaps we could add a flag that people could set from SECCOMP_ADDFD
> > > > asking for this extra behavior?
> > > 
> > >         +       if (fd > 0 && addfd->ioctl_flags & SECCOMP_ADDFD_FLAG_EPOLL) {
> > >         +               /*
> > >         +                * - retrieve old struct file that addfd->fd refered to if any.
> > >         +                * - call your epoll seccomp api to update the references in the epoll instance
> > >         +                */
> > > 			epoll_seccomp_notify()
> > >         +       }
> > >         +
> > >         +       if (fd > 0 && addfd->ioctl_flags & SECCOMP_ADDFD_FLAG_IO_URING) {
> > >         +               /*
> > >         +                * - call your io_uring seccomp api to update the references in the io_uring instance
> > >         +                */
> > > 			io_uring_seccomp_notify()
> > >         +       }
> > 
> > Looks reasonable to me, thanks.
> 
> One change I might suggest is only using a single flag bit -- we don't
> need to consume all of seccomp's remaining flag bits with the various
> subsystems. If you want to do this logic for epoll, you almost
> certainly want it for io_uring, select, and whatever else is out
> there.
> 
> Tycho

Thank you for your comment and thoughts on this Christian. The per-subsystem
helper and calling this from seccomp add fd looks like a cleaner API. I'll
address the changes in v5.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ