summaryrefslogtreecommitdiff
path: root/include/linux/devpts_fs.h
diff options
context:
space:
mode:
authorOlga Kornievskaia <kolga@netapp.com>2020-11-06 16:03:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:25:59 +0100
commit2cdde54b6099025db7e870d81ff6e4bb8c98e950 (patch)
tree6feb1bf6f09683f7da15c639b796e2eaa1c2f180 /include/linux/devpts_fs.h
parentdd2c756eb1b700c0635462536540eb4bec1729c8 (diff)
NFSv4.2: condition READDIR's mask for security label based on LSM state
[ Upstream commit 05ad917561fca39a03338cb21fe9622f998b0f9c ] Currently, the client will always ask for security_labels if the server returns that it supports that feature regardless of any LSM modules (such as Selinux) enforcing security policy. This adds performance penalty to the READDIR operation. Client adjusts superblock's support of the security_label based on the server's support but also current client's configuration of the LSM modules. Thus, prior to using the default bitmask in READDIR, this patch checks the server's capabilities and then instructs READDIR to remove FATTR4_WORD2_SECURITY_LABEL from the bitmask. v5: fixing silly mistakes of the rushed v4 v4: simplifying logic v3: changing label's initialization per Ondrej's comment v2: dropping selinux hook and using the sb cap. Suggested-by: Ondrej Mosnacek <omosnace@redhat.com> Suggested-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Fixes: 2b0143b5c986 ("VFS: normal filesystems (and lustre): d_inode() annotations") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/devpts_fs.h')
0 files changed, 0 insertions, 0 deletions