Add fcntl sealing interfaces from Linux 3.17 to bits/fcntl-linux.h
Dmitry V. Levin
ldv@altlinux.org
Fri Sep 8 11:25:00 GMT 2017
On Wed, Sep 06, 2017 at 03:30:47PM +0000, Joseph Myers wrote:
> While reviewing Linux 4.13 for glibc header changes needed, I noticed
> that bits/fcntl-linux.h was missing F_ADD_SEALS etc. from Linux 3.17.
>
> I didn't find any discussion indicating this omission is deliberate.
> Now, these interfaces can only be used with file descriptors created
> with memfd_create, and we don't have a memfd_create wrapper in glibc
> (a patch was submitted in October 2014, albeit without documentation /
> tests, and discussions continued over the next few months, but without
> consensus on whether to add the interface - and we still lack any
> general consensus on syscall wrappers), but I don't think that's a
> reason to exclude the constants from bits/fcntl-linux.h (especially as
> the header does not look compatible with simultaneously including
> linux/fcntl.h).
>
> (Some of those 2014/2015 discussions raised concerns about difficulty
> using the memfd_create / sealing interface, but those seem to me more
> like a question of whether it should be part of the OS-independent GNU
> API - in my view, even fairly specialized syscalls ought to have
> wrappers added to glibc if not obsolescent, but there may be cases
> where we only want to include them in the Linux-specific API and
> anything in the OS-independent GNU API should be different - rather
> than being relevant to whether constants for use with fcntl should
> appear in headers.)
>
> 2017-09-06 Joseph Myers <joseph@codesourcery.com>
>
> * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_GNU]
> (F_ADD_SEALS): New macro.
> [__USE_GNU] (F_GET_SEALS): Likewise.
> [__USE_GNU] (F_SEAL_SEAL): Likewise.
> [__USE_GNU] (F_SEAL_SHRINK): Likewise.
> [__USE_GNU] (F_SEAL_GROW): Likewise.
> [__USE_GNU] (F_SEAL_WRITE): Likewise.
I think the change itself is OK.
With regards to the changelog entry formatting,
I wonder why a more compact form is not used here, e.g.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_GNU] (F_ADD_SEALS,
F_GET_SEALS, F_SEAL_SEAL, F_SEAL_SHRINK, F_SEAL_GROW, F_SEAL_WRITE):
New macros.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170908/f4d30c2b/attachment.sig>
More information about the Libc-alpha
mailing list