apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment
Subsystems (2)
PATCH 1/3 apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment
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'
--- security/apparmor/mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/apparmor/mount.c +2 -2
@@ -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
Signature · 1 line
2.20.1.7.g153144c
PATCH 2/3 apparmor: Fix some kernel-doc comments
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
--- security/apparmor/policy_unpack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
security/apparmor/policy_unpack.c +3 -2
@@ -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)
Signature · 1 line
2.20.1.7.g153144c
PATCH 3/3 apparmor: Fix some kernel-doc comments
In reply to Yang LiDon'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 linesecurity/apparmor/apparmorfs.c:1530: warning: Cannot understand *
on line 1530 - I thought it was a doc linesecurity/apparmor/apparmorfs.c:1892: warning: Cannot understand *
on line 1892 - I thought it was a doc linesecurity/apparmor/apparmorfs.c:108: warning: expecting prototype for aa_mangle_name(). Prototype was for mangle_name() instead
--- security/apparmor/apparmorfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
security/apparmor/apparmorfs.c +4 -4
@@ -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 */
Signature · 1 line
2.20.1.7.g153144c
Quoted 12 lines · Yang Li
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'
Quoted 2 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
I have pulled this into my tree
Quoted 26 lines
--- security/apparmor/mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)security/apparmor/mount.c +2
-2@@ -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
Re: [PATCH -next 2/3] apparmor: Fix some kernel-doc comments
In reply to Yang LiQuoted 12 lines · Yang Li
Add the description of @ns_name, change function name
aa_u16_chuncktounpack_u16_chunkandverify_headtoverify_headerin kernel-doc comment to remove warnings found by runningscripts/kernel-doc, which is caused by using 'make W=1'.
security/apparmor/policy_unpack.c:224: warning: expecting prototype foraa_u16_chunck(). Prototype was forunpack_u16_chunk()insteadsecurity/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 forverify_head(). Prototype was forverify_header()instead
Quoted 2 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
I have pulled this into my tree
Quoted 34 lines
--- security/apparmor/policy_unpack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)security/apparmor/policy_unpack.c +3
-2@@ -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)
Re: [PATCH 3/3] apparmor: Fix some kernel-doc comments
In reply to Yang LiQuoted 14 lines · Yang Li
Don't use /** for non-kernel-doc comments and change function name
aa_mangle_nametomangle_namein kernel-doc comment to Remove some warnings found by runningscripts/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 linesecurity/apparmor/apparmorfs.c:1530: warning: Cannot understand *
on line 1530 - I thought it was a doc linesecurity/apparmor/apparmorfs.c:1892: warning: Cannot understand *
on line 1892 - I thought it was a doc linesecurity/apparmor/apparmorfs.c:108: warning: expecting prototype foraa_mangle_name(). Prototype was formangle_name()instead
Quoted 2 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
I have pulled this into my tree
Quoted 44 lines
--- security/apparmor/apparmorfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)security/apparmor/apparmorfs.c +4
-4@@ -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 */