Skip to content

: switch selinux and smack to pernet ops

Florian Westphal linux-security-module selinux 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2smack: use pernet operations for hook registrationsecurity/smack/smack_netfilter.c+18 -84 replies
1/2smack: use pernet operations for hook registration+0 -02 replies
2/2selinux: use pernet operations for hook registrationsecurity/selinux/hooks.c+20 -43 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchCasey Schaufler
1/2A-b
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH security-next 0/2]: switch selinux and smack to pernet ops

Back in the day we only had global netfilter hooks.

Nowadays netfilter hooks are per net namespace, but we still provide the old 'nf_register_hook' api, which will place the hooks in all current and future net namespaces.

smack and selinux are among the last users of the old api, this switches both over to pernet_ops.

This would also allow to only enable hooks in a netns when they are needed in that namespace, but this isn't done here.

The old api makes it necessary to keep rather ugly code in the netfilter core (e.g. iterating net namespaces under rtnl mutex...) and it has a race w. rmmod. We'd like to remove it.

If you prefer this gets merged via nf-next tree please ack and I'll resubmit (with acks) to netfilter-devel@ list.

 selinux/hooks.c         |   24 ++++++++++++++++++++----
 smack/smack_netfilter.c |   26 ++++++++++++++++++--------
 2 files changed, 38 insertions(+), 12 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html