On Tue, Feb 10, 2026 at 02:10:45PM +0100, Pratyush Yadav wrote:
> Hi Jason,
> 
> On Mon, Jan 26 2026, Jason Gunthorpe wrote:
> 
> > On Sun, Jan 25, 2026 at 02:03:29PM +0200, Mike Rapoport wrote:
> >> > @@ -67,11 +72,13 @@ struct memfd_luo_folio_ser {
> >> >  struct memfd_luo_ser {
> >> >          u64 pos;
> >> >          u64 size;
> >> > +        u64 seals:8;
> >> 
> >> Kernel uABI defines seals as unsigned int, I think we can spare u32 for
> >> them and reserve a u32 flags for other memfd flags (MFD_CLOEXEC,
> >> MFD_HUGETLB etc).
> >
> > It is a bit worse than that, the "v2" version is only going to support
> > some set of seals (probably the set defined in v6.19) and if there are
> > new seals down the road then this needs a version bump.
> 
> If we are running say kernel X, then X + 1 will always support a
> superset of the seals, since the seals are UAPI. So it should be able to
> handle all the seals that are given to it by X. This only becomes a
> problem on rollbacks. Is this what you are worried about or am I missing
> something?

I think you need a check at some point only permitting seals that are
defined right now.

Eg some future v7.19 kernel has MEMFD_SEAL_XX it should not be allowed
through luo until the API is bumped to v3

Jason

Reply via email to