Re: [PATCH v2 06/25] capability: provide helpers for converting between xattrs and vfs_caps

2024-03-01 Thread Seth Forshee (DigitalOcean)
On Fri, Mar 01, 2024 at 05:30:55PM +0100, Roberto Sassu wrote: > > +/* > > + * Inner implementation of vfs_caps_to_xattr() which does not return an > > + * error if the rootid does not map into @dest_userns. > > + */ > > +static ssize_t __vfs_caps_to_xattr(struct mnt_idmap *idmap, > > +

Re: [PATCH v2 11/25] security: add hooks for set/get/remove of fscaps

2024-03-01 Thread Seth Forshee (DigitalOcean)
On Fri, Mar 01, 2024 at 04:59:16PM +0100, Roberto Sassu wrote: > On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > > In preparation for moving fscaps out of the xattr code paths, add new > > security hooks. These hooks are largely needed because common kernel > > code will

Re: [PATCH v2 06/25] capability: provide helpers for converting between xattrs and vfs_caps

2024-03-01 Thread Roberto Sassu
On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > To pass around vfs_caps instead of raw xattr data we will need to > convert between the two representations near userspace and disk > boundaries. We already convert xattrs from disks to vfs_caps, so move > that code into a

Re: [PATCH v2 11/25] security: add hooks for set/get/remove of fscaps

2024-03-01 Thread Roberto Sassu
On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > In preparation for moving fscaps out of the xattr code paths, add new > security hooks. These hooks are largely needed because common kernel > code will pass around struct vfs_caps pointers, which EVM will need to > convert to

Re: [PATCH v2 14/25] evm: add support for fscaps security hooks

2024-03-01 Thread Roberto Sassu
On Fri, 2024-03-01 at 08:39 -0600, Seth Forshee (DigitalOcean) wrote: > On Fri, Mar 01, 2024 at 10:19:13AM +0100, Roberto Sassu wrote: > > On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > > > Support the new fscaps security hooks by converting the vfs_caps to raw > > > xattr

Re: [PATCH v2 14/25] evm: add support for fscaps security hooks

2024-03-01 Thread Seth Forshee (DigitalOcean)
On Fri, Mar 01, 2024 at 10:19:13AM +0100, Roberto Sassu wrote: > On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > > Support the new fscaps security hooks by converting the vfs_caps to raw > > xattr data and then handling them the same as other xattrs. > > Hi Seth > > I

Re: [PATCH v2 14/25] evm: add support for fscaps security hooks

2024-03-01 Thread Christian Brauner
> I have seen this policy of adding tests in other subsystems (eBPF), It makes sense if the drive of the patchset would be IMA/EVM features not refactoring of existing code. > Happy to try adding the tests, would appreciate your help to review if Cool, happy to help review them.

Re: [PATCH v2 14/25] evm: add support for fscaps security hooks

2024-03-01 Thread Roberto Sassu
On Fri, 2024-03-01 at 13:54 +0100, Christian Brauner wrote: > On Fri, Mar 01, 2024 at 10:19:13AM +0100, Roberto Sassu wrote: > > On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > > > Support the new fscaps security hooks by converting the vfs_caps to raw > > > xattr data and

Re: [PATCH v2 14/25] evm: add support for fscaps security hooks

2024-03-01 Thread Christian Brauner
On Fri, Mar 01, 2024 at 10:19:13AM +0100, Roberto Sassu wrote: > On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > > Support the new fscaps security hooks by converting the vfs_caps to raw > > xattr data and then handling them the same as other xattrs. > > Hi Seth > > I

Re: [PATCH v2 14/25] evm: add support for fscaps security hooks

2024-03-01 Thread Roberto Sassu
On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote: > Support the new fscaps security hooks by converting the vfs_caps to raw > xattr data and then handling them the same as other xattrs. Hi Seth I started looking at this patch set. The first question I have is if you are also