All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment
@ 2022-01-29  2:50 Yang Li
  2022-01-29  2:51 ` [PATCH -next 2/3] apparmor: Fix some kernel-doc comments Yang Li
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yang Li @ 2022-01-29  2:50 UTC (permalink / raw)
  To: serge
  Cc: jmorris, john.johansen, apparmor, linux-security-module,
	linux-kernel, Yang Li, Abaci Robot

Fix a spelling problem and change @mntpath to @path to remove warnings
found by running scripts/kernel-doc, which is caused by using 'make W=1'.

security/apparmor/mount.c:321: warning: Function parameter or member
'devname' not described in 'match_mnt_path_str'
security/apparmor/mount.c:321: warning: Excess function parameter
'devnme' description in 'match_mnt_path_str'
security/apparmor/mount.c:377: warning: Function parameter or member
'path' not described in 'match_mnt'
security/apparmor/mount.c:377: warning: Excess function parameter
'mntpath' description in 'match_mnt'

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 security/apparmor/mount.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
index 23aafe68d49a..5cc5de062fc8 100644
--- a/security/apparmor/mount.c
+++ b/security/apparmor/mount.c
@@ -304,7 +304,7 @@ static int path_flags(struct aa_profile *profile, const struct path *path)
  * @profile: the confining profile
  * @mntpath: for the mntpnt (NOT NULL)
  * @buffer: buffer to be used to lookup mntpath
- * @devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)
+ * @devname: string for the devname/src_name (MAY BE NULL OR ERRPTR)
  * @type: string for the dev type (MAYBE NULL)
  * @flags: mount flags to match
  * @data: fs mount data (MAYBE NULL)
@@ -359,7 +359,7 @@ static int match_mnt_path_str(struct aa_profile *profile,
 /**
  * match_mnt - handle path matching for mount
  * @profile: the confining profile
- * @mntpath: for the mntpnt (NOT NULL)
+ * @path: for the mntpnt (NOT NULL)
  * @buffer: buffer to be used to lookup mntpath
  * @devpath: path devname/src_name (MAYBE NULL)
  * @devbuffer: buffer to be used to lookup devname/src_name
-- 
2.20.1.7.g153144c


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

* [PATCH -next 2/3] apparmor: Fix some kernel-doc comments
  2022-01-29  2:50 [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment Yang Li
@ 2022-01-29  2:51 ` Yang Li
  2022-01-29 23:59   ` John Johansen
  2022-01-29  2:51 ` [PATCH 3/3] " Yang Li
  2022-01-29 23:59 ` [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment John Johansen
  2 siblings, 1 reply; 6+ messages in thread
From: Yang Li @ 2022-01-29  2:51 UTC (permalink / raw)
  To: serge
  Cc: jmorris, john.johansen, apparmor, linux-security-module,
	linux-kernel, Yang Li, Abaci Robot

Add the description of @ns_name, change function name aa_u16_chunck to
unpack_u16_chunk and verify_head to verify_header in kernel-doc comment
to remove warnings found by running scripts/kernel-doc, which is caused
by using 'make W=1'.

security/apparmor/policy_unpack.c:224: warning: expecting prototype for
aa_u16_chunck(). Prototype was for unpack_u16_chunk() instead
security/apparmor/policy_unpack.c:678: warning: Function parameter or
member 'ns_name' not described in 'unpack_profile'
security/apparmor/policy_unpack.c:950: warning: expecting prototype for
verify_head(). Prototype was for verify_header() instead

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 security/apparmor/policy_unpack.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 55dca9e3af50..3cc0fd2dff87 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -214,7 +214,7 @@ static void *kvmemdup(const void *src, size_t len)
 }
 
 /**
- * aa_u16_chunck - test and do bounds checking for a u16 size based chunk
+ * unpack_u16_chunk - test and do bounds checking for a u16 size based chunk
  * @e: serialized data read head (NOT NULL)
  * @chunk: start address for chunk of data (NOT NULL)
  *
@@ -671,6 +671,7 @@ static int datacmp(struct rhashtable_compare_arg *arg, const void *obj)
 /**
  * unpack_profile - unpack a serialized profile
  * @e: serialized data extent information (NOT NULL)
+ * @ns_name: pointer of newly allocated copy of %NULL in case of error
  *
  * NOTE: unpack profile sets audit struct if there is a failure
  */
@@ -939,7 +940,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
 }
 
 /**
- * verify_head - unpack serialized stream header
+ * verify_header - unpack serialized stream header
  * @e: serialized data read head (NOT NULL)
  * @required: whether the header is required or optional
  * @ns: Returns - namespace if one is specified else NULL (NOT NULL)
-- 
2.20.1.7.g153144c


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

* [PATCH 3/3] apparmor: Fix some kernel-doc comments
  2022-01-29  2:50 [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment Yang Li
  2022-01-29  2:51 ` [PATCH -next 2/3] apparmor: Fix some kernel-doc comments Yang Li
