From: John Johansen <john.johansen@canonical.com>
To: Xiu Jianfeng <xiujianfeng@huaweicloud.com>,
paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com
Cc: apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org
Subject: Re: [PATCH -next] apparmor: remove unused functions in policy_ns.c/.h
Date: Tue, 22 Aug 2023 12:30:11 -0700 [thread overview]
Message-ID: <2ea99c70-1be1-c0bb-bf3c-ed65a25744de@canonical.com> (raw)
In-Reply-To: <20230810201056.429575-1-xiujianfeng@huaweicloud.com>
On 8/10/23 13:10, Xiu Jianfeng wrote:
> From: Xiu Jianfeng <xiujianfeng@huawei.com>
>
> These functions are not used now, remove them.
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Acked-by: John Johansen <john.johansen@canonical.com>
this has pulled into apparmor-next-next so it will land
next cycle
> ---
> security/apparmor/include/policy_ns.h | 14 ----------
> security/apparmor/policy_ns.c | 37 ---------------------------
> 2 files changed, 51 deletions(-)
>
> diff --git a/security/apparmor/include/policy_ns.h b/security/apparmor/include/policy_ns.h
> index 33d665516fc1..d646070fd966 100644
> --- a/security/apparmor/include/policy_ns.h
> +++ b/security/apparmor/include/policy_ns.h
> @@ -86,10 +86,7 @@ const char *aa_ns_name(struct aa_ns *parent, struct aa_ns *child, bool subns);
> void aa_free_ns(struct aa_ns *ns);
> int aa_alloc_root_ns(void);
> void aa_free_root_ns(void);
> -void aa_free_ns_kref(struct kref *kref);
>
> -struct aa_ns *aa_find_ns(struct aa_ns *root, const char *name);
> -struct aa_ns *aa_findn_ns(struct aa_ns *root, const char *name, size_t n);
> struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n);
> struct aa_ns *aa_lookupn_ns(struct aa_ns *view, const char *name, size_t n);
> struct aa_ns *__aa_find_or_create_ns(struct aa_ns *parent, const char *name,
> @@ -151,15 +148,4 @@ static inline struct aa_ns *__aa_find_ns(struct list_head *head,
> return __aa_findn_ns(head, name, strlen(name));
> }
>
> -static inline struct aa_ns *__aa_lookup_ns(struct aa_ns *base,
> - const char *hname)
> -{
> - return __aa_lookupn_ns(base, hname, strlen(hname));
> -}
> -
> -static inline struct aa_ns *aa_lookup_ns(struct aa_ns *view, const char *name)
> -{
> - return aa_lookupn_ns(view, name, strlen(name));
> -}
> -
> #endif /* AA_NAMESPACE_H */
> diff --git a/security/apparmor/policy_ns.c b/security/apparmor/policy_ns.c
> index fd5b7afbcb48..1f02cfe1d974 100644
> --- a/security/apparmor/policy_ns.c
> +++ b/security/apparmor/policy_ns.c
> @@ -159,43 +159,6 @@ void aa_free_ns(struct aa_ns *ns)
> kfree_sensitive(ns);
> }
>
> -/**
> - * aa_findn_ns - look up a profile namespace on the namespace list
> - * @root: namespace to search in (NOT NULL)
> - * @name: name of namespace to find (NOT NULL)
> - * @n: length of @name
> - *
> - * Returns: a refcounted namespace on the list, or NULL if no namespace
> - * called @name exists.
> - *
> - * refcount released by caller
> - */
> -struct aa_ns *aa_findn_ns(struct aa_ns *root, const char *name, size_t n)
> -{
> - struct aa_ns *ns = NULL;
> -
> - rcu_read_lock();
> - ns = aa_get_ns(__aa_findn_ns(&root->sub_ns, name, n));
> - rcu_read_unlock();
> -
> - return ns;
> -}
> -
> -/**
> - * aa_find_ns - look up a profile namespace on the namespace list
> - * @root: namespace to search in (NOT NULL)
> - * @name: name of namespace to find (NOT NULL)
> - *
> - * Returns: a refcounted namespace on the list, or NULL if no namespace
> - * called @name exists.
> - *
> - * refcount released by caller
> - */
> -struct aa_ns *aa_find_ns(struct aa_ns *root, const char *name)
> -{
> - return aa_findn_ns(root, name, strlen(name));
> -}
> -
> /**
> * __aa_lookupn_ns - lookup the namespace matching @hname
> * @view: namespace to search in (NOT NULL)
prev parent reply other threads:[~2023-08-22 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 20:10 [PATCH -next] apparmor: remove unused functions in policy_ns.c/.h Xiu Jianfeng
2023-08-22 19:30 ` John Johansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ea99c70-1be1-c0bb-bf3c-ed65a25744de@canonical.com \
--to=john.johansen@canonical.com \
--cc=apparmor@lists.ubuntu.com \
--cc=jmorris@namei.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=xiujianfeng@huaweicloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).