Skip to contentSkip to conversation

apparmor: fix typos and spelling errors

PATCH In review Tanya Agarwal 3 participants 4 messages Jan 23, 2025 – Jan 25, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apparmor: fix typos and spelling errors

From: Tanya Agarwal <[email protected]>

Fix typos and spelling errors in apparmor module comments that were identified using the codespell tool.
No functional changes - documentation only.

---
This patch set is split into individual patches for each LSM to facilitate easier review by respective maintainers.

Original discussion:
https://lore.kernel.org/all/[email protected]

 security/apparmor/apparmorfs.c | 6 +++---
 security/apparmor/domain.c     | 4 ++--
 security/apparmor/label.c      | 2 +-
 security/apparmor/lsm.c        | 2 +-
 security/apparmor/policy.c     | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)
security/apparmor/apparmorfs.c +3 -3
index 2c0185ebc900..0c2f248d31bf 100644
@@ -43,7 +43,7 @@
  * The interface is split into two main components based on their function
  * a securityfs component:
  *   used for static files that are always available, and which allows
- *   userspace to specificy the location of the security filesystem.
+ *   userspace to specify the location of the security filesystem.
  *
  *   fns and data are prefixed with
  *      aa_sfs_
@@ -204,7 +204,7 @@ static struct file_system_type aafs_ops = {
 /**
  * __aafs_setup_d_inode - basic inode setup for apparmorfs
  * @dir: parent directory for the dentry
- * @dentry: dentry we are seting the inode up for
+ * @dentry: dentry we are setting the inode up for
  * @mode: permissions the file should have
  * @data: data to store on inode.i_private, available in open()
  * @link: if symlink, symlink target string
@@ -2244,7 +2244,7 @@ static void *p_next(struct seq_file *f, void *p, loff_t *pos)
 /**
  * p_stop - stop depth first traversal
  * @f: seq_file we are filling
- * @p: the last profile writen
+ * @p: the last profile written
  *
  * Release all locking done by p_start/p_next on namespace tree
  */
security/apparmor/domain.c +2 -2
index 5939bd9a9b9b..d959931eac28 100644
@@ -755,7 +755,7 @@ static int profile_onexec(const struct cred *subj_cred,
 		/* change_profile on exec already granted */
 		/*
 		 * NOTE: Domain transitions from unconfined are allowed
-		 * even when no_new_privs is set because this aways results
+		 * even when no_new_privs is set because this always results
 		 * in a further reduction of permissions.
 		 */
 		return 0;
@@ -926,7 +926,7 @@ int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm)
 	 *
 	 * NOTE: Domain transitions from unconfined and to stacked
 	 * subsets are allowed even when no_new_privs is set because this
-	 * aways results in a further reduction of permissions.
+	 * always results in a further reduction of permissions.
 	 */
 	if ((bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS) &&
 	    !unconfined(label) &&
security/apparmor/label.c +1 -1
index 91483ecacc16..8bcff51becb8 100644
@@ -1456,7 +1456,7 @@ bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp)
 
 /*
  * cached label name is present and visible
- * @label->hname only exists if label is namespace hierachical
+ * @label->hname only exists if label is namespace hierarchical
  */
 static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label,
 				   int flags)
security/apparmor/lsm.c +1 -1
index 1edc12862a7d..04bf5d2f6e00 100644
@@ -2006,7 +2006,7 @@ static int __init alloc_buffers(void)
 	 * two should be enough, with more CPUs it is possible that more
 	 * buffers will be used simultaneously. The preallocated pool may grow.
 	 * This preallocation has also the side-effect that AppArmor will be
-	 * disabled early at boot if aa_g_path_max is extremly high.
+	 * disabled early at boot if aa_g_path_max is extremely high.
 	 */
 	if (num_online_cpus() > 1)
 		num = 4 + RESERVE_COUNT;
security/apparmor/policy.c +2 -2
index d0244fab0653..5cec3efc4794 100644
@@ -463,7 +463,7 @@ static struct aa_policy *__lookup_parent(struct aa_ns *ns,
 }
 
 /**
- * __create_missing_ancestors - create place holders for missing ancestores
+ * __create_missing_ancestors - create place holders for missing ancestors
  * @ns: namespace to lookup profile in (NOT NULL)
  * @hname: hierarchical profile name to find parent of (NOT NULL)
  * @gfp: type of allocation.
@@ -1068,7 +1068,7 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
 		goto out;
 
 	/* ensure that profiles are all for the same ns
-	 * TODO: update locking to remove this constaint. All profiles in
+	 * TODO: update locking to remove this constraint. All profiles in
 	 *       the load set must succeed as a set or the load will
 	 *       fail. Sort ent list and take ns locks in hierarchy order
 	 */
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 128 lines · Tanya Agarwal