@ 2022-01-29  2:51 ` Yang Li
  2022-01-30  0:00   ` John Johansen
  2022-01-29 23:59 ` [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment John Johansen
  2 siblings, 1 reply; 6+ messages in thread
From: Yang Li @ 2022-01-29  2:51 UTC (permalink / raw)
  To: serge
  Cc: jmorris, john.johansen, apparmor, linux-security-module,
	linux-kernel, Yang Li, Abaci Robot

Don't use /** for non-kernel-doc comments and change function name
aa_mangle_name to mangle_name in kernel-doc comment to Remove some
warnings found by running scripts/kernel-doc, which is caused by
using 'make W=1'.

security/apparmor/apparmorfs.c:1503: warning: Cannot understand  *
 on line 1503 - I thought it was a doc line
security/apparmor/apparmorfs.c:1530: warning: Cannot understand  *
 on line 1530 - I thought it was a doc line
security/apparmor/apparmorfs.c:1892: warning: Cannot understand  *
 on line 1892 - I thought it was a doc line
security/apparmor/apparmorfs.c:108: warning: expecting prototype for
aa_mangle_name(). Prototype was for mangle_name() instead

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 security/apparmor/apparmorfs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 15efe4076fc4..4d7df859542d 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -98,7 +98,7 @@ static struct rawdata_f_data *rawdata_f_data_alloc(size_t size)
 #endif
 
 /**
- * aa_mangle_name - mangle a profile name to std profile layout form
+ * mangle_name - mangle a profile name to std profile layout form
  * @name: profile name to mangle  (NOT NULL)
  * @target: buffer to store mangled name, same length as @name (MAYBE NULL)
  *
@@ -1499,7 +1499,7 @@ int __aa_fs_create_rawdata(struct aa_ns *ns, struct aa_loaddata *rawdata)
 
 /** fns to setup dynamic per profile/namespace files **/
 
-/**
+/*
  *
  * Requires: @profile->ns->lock held
  */
@@ -1526,7 +1526,7 @@ void __aafs_profile_rmdir(struct aa_profile *profile)
 	}
 }
 
-/**
+/*
  *
  * Requires: @old->ns->lock held
  */
@@ -1888,7 +1888,7 @@ static void __aa_fs_list_remove_rawdata(struct aa_ns *ns)
 		__aa_fs_remove_rawdata(ent);
 }
 
-/**
+/*
  *
  * Requires: @ns->lock held
  */
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment
  2022-01-29  2:50 [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment Yang Li
  2022-01-29  2:51 ` [PATCH -next 2/3] apparmor: Fix some kernel-doc comments Yang Li
  2022-01-29  2:51 ` [PATCH 3/3] " Yang Li
@ 2022-01-29 23:59 ` John Johansen
  2 siblings, 0 replies; 6+ messages in thread
From: John Johansen @ 2022-01-29 23:59 UTC (permalink / raw)
  To: Yang Li, serge
  Cc: jmorris, apparmor, linux-security-module, linux-kernel, Abaci Robot

