Skip to contentSkip to conversation

ima: Fix trivial typos in the comments

PATCH In review Austin Kim 4 participants 7 messages Nov 24, 2021 – Jan 15, 2022

Subsystems (4)
lore
Share & tools
lore

Austin Kim

author
#0 lore raw

PATCH 1/1 ima: Fix trivial typos in the comments

There are a few minor typos in the comments. Fix these.

---
 security/integrity/ima/ima_api.c          | 2 +-
 security/integrity/ima/ima_main.c         | 2 +-
 security/integrity/ima/ima_policy.c       | 2 +-
 security/integrity/ima/ima_template_lib.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
security/integrity/ima/ima_api.c +1 -1
index a64fb0130b01..5b220a2fe573 100644
@@ -238,7 +238,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint,
 		goto out;
 
 	/*
-	 * Dectecting file change is based on i_version. On filesystems
+	 * Detecting file change is based on i_version. On filesystems
 	 * which do not support i_version, support is limited to an initial
 	 * measurement/appraisal/audit.
 	 */
security/integrity/ima/ima_main.c +1 -1
index 8c6e4514d494..8ed6da428328 100644
@@ -764,7 +764,7 @@ int ima_post_read_file(struct file *file, void *buf, loff_t size,
  *	      call to ima_post_load_data().
  *
  * Callers of this LSM hook can not measure, appraise, or audit the
- * data provided by userspace.  Enforce policy rules requring a file
+ * data provided by userspace.  Enforce policy rules requiring a file
  * signature (eg. kexec'ed kernel image).
  *
  * For permission return 0, otherwise return -EACCES.
security/integrity/ima/ima_policy.c +1 -1
index 320ca80aacab..ad7e19208a69 100644
@@ -429,7 +429,7 @@ static int ima_lsm_update_rule(struct ima_rule_entry *entry)
 	/*
 	 * ima_lsm_copy_rule() shallow copied all references, except for the
 	 * LSM references, from entry to nentry so we only want to free the LSM
-	 * references and the entry itself. All other memory refrences will now
+	 * references and the entry itself. All other memory references will now
 	 * be owned by nentry.
 	 */
 	ima_lsm_free_rule(entry);
security/integrity/ima/ima_template_lib.c +1 -1
index ca017cae73eb..5a5d462ab36d 100644
@@ -272,7 +272,7 @@ static int ima_eventdigest_init_common(const u8 *digest, u32 digestsize,
 	 * digest formats:
 	 *  - DATA_FMT_DIGEST: digest
 	 *  - DATA_FMT_DIGEST_WITH_ALGO: [<hash algo>] + ':' + '\0' + digest,
-	 *    where <hash algo> is provided if the hash algoritm is not
+	 *    where <hash algo> is provided if the hash algorithm is not
 	 *    SHA1 or MD5
 	 */
 	u8 buffer[CRYPTO_MAX_ALG_NAME + 2 + IMA_MAX_DIGEST_SIZE] = { 0 };
Signature · 1 line
2.20.1
#1 lore raw

Hi,

Would you take a look at this patch?
It won't take long.

BR,
Austin Kim

2021년 11월 26일 (금) 오전 11:34, Austin Kim <[email protected]>님이 작성:

Quoted 66 lines

There are a few minor typos in the comments. Fix these.

---
 security/integrity/ima/ima_api.c          | 2 +-
 security/integrity/ima/ima_main.c         | 2 +-
 security/integrity/ima/ima_policy.c       | 2 +-
 security/integrity/ima/ima_template_lib.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
security/integrity/ima/ima_api.c +1 -1
index a64fb0130b01..5b220a2fe573 100644
@@ -238,7 +238,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint,
                goto out;
 
        /*
-        * Dectecting file change is based on i_version. On filesystems
+        * Detecting file change is based on i_version. On filesystems
         * which do not support i_version, support is limited to an initial
         * measurement/appraisal/audit.
         */
security/integrity/ima/ima_main.c +1 -1
index 8c6e4514d494..8ed6da428328 100644
@@ -764,7 +764,7 @@ int ima_post_read_file(struct file *file, void *buf, loff_t size,
  *           call to ima_post_load_data().
  *
  * Callers of this LSM hook can not measure, appraise, or audit the
- * data provided by userspace.  Enforce policy rules requring a file
+ * data provided by userspace.  Enforce policy rules requiring a file
  * signature (eg. kexec'ed kernel image).
  *
  * For permission return 0, otherwise return -EACCES.
security/integrity/ima/ima_policy.c +1 -1
index 320ca80aacab..ad7e19208a69 100644
@@ -429,7 +429,7 @@ static int ima_lsm_update_rule(struct ima_rule_entry *entry)
        /*
         * ima_lsm_copy_rule() shallow copied all references, except for the
         * LSM references, from entry to nentry so we only want to free the LSM
-        * references and the entry itself. All other memory refrences will now
+        * references and the entry itself. All other memory references will now
         * be owned by nentry.
         */
        ima_lsm_free_rule(entry);
security/integrity/ima/ima_template_lib.c +1 -2
index ca017cae73eb..5a5d462ab36d 100644
@@ -272,7 +272,7 @@ static int ima_eventdigest_init_common(const u8 *digest, u32 digestsize,
         * digest formats:
         *  - DATA_FMT_DIGEST: digest
         *  - DATA_FMT_DIGEST_WITH_ALGO: [<hash algo>] + ':' + '\0' + digest,
-        *    where <hash algo> is provided if the hash algoritm is not
+        *    where <hash algo> is provided if the hash algorithm is not
         *    SHA1 or MD5
         */
        u8 buffer[CRYPTO_MAX_ALG_NAME + 2 + IMA_MAX_DIGEST_SIZE] = { 0 };
--

2.20.1

#3 lore raw
Quoted 4 lines · Mimi Zohar
Quoted 1 line · Austin Kim
Quoted 1 line

There are a few minor typos in the comments. Fix these.

It would be really nice if checkpatch.pl would catch spelling mistakes before the patch was upstreamed.

Try ./scripts/checkpatch.pl --strict

maintainer
#4 lore raw

Hi Joe,

Quoted 7 lines · Joe Perches
Quoted 4 lines · Mimi Zohar
Quoted 1 line · Austin Kim
Quoted 1 line

There are a few minor typos in the comments. Fix these.

It would be really nice if checkpatch.pl would catch spelling mistakes before the patch was upstreamed.

Try ./scripts/checkpatch.pl --strict

"--strict" didn't find the typos in comments, but "--codespell" did. Nice!

thanks,

Mimi

#5 lore raw
Quoted 5 lines · Mimi Zohar

Hi Joe,

Quoted 2 lines · Joe Perches
Quoted 1 line · Mimi Zohar

On Wed, 2022-01-12 at 17:46 +0900, Austin Kim wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

There are a few minor typos in the comments. Fix these.

It would be really nice if checkpatch.pl would catch spelling mistakes before the patch was upstreamed.

Try ./scripts/checkpatch.pl --strict

"--strict" didn't find the typos in comments, but "--codespell" did. Nice!

Right, but it does depend on the particular typo.

checkpatch always uses the scripts/spelling.txt dictionary.

codespell isn't always installed on machines and has to be enabled with that --codespell option.

Anyway, glad it works for you.

author
#6 lore raw
In reply to Mimi Zohar

2022년 1월 14일 (금) 오전 10:51, Mimi Zohar <[email protected]>님이 작성:

Quoted 6 lines

Hi Austin,

Quoted 1 line · Austin Kim
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

There are a few minor typos in the comments. Fix these.

It would be really nice if checkpatch.pl would catch spelling mistakes before the patch was upstreamed.

Thanks for feedback.
Let me make sure to upstream patch after executing './scripts/checkpatch.pl --strict' command.

BR,
Austin Kim

Quoted 5 lines

thanks,