linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] apparmor: fix kernel-doc complaints
@ 2023-01-02 20:45 Randy Dunlap
  2023-01-10 18:07 ` John Johansen
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2023-01-02 20:45 UTC (permalink / raw)
  To: linux-security-module
  Cc: Randy Dunlap, John Johansen, John Johansen, apparmor, Paul Moore,
	James Morris, Serge E. Hallyn

Correct kernel-doc notation to placate kernel-doc W=1 warnings:

security/apparmor/policy.c:439: warning: duplicate section name 'Return'
security/apparmor/secid.c:57: warning: Cannot understand  *
security/apparmor/file.c:174: warning: cannot understand function prototype: 'struct aa_perms default_perms = '

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: John Johansen <john.johansen@canonical.com>
Cc: John Johansen <john@apparmor.net>
Cc: apparmor@lists.ubuntu.com
Cc: Paul Moore <paul@paul-moore.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
---
 security/apparmor/file.c   |    2 +-
 security/apparmor/policy.c |    7 ++-----
 security/apparmor/secid.c  |    3 +--
 3 files changed, 4 insertions(+), 8 deletions(-)

diff -- a/security/apparmor/policy.c b/security/apparmor/policy.c
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -430,11 +430,9 @@ static struct aa_policy *__lookup_parent
  * @hname: hierarchical profile name to find parent of (NOT NULL)
  * @gfp: type of allocation.
  *
- * Returns: NULL on error, parent profile on success
- *
  * Requires: ns mutex lock held
  *
- * Returns: unrefcounted parent policy or NULL if error creating
+ * Return: unrefcounted parent policy on success or %NULL if error creating
  *          place holder profiles.
  */
 static struct aa_policy *__create_missing_ancestors(struct aa_ns *ns,
@@ -828,7 +826,7 @@ bool aa_current_policy_admin_capable(str
 /**
  * aa_may_manage_policy - can the current task manage policy
  * @label: label to check if it can manage policy
- * @op: the policy manipulation operation being done
+ * @mask: contains the policy manipulation operation being done
  *
  * Returns: 0 if the task is allowed to manipulate policy else error
  */
@@ -883,7 +881,6 @@ static struct aa_profile *__list_lookup_
  * __replace_profile - replace @old with @new on a list
  * @old: profile to be replaced  (NOT NULL)
  * @new: profile to replace @old with  (NOT NULL)
- * @share_proxy: transfer @old->proxy to @new
  *
  * Will duplicate and refcount elements that @new inherits from @old
  * and will inherit @old children.
diff -- a/security/apparmor/secid.c b/security/apparmor/secid.c
--- a/security/apparmor/secid.c
+++ b/security/apparmor/secid.c
@@ -53,8 +53,7 @@ void aa_secid_update(u32 secid, struct a
 	xa_unlock_irqrestore(&aa_secids, flags);
 }
 
-/**
- *
+/*
  * see label for inverse aa_label_to_secid
  */
 struct aa_label *aa_secid_to_label(u32 secid)
diff -- a/security/apparmor/file.c b/security/apparmor/file.c
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -161,6 +161,7 @@ static int path_name(const char *op, str
 	return 0;
 }
 
+struct aa_perms default_perms = {};
 /**
  * aa_lookup_fperms - convert dfa compressed perms to internal perms
  * @dfa: dfa to lookup perms for   (NOT NULL)
@@ -171,7 +172,6 @@ static int path_name(const char *op, str
  *
  * Returns: a pointer to a file permission set
  */
-struct aa_perms default_perms = {};
 struct aa_perms *aa_lookup_fperms(struct aa_policydb *file_rules,
 				 aa_state_t state, struct path_cond *cond)
 {

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

* Re: [PATCH] apparmor: fix kernel-doc complaints
  2023-01-02 20:45 [PATCH] apparmor: fix kernel-doc complaints Randy Dunlap
@ 2023-01-10 18:07 ` John Johansen
  0 siblings, 0 replies; 2+ messages in thread