On 1/28/22 18:50, Yang Li wrote:
> Fix a spelling problem and change @mntpath to @path to remove warnings
> found by running scripts/kernel-doc, which is caused by using 'make W=1'.
> 
> security/apparmor/mount.c:321: warning: Function parameter or member
> 'devname' not described in 'match_mnt_path_str'
> security/apparmor/mount.c:321: warning: Excess function parameter
> 'devnme' description in 'match_mnt_path_str'
> security/apparmor/mount.c:377: warning: Function parameter or member
> 'path' not described in 'match_mnt'
> security/apparmor/mount.c:377: warning: Excess function parameter
> 'mntpath' description in 'match_mnt'
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: John Johansen <john.johansen@canonical.com>

I have pulled this into my tree

> ---
>  security/apparmor/mount.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
> index 23aafe68d49a..5cc5de062fc8 100644
> --- a/security/apparmor/mount.c
> +++ b/security/apparmor/mount.c
> @@ -304,7 +304,7 @@ static int path_flags(struct aa_profile *profile, const struct path *path)
>   * @profile: the confining profile
>   * @mntpath: for the mntpnt (NOT NULL)
>   * @buffer: buffer to be used to lookup mntpath
> - * @devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)
> + * @devname: string for the devname/src_name (MAY BE NULL OR ERRPTR)
>   * @type: string for the dev type (MAYBE NULL)
>   * @flags: mount flags to match
>   * @data: fs mount data (MAYBE NULL)
> @@ -359,7 +359,7 @@ static int match_mnt_path_str(struct aa_profile *profile,
>  /**
>   * match_mnt - handle path matching for mount
>   * @profile: the confining profile
> - * @mntpath: for the mntpnt (NOT NULL)
> + * @path: for the mntpnt (NOT NULL)
>   * @buffer: buffer to be used to lookup mntpath
>   * @devpath: path devname/src_name (MAYBE NULL)
>   * @devbuffer: buffer to be used to lookup devname/src_name


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

* Re: [PATCH -next 2/3] apparmor: Fix some kernel-doc comments
  2022-01-29  2:51 ` [PATCH -next 2/3] apparmor: Fix some kernel-doc comments Yang Li
@ 2022-01-29 23:59   ` John Johansen
  0 siblings, 0 replies; 6+ messages in thread
From: John Johansen @ 2022-01-29 23:59 UTC (permalink / raw)
  To: Yang Li, serge
  Cc: jmorris, apparmor, linux-security-module, linux-kernel, Abaci Robot

On 1/28/22 18:51, Yang Li wrote:
> Add the description of @ns_name, change function name aa_u16_chunck to
> unpack_u16_chunk and verify_head to verify_header in kernel-doc comment
> to remove warnings found by running scripts/kernel-doc, which is caused
> by using 'make W=1'.
> 
> security/apparmor/policy_unpack.c:224: warning: expecting prototype for
> aa_u16_chunck(). Prototype was for unpack_u16_chunk() instead
> security/apparmor/policy_unpack.c:678: warning: Function parameter or
> member 'ns_name' not described in 'unpack_profile'
> security/apparmor/policy_unpack.c:950: warning: expecting prototype for
> verify_head(). Prototype was for verify_header() instead
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: John Johansen <john.johansen@canonical.com>

I have pulled this into my tree

> ---
>  security/apparmor/policy_unpack.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
> index 55dca9e3af50..3cc0fd2dff87 100644
> --- a/security/apparmor/policy_unpack.c
> +++ b/security/apparmor/policy_unpack.c
> @@ -214,7 +214,7 @@ static void *kvmemdup(const void *src, size_t len)
>  }
>  
>  /**
> - * aa_u16_chunck - test and do bounds checking for a u16 size based chunk
> + * unpack_u16_chunk - test and do bounds checking for a u16 size based chunk
>   * @e: serialized data read head (NOT NULL)
>   * @chunk: start address for chunk of data (NOT NULL)
>   *
> @@ -671,6 +671,7 @@ static int datacmp(struct rhashtable_compare_arg *arg, const void *obj)
>  /**
>   * unpack_profile - unpack a serialized profile
>   * @e: serialized data extent information (NOT NULL)
> + * @ns_name: pointer of newly allocated copy of %NULL in case of error
>   *
>   * NOTE: unpack profile sets audit struct if there is a failure
>   */
> @@ -939,7 +940,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
>  }
>  
>  /**
> - * verify_head - unpack serialized stream header
> + * verify_header - unpack serialized stream header
>   * @e: serialized data read head (NOT NULL)
>   * @required: whether the header is required or optional
>   * @ns: Returns - namespace if one is specified else NULL (NOT NULL)


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

* Re: [PATCH 3/3] apparmor: Fix some kernel-doc comments
  2022-01-29  2:51 ` [PATCH 3/3] " Yang Li
@ 2022-01-30  0:00   ` John Johansen
  0 siblings, 0 replies; 6+ messages in thread
From: John Johansen @ 2022-01-30  0:00 UTC (permalink / raw)
  To: Yang Li, serge
  Cc: jmorris, apparmor, linux-security-module, linux-kernel, Abaci Robot

On 1/28/22 18:51, Yang Li wrote:
> Don't use /** for non-kernel-doc comments and change function name
> aa_mangle_name to mangle_name in kernel-doc comment to Remove some
> warnings found by running scripts/kernel-doc, which is caused by
> using 'make W=1'.
> 
> security/apparmor/apparmorfs.c:1503: warning: Cannot understand  *
>  on line 1503 - I thought it was a doc line
> security/apparmor/apparmorfs.c:1530: warning: Cannot understand  *
>  on line 1530 - I thought it was a doc line
> security/apparmor/apparmorfs.c:1892: warning: Cannot understand  *
>  on line 1892 - I thought it was a doc line
> security/apparmor/apparmorfs.c:108: warning: expecting prototype for
> aa_mangle_name(). Prototype was for mangle_name() instead
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

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

I have pulled this into my tree


> ---
>  security/apparmor/apparmorfs.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index 15efe4076fc4..4d7df859542d 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -98,7 +98,7 @@ static struct rawdata_f_data *rawdata_f_data_alloc(size_t size)
>  #endif
>  
>  /**
> - * aa_mangle_name - mangle a profile name to std profile layout form
> + * mangle_name - mangle a profile name to std profile layout form
>   * @name: profile name to mangle  (NOT NULL)
>   * @target: buffer to store mangled name, same length as @name (MAYBE NULL)
>   *
> @@ -1499,7 +1499,7 @@ int __aa_fs_create_rawdata(struct aa_ns *ns, struct aa_loaddata *rawdata)
>  
>  /** fns to setup dynamic per profile/namespace files **/
>  
> -/**
> +/*
>   *
>   * Requires: @profile->ns->lock held
>   */
> @@ -1526,7 +1526,7 @@ void __aafs_profile_rmdir(struct aa_profile *profile)
>  	}
>  }
>  
> -/**
> +/*
>   *
>   * Requires: @old->ns->lock held
>   */
> @@ -1888,7 +1888,7 @@ static void __aa_fs_list_remove_rawdata(struct aa_ns *ns)
>  		__aa_fs_remove_rawdata(ent);
>  }
>  
> -/**
> +/*
>   *
>   * Requires: @ns->lock held
>   */


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

end of thread, other threads:[~2022-01-30  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29  2:50 [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment Yang Li
2022-01-29  2:51 ` [PATCH -next 2/3] apparmor: Fix some kernel-doc comments Yang Li
2022-01-29 23:59   ` John Johansen
2022-01-29  2:51 ` [PATCH 3/3] " Yang Li
2022-01-30  0:00   ` John Johansen
2022-01-29 23:59 ` [PATCH -next 1/3] apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment John Johansen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.