From: Tanya Agarwal <[email protected]>

Fix typos and spelling errors in apparmor module comments that were identified using the codespell tool.
No functional changes - documentation only.

---
This patch set is split into individual patches for each LSM to facilitate easier review by respective maintainers.

Original discussion:
https://lore.kernel.org/all/[email protected]

 security/apparmor/apparmorfs.c | 6 +++---
 security/apparmor/domain.c     | 4 ++--
 security/apparmor/label.c      | 2 +-
 security/apparmor/lsm.c        | 2 +-
 security/apparmor/policy.c     | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)
security/apparmor/apparmorfs.c +3 -3
index 2c0185ebc900..0c2f248d31bf 100644
@@ -43,7 +43,7 @@
  * The interface is split into two main components based on their function
  * a securityfs component:
  *   used for static files that are always available, and which allows
- *   userspace to specificy the location of the security filesystem.
+ *   userspace to specify the location of the security filesystem.
  *
  *   fns and data are prefixed with
  *      aa_sfs_
@@ -204,7 +204,7 @@ static struct file_system_type aafs_ops = {
 /**
  * __aafs_setup_d_inode - basic inode setup for apparmorfs
  * @dir: parent directory for the dentry
- * @dentry: dentry we are seting the inode up for
+ * @dentry: dentry we are setting the inode up for
  * @mode: permissions the file should have
  * @data: data to store on inode.i_private, available in open()
  * @link: if symlink, symlink target string
@@ -2244,7 +2244,7 @@ static void *p_next(struct seq_file *f, void *p, loff_t *pos)
 /**
  * p_stop - stop depth first traversal
  * @f: seq_file we are filling
- * @p: the last profile writen
+ * @p: the last profile written
  *
  * Release all locking done by p_start/p_next on namespace tree
  */
security/apparmor/domain.c +2 -2
index 5939bd9a9b9b..d959931eac28 100644
@@ -755,7 +755,7 @@ static int profile_onexec(const struct cred *subj_cred,
                /* change_profile on exec already granted */
                /*
                 * NOTE: Domain transitions from unconfined are allowed
-                * even when no_new_privs is set because this aways results
+                * even when no_new_privs is set because this always results
                 * in a further reduction of permissions.
                 */
                return 0;
@@ -926,7 +926,7 @@ int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm)
         *
         * NOTE: Domain transitions from unconfined and to stacked
         * subsets are allowed even when no_new_privs is set because this
-        * aways results in a further reduction of permissions.
+        * always results in a further reduction of permissions.
         */
        if ((bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS) &&
            !unconfined(label) &&
security/apparmor/label.c +1 -1
index 91483ecacc16..8bcff51becb8 100644
@@ -1456,7 +1456,7 @@ bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp)
 
 /*
  * cached label name is present and visible
- * @label->hname only exists if label is namespace hierachical
+ * @label->hname only exists if label is namespace hierarchical
  */
 static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label,
                                   int flags)
security/apparmor/lsm.c +1 -1
index 1edc12862a7d..04bf5d2f6e00 100644
@@ -2006,7 +2006,7 @@ static int __init alloc_buffers(void)
         * two should be enough, with more CPUs it is possible that more
         * buffers will be used simultaneously. The preallocated pool may grow.
         * This preallocation has also the side-effect that AppArmor will be
-        * disabled early at boot if aa_g_path_max is extremly high.
+        * disabled early at boot if aa_g_path_max is extremely high.
         */
        if (num_online_cpus() > 1)
                num = 4 + RESERVE_COUNT;
security/apparmor/policy.c +2 -3
index d0244fab0653..5cec3efc4794 100644
@@ -463,7 +463,7 @@ static struct aa_policy *__lookup_parent(struct aa_ns *ns,
 }
 
 /**
- * __create_missing_ancestors - create place holders for missing ancestores
+ * __create_missing_ancestors - create place holders for missing ancestors
  * @ns: namespace to lookup profile in (NOT NULL)
  * @hname: hierarchical profile name to find parent of (NOT NULL)
  * @gfp: type of allocation.
@@ -1068,7 +1068,7 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
                goto out;
 
        /* ensure that profiles are all for the same ns
-        * TODO: update locking to remove this constaint. All profiles in
+        * TODO: update locking to remove this constraint. All profiles in
         *       the load set must succeed as a set or the load will
         *       fail. Sort ent list and take ns locks in hierarchy order
         */
--

2.39.5

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Tanya Agarwal
Quoted 8 lines · Tanya Agarwal

From: Tanya Agarwal <[email protected]>

Fix typos and spelling errors in apparmor module comments that were identified using the codespell tool.
No functional changes - documentation only.

I have pulled this into my tree

Quoted 115 lines

---
This patch set is split into individual patches for each LSM to facilitate easier review by respective maintainers.

