public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Smack: allow multiple labels in onlycap
@ 2015-05-21 16:24 Rafal Krypa
  2015-05-21 16:24 ` [PATCH 1/2] Smack: fix seq operations in smackfs Rafal Krypa
  2015-05-21 16:24 ` [PATCH 2/2] Smack: allow multiple labels in onlycap Rafal Krypa
  0 siblings, 2 replies; 7+ messages in thread
From: Rafal Krypa @ 2015-05-21 16:24 UTC (permalink / raw)
  To: Casey Schaufler
  Cc: James Morris, Serge E. Hallyn, linux-security-module,
	linux-kernel, Rafal Krypa

It has been pointed out in Tizen recently, that onlycap feature might be
impractical with possibility of only one label to set.
If there is a desire to limit CAP_MAC_ADMIN and CAP_MAC_OVERRIDE in the
system, all privileged processes would have to run with a single label.
If multiple modules need those capabilities, they cannot have different
policy rules.

This patch set aims for making onlycap more flexible. Multiple labels can
be configured for privilege.

To support that, the first patch does some preparation in smackfs. Until
now all lists in Smack were add-only. No elements were ever removed from
lists of labels, rules and all other. Therefore Smack uses RCU lists with
non-standard, relaxed usage of critical sections. But extended onlycap
functionality will require both addition and removal of elements. To
support that, smackfs must be adapted first for correct usage of RCU read
critical sections. Failing to do that could lead to memory races and
undefined behaviour in smackfs.
As a bonus, first patch also fixes a bug in smackfs that was found by
coincidence.


Rafal Krypa (2):
  Smack: fix seq operations in smackfs
  Smack: allow multiple labels in onlycap

 Documentation/security/Smack.txt |   6 +-
 security/smack/smack.h           |  25 ++---
 security/smack/smack_access.c    |  41 ++++++++
 security/smack/smackfs.c         | 214 ++++++++++++++++++++++++---------------
 4 files changed, 184 insertions(+), 102 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-02 19:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 16:24 [PATCH 0/2] Smack: allow multiple labels in onlycap Rafal Krypa
2015-05-21 16:24 ` [PATCH 1/2] Smack: fix seq operations in smackfs Rafal Krypa
2015-06-02 18:59   ` Casey Schaufler
2015-05-21 16:24 ` [PATCH 2/2] Smack: allow multiple labels in onlycap Rafal Krypa
2015-05-26  1:04   ` Casey Schaufler
2015-06-02  9:23   ` [PATCH 2/2 v2] " Rafal Krypa
2015-06-02 19:01     ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox