On Fri, Feb 21, 2020 at 7:05 PM Casey Schaufler <[email protected]> wrote:
>
> Change security_secid_to_secctx() to take a lsmblob as input
> instead of a u32 secid. It will then call the LSM hooks
> using the lsmblob element allocated for that module. The
> callers have been updated as well. This allows for the
> possibility that more than one module may be called upon
> to translate a secid to a string, as can occur in the
> audit code.
>
> Reviewed-by: Kees Cook <[email protected]>
> Reviewed-by: John Johansen <[email protected]>
> Acked-by: Stephen Smalley <[email protected]>
> Signed-off-by: Casey Schaufler <[email protected]>
> cc: [email protected]
> ---
>  drivers/android/binder.c                |  4 +++-
>  include/linux/security.h                |  5 +++--
>  include/net/scm.h                       |  5 ++---
>  kernel/audit.c                          |  9 +++++++--
>  kernel/auditsc.c                        | 14 ++++++++++----
>  net/ipv4/ip_sockglue.c                  |  3 +--
>  net/netfilter/nf_conntrack_netlink.c    |  8 ++++++--
>  net/netfilter/nf_conntrack_standalone.c |  4 +++-
>  net/netfilter/nfnetlink_queue.c         |  8 ++++++--
>  net/netlabel/netlabel_unlabeled.c       | 18 ++++++++++++++----
>  net/netlabel/netlabel_user.c            |  6 +++---
>  security/security.c                     | 16 +++++++++++++---
>  12 files changed, 71 insertions(+), 29 deletions(-)

More of the lsmblob_init()/dosomething() pattern.

I'm sure this will all change later (and peeking ahead, it looks like
most of it does), but I think it needs to be better documented in
these commits about what is temporary and what is intended to stick
around.  Imagine years later bisecting down to this patch and trying
to make sense of why it was done this way.

I realize that it is hard to make individual patches do something
meaningful when you are making such sweeping changes, but in these
cases you need to document it until there is no doubt about why this
patch exists.

-- 
paul moore
www.paul-moore.com


--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit

Reply via email to