From: John Johansen @ 2023-01-10 18:07 UTC (permalink / raw)
  To: Randy Dunlap, linux-security-module
  Cc: John Johansen, apparmor, Paul Moore, James Morris, Serge E. Hallyn

On 1/2/23 12:45, Randy Dunlap wrote:
> Correct kernel-doc notation to placate kernel-doc W=1 warnings:
> 
> security/apparmor/policy.c:439: warning: duplicate section name 'Return'
> security/apparmor/secid.c:57: warning: Cannot understand  *
> security/apparmor/file.c:174: warning: cannot understand function prototype: 'struct aa_perms default_perms = '
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: John Johansen <john.johansen@canonical.com>
> Cc: John Johansen <john@apparmor.net>
> Cc: apparmor@lists.ubuntu.com
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>

Acked-by: John Johansen <john.johansen@canonical.com>

I have pulled this into apparmor-next


> ---
>   security/apparmor/file.c   |    2 +-
>   security/apparmor/policy.c |    7 ++-----
>   security/apparmor/secid.c  |    3 +--
>   3 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff -- a/security/apparmor/policy.c b/security/apparmor/policy.c
> --- a/security/apparmor/policy.c
> +++ b/security/apparmor/policy.c
> @@ -430,11 +430,9 @@ static struct aa_policy *__lookup_parent
>    * @hname: hierarchical profile name to find parent of (NOT NULL)
>    * @gfp: type of allocation.
>    *
> - * Returns: NULL on error, parent profile on success
> - *
>    * Requires: ns mutex lock held
>    *
> - * Returns: unrefcounted parent policy or NULL if error creating
> + * Return: unrefcounted parent policy on success or %NULL if error creating
>    *          place holder profiles.
>    */
>   static struct aa_policy *__create_missing_ancestors(struct aa_ns *ns,
> @@ -828,7 +826,7 @@ bool aa_current_policy_admin_capable(str
>   /**
>    * aa_may_manage_policy - can the current task manage policy
>    * @label: label to check if it can manage policy
> - * @op: the policy manipulation operation being done
> + * @mask: contains the policy manipulation operation being done
>    *
>    * Returns: 0 if the task is allowed to manipulate policy else error
>    */
> @@ -883,7 +881,6 @@ static struct aa_profile *__list_lookup_
>    * __replace_profile - replace @old with @new on a list
>    * @old: profile to be replaced  (NOT NULL)
>    * @new: profile to replace @old with  (NOT NULL)
> - * @share_proxy: transfer @old->proxy to @new
>    *
>    * Will duplicate and refcount elements that @new inherits from @old
>    * and will inherit @old children.
> diff -- a/security/apparmor/secid.c b/security/apparmor/secid.c
> --- a/security/apparmor/secid.c
> +++ b/security/apparmor/secid.c
> @@ -53,8 +53,7 @@ void aa_secid_update(u32 secid, struct a
>   	xa_unlock_irqrestore(&aa_secids, flags);
>   }
>   
> -/**
> - *
> +/*
>    * see label for inverse aa_label_to_secid
>    */
>   struct aa_label *aa_secid_to_label(u32 secid)
> diff -- a/security/apparmor/file.c b/security/apparmor/file.c
> --- a/security/apparmor/file.c
> +++ b/security/apparmor/file.c
> @@ -161,6 +161,7 @@ static int path_name(const char *op, str
>   	return 0;
>   }
>   
> +struct aa_perms default_perms = {};
>   /**
>    * aa_lookup_fperms - convert dfa compressed perms to internal perms
>    * @dfa: dfa to lookup perms for   (NOT NULL)
> @@ -171,7 +172,6 @@ static int path_name(const char *op, str
>    *
>    * Returns: a pointer to a file permission set
>    */
> -struct aa_perms default_perms = {};
>   struct aa_perms *aa_lookup_fperms(struct aa_policydb *file_rules,
>   				 aa_state_t state, struct path_cond *cond)
>   {


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

end of thread, other threads:[~2023-01-10 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 20:45 [PATCH] apparmor: fix kernel-doc complaints Randy Dunlap
2023-01-10 18:07 ` John Johansen

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).