android_kernel_google_msm/security/selinux
Jeff Layton 059e6ee3a1 locks: rename file-private locks to "open file description locks"
File-private locks have been merged into Linux for v3.15, and *now*
people are commenting that the name and macro definitions for the new
file-private locks suck.

...and I can't even disagree. The names and command macros do suck.

We're going to have to live with these for a long time, so it's
important that we be happy with the names before we're stuck with them.
The consensus on the lists so far is that they should be rechristened as
"open file description locks".

The name isn't a big deal for the kernel, but the command macros are not
visually distinct enough from the traditional POSIX lock macros. The
glibc and documentation folks are recommending that we change them to
look like F_OFD_{GETLK|SETLK|SETLKW}. That lessens the chance that a
programmer will typo one of the commands wrong, and also makes it easier
to spot this difference when reading code.

This patch makes the following changes that I think are necessary before
v3.15 ships:

1) rename the command macros to their new names. These end up in the uapi
   headers and so are part of the external-facing API. It turns out that
   glibc doesn't actually use the fcntl.h uapi header, but it's hard to
   be sure that something else won't. Changing it now is safest.

2) make the the /proc/locks output display these as type "OFDLCK"

Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Stefan Metzmacher <metze@samba.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Frank Filz <ffilzlnx@mindspring.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Change-Id: Ia975197281d4c80a4ad420d7621896d2f369cef6
2021-01-24 09:56:22 +00:00
..
include selinux: Remove unused permission definitions 2020-11-14 17:06:52 +01:00
ss Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
.gitignore
Kconfig
Makefile selinux: change to new flag variable 2010-10-21 10:12:40 +11:00
avc.c selinux: extended permissions for ioctls 2016-10-29 23:12:40 +08:00
exports.c selinux: sparse fix: include selinux.h in exports.c 2011-09-09 16:56:32 -07:00
hooks.c locks: rename file-private locks to "open file description locks" 2021-01-24 09:56:22 +00:00
netif.c doc: Update the email address for Paul Moore in various source files 2011-08-01 17:58:33 -07:00
netlabel.c selinux: correct locking in selinux_netlbl_socket_connect) 2013-12-04 10:50:32 -08:00
netlink.c selinux: sparse fix: fix warnings in netlink code 2012-01-05 18:52:51 -05:00
netnode.c selinux: fix sel_netnode_insert() suspicious rcu dereference 2012-11-26 11:38:02 -08:00
netport.c SELinux: Fix RCU deref check warning in sel_netport_insert() 2011-12-21 11:28:56 +11:00
nlmsgtab.c netfilter: remove ip_queue support 2018-12-07 22:00:11 +04:00
selinuxfs.c move d_rcu from overlapping d_child to overlapping d_alias 2017-09-22 19:11:55 +03:00
xfrm.c selinux: look for IPsec labels on both inbound and outbound packets 2014-01-08 09:42:12 -08:00