Original discussion:
https://lore.kernel.org/all/[email protected]

  security/apparmor/apparmorfs.c | 6 +++---
  security/apparmor/domain.c     | 4 ++--
  security/apparmor/label.c      | 2 +-
  security/apparmor/lsm.c        | 2 +-
  security/apparmor/policy.c     | 4 ++--
  5 files changed, 9 insertions(+), 9 deletions(-)
security/apparmor/apparmorfs.c +3 -3
index 2c0185ebc900..0c2f248d31bf 100644
@@ -43,7 +43,7 @@
   * The interface is split into two main components based on their function
   * a securityfs component:
   *   used for static files that are always available, and which allows
- *   userspace to specificy the location of the security filesystem.
+ *   userspace to specify the location of the security filesystem.
   *
   *   fns and data are prefixed with
   *      aa_sfs_
@@ -204,7 +204,7 @@ static struct file_system_type aafs_ops = {
  /**
   * __aafs_setup_d_inode - basic inode setup for apparmorfs
   * @dir: parent directory for the dentry
- * @dentry: dentry we are seting the inode up for
+ * @dentry: dentry we are setting the inode up for
   * @mode: permissions the file should have
   * @data: data to store on inode.i_private, available in open()
   * @link: if symlink, symlink target string
@@ -2244,7 +2244,7 @@ static void *p_next(struct seq_file *f, void *p, loff_t *pos)
  /**
   * p_stop - stop depth first traversal
   * @f: seq_file we are filling
- * @p: the last profile writen
+ * @p: the last profile written
   *
   * Release all locking done by p_start/p_next on namespace tree
   */
security/apparmor/domain.c +2 -2
index 5939bd9a9b9b..d959931eac28 100644
@@ -755,7 +755,7 @@ static int profile_onexec(const struct cred *subj_cred,
  		/* change_profile on exec already granted */
  		/*
  		 * NOTE: Domain transitions from unconfined are allowed
-		 * even when no_new_privs is set because this aways results
+		 * even when no_new_privs is set because this always results
  		 * in a further reduction of permissions.
  		 */
  		return 0;
@@ -926,7 +926,7 @@ int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm)
  	 *
  	 * NOTE: Domain transitions from unconfined and to stacked
  	 * subsets are allowed even when no_new_privs is set because this
-	 * aways results in a further reduction of permissions.
+	 * always results in a further reduction of permissions.
  	 */
  	if ((bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS) &&
  	    !unconfined(label) &&
security/apparmor/label.c +1 -1
index 91483ecacc16..8bcff51becb8 100644
@@ -1456,7 +1456,7 @@ bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp)
 
  /*
   * cached label name is present and visible
- * @label->hname only exists if label is namespace hierachical
+ * @label->hname only exists if label is namespace hierarchical
   */
  static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label,
  				   int flags)
security/apparmor/lsm.c +1 -1
index 1edc12862a7d..04bf5d2f6e00 100644
@@ -2006,7 +2006,7 @@ static int __init alloc_buffers(void)
  	 * two should be enough, with more CPUs it is possible that more
  	 * buffers will be used simultaneously. The preallocated pool may grow.
  	 * This preallocation has also the side-effect that AppArmor will be
-	 * disabled early at boot if aa_g_path_max is extremly high.
+	 * disabled early at boot if aa_g_path_max is extremely high.
  	 */
  	if (num_online_cpus() > 1)
  		num = 4 + RESERVE_COUNT;
security/apparmor/policy.c +2 -2
index d0244fab0653..5cec3efc4794 100644
@@ -463,7 +463,7 @@ static struct aa_policy *__lookup_parent(struct aa_ns *ns,
  }
 
  /**
- * __create_missing_ancestors - create place holders for missing ancestores
+ * __create_missing_ancestors - create place holders for missing ancestors
   * @ns: namespace to lookup profile in (NOT NULL)
   * @hname: hierarchical profile name to find parent of (NOT NULL)
   * @gfp: type of allocation.
@@ -1068,7 +1068,7 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
  		goto out;
 
  	/* ensure that profiles are all for the same ns
-	 * TODO: update locking to remove this constaint. All profiles in
+	 * TODO: update locking to remove this constraint. All profiles in
  	 *       the load set must succeed as a set or the load will
  	 *       fail. Sort ent list and take ns locks in hierarchy order
  	 */
#3 lore raw
Quoted 8 lines · John Johansen
Quoted 6 lines · Tanya Agarwal

From: Tanya Agarwal <[email protected]>

Fix typos and spelling errors in apparmor module comments that were identified using the codespell tool.
No functional changes - documentation only.

Quoted 6 lines
Quoted 2 lines

I have pulled this into my tree

Thanks John!

Regards,
Tanya Agarwal