RE: [RFC PATCH 2/3] add statmnt(2) syscall
From: David Laight <hidden>
Date: 2023-09-20 09:43:40
Also in:
linux-fsdevel, linux-man, linux-security-module, lkml
From: David Laight <hidden>
Date: 2023-09-20 09:43:40
Also in:
linux-fsdevel, linux-man, linux-security-module, lkml
From: Jeff Layton
Sent: 18 September 2023 15:30
....
A bit tangential to this discussion, but one thing we could consider is adding something like a mnt_change_cookie field that increments on any significant changes on the mount: i.e. remounts with new options, changes to parentage or propagation, etc. That might make it more palatable to do something with separate syscalls for the string-based fields. You could do: statmnt(...); getmntattr(mnt, "mnt.fstype", ...); statmnt(...); ...and then if the mnt_change_cookie hasn't changed, you know that the string option was stable during that window.
That would also help with the problem of the mount options being changed while processing a page fault on the user buffer. Of, with a call to just get the cookie, could find that nothing has changed so there is no point looking again. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)