aboutsummaryrefslogtreecommitdiff
path: root/include/linux/bcma
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2015-03-11 14:32:24 -0700
committerMoyster <oysterized@gmail.com>2016-11-17 12:12:22 +0100
commit6988083d00a11de2741d172fea664257f0e61d35 (patch)
tree598fb293077affabaf349ae5eda056e87a4d3d81 /include/linux/bcma
parent6e841f1d2d8ebe6188d3b71524de2ca71d37f37e (diff)
mm: reorder can_do_mlock to fix audit denial
A userspace call to mmap(MAP_LOCKED) may result in the successful locking of memory while also producing a confusing audit log denial. can_do_mlock checks capable and rlimit. If either of these return positive can_do_mlock returns true. The capable check leads to an LSM hook used by apparmour and selinux which produce the audit denial. Reordering so rlimit is checked first eliminates the denial on success, only recording a denial when the lock is unsuccessful as a result of the denial. Change-Id: Ic6e724554a7d566768a594917f160ab5b732108e Signed-off-by: Jeff Vander Stoep <jeffv@google.com> Acked-by: Nick Kralevich <nnk@google.com> Cc: Jeff Vander Stoep <jeffv@google.com> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Paul Cassella <cassella@cray.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/bcma')
0 files changed, 0 insertions, 0 deletions