Skip to contentSkip to conversation

kasan: update function name in comments

PATCH Applied Peter Collingbourne 5 participants 7 messages Feb 19, 2022 – Feb 24, 2022

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

PATCH 1/1 kasan: update function name in comments

The function kasan_global_oob was renamed to kasan_global_oob_right, but the comments referring to it were not updated. Do so.

Fixes e5f4728767d2 ("kasan: test: add globals left-out-of-bounds test")
---
 lib/test_kasan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/test_kasan.c +3 -3
index 26a5c9007653..a8dfda9b9630 100644
@@ -780,7 +780,7 @@ static void ksize_uaf(struct kunit *test)
 static void kasan_stack_oob(struct kunit *test)
 {
 	char stack_array[10];
-	/* See comment in kasan_global_oob. */
+	/* See comment in kasan_global_oob_right. */
 	char *volatile array = stack_array;
 	char *p = &array[ARRAY_SIZE(stack_array) + OOB_TAG_OFF];
 
@@ -793,7 +793,7 @@ static void kasan_alloca_oob_left(struct kunit *test)
 {
 	volatile int i = 10;
 	char alloca_array[i];
-	/* See comment in kasan_global_oob. */
+	/* See comment in kasan_global_oob_right. */
 	char *volatile array = alloca_array;
 	char *p = array - 1;
 
@@ -808,7 +808,7 @@ static void kasan_alloca_oob_right(struct kunit *test)
 {
 	volatile int i = 10;
 	char alloca_array[i];
-	/* See comment in kasan_global_oob. */
+	/* See comment in kasan_global_oob_right. */
 	char *volatile array = alloca_array;
 	char *p = array + i;
 
Signature · 1 line
2.35.1.473.g83b2b277ed-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Peter Collingbourne

The function kasan_global_oob was renamed to kasan_global_oob_right, but the comments referring to it were not updated. Do so.

Fixes e5f4728767d2 ("kasan: test: add globals left-out-of-bounds test")

This Fixes tag is unneeded.

Except the above nit, this patch looks good to me. Thanks.

Quoted 36 lines
---
 lib/test_kasan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/test_kasan.c +3 -3
index 26a5c9007653..a8dfda9b9630 100644
@@ -780,7 +780,7 @@ static void ksize_uaf(struct kunit *test)
 static void kasan_stack_oob(struct kunit *test)
 {
 	char stack_array[10];
-	/* See comment in kasan_global_oob. */
+	/* See comment in kasan_global_oob_right. */
 	char *volatile array = stack_array;
 	char *p = &array[ARRAY_SIZE(stack_array) + OOB_TAG_OFF];
 
@@ -793,7 +793,7 @@ static void kasan_alloca_oob_left(struct kunit *test)
 {
 	volatile int i = 10;
 	char alloca_array[i];
-	/* See comment in kasan_global_oob. */
+	/* See comment in kasan_global_oob_right. */
 	char *volatile array = alloca_array;
 	char *p = array - 1;
 
@@ -808,7 +808,7 @@ static void kasan_alloca_oob_right(struct kunit *test)
 {
 	volatile int i = 10;
 	char alloca_array[i];
-	/* See comment in kasan_global_oob. */
+	/* See comment in kasan_global_oob_right. */
 	char *volatile array = alloca_array;
 	char *p = array + i;
 
Reviewed-by
#2 lore raw
Quoted 9 lines · Miaohe Lin
Quoted 6 lines · Peter Collingbourne

The function kasan_global_oob was renamed to kasan_global_oob_right, but the comments referring to it were not updated. Do so.

Fixes e5f4728767d2 ("kasan: test: add globals left-out-of-bounds test")
Quoted 5 lines

This Fixes tag is unneeded.

Except the above nit, this patch looks good to me. Thanks.

And yes, the Fixes tag should be removed to not have stable teams do unnecessary work.

+Cc'ing missing mailing lists (use get_maintainers.pl - in particular, LKML is missing, which should always be Cc'd for archival purposes so that things like b4 can work properly).

Quoted 37 lines
Quoted 36 lines
---
 lib/test_kasan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/test_kasan.c +3 -3
index 26a5c9007653..a8dfda9b9630 100644
@@ -780,7 +780,7 @@ static void ksize_uaf(struct kunit *test)
 static void kasan_stack_oob(struct kunit *test)
 {
      char stack_array[10];
-     /* See comment in kasan_global_oob. */
+     /* See comment in kasan_global_oob_right. */
      char *volatile array = stack_array;
      char *p = &array[ARRAY_SIZE(stack_array) + OOB_TAG_OFF];
 
@@ -793,7 +793,7 @@ static void kasan_alloca_oob_left(struct kunit *test)
 {
      volatile int i = 10;
      char alloca_array[i];
-     /* See comment in kasan_global_oob. */
+     /* See comment in kasan_global_oob_right. */
      char *volatile array = alloca_array;
      char *p = array - 1;
 
@@ -808,7 +808,7 @@ static void kasan_alloca_oob_right(struct kunit *test)
 {
      volatile int i = 10;
      char alloca_array[i];
-     /* See comment in kasan_global_oob. */
+     /* See comment in kasan_global_oob_right. */
      char *volatile array = alloca_array;
      char *p = array + i;
 
Reviewed-by on v1 1/1
#6 lore raw
In reply to Peter Collingbourne
Quoted 43 lines · Peter Collingbourne

The function kasan_global_oob was renamed to kasan_global_oob_right, but the comments referring to it were not updated. Do so.

Fixes e5f4728767d2 ("kasan: test: add globals left-out-of-bounds test")
---
 lib/test_kasan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/test_kasan.c +3 -4
index 26a5c9007653..a8dfda9b9630 100644
@@ -780,7 +780,7 @@ static void ksize_uaf(struct kunit *test)
 static void kasan_stack_oob(struct kunit *test)
 {
        char stack_array[10];
-       /* See comment in kasan_global_oob. */
+       /* See comment in kasan_global_oob_right. */
        char *volatile array = stack_array;
        char *p = &array[ARRAY_SIZE(stack_array) + OOB_TAG_OFF];
 
@@ -793,7 +793,7 @@ static void kasan_alloca_oob_left(struct kunit *test)
 {
        volatile int i = 10;
        char alloca_array[i];
-       /* See comment in kasan_global_oob. */
+       /* See comment in kasan_global_oob_right. */
        char *volatile array = alloca_array;
        char *p = array - 1;
 
@@ -808,7 +808,7 @@ static void kasan_alloca_oob_right(struct kunit *test)
 {
        volatile int i = 10;
        char alloca_array[i];
-       /* See comment in kasan_global_oob. */
+       /* See comment in kasan_global_oob_right. */
        char *volatile array = alloca_array;
        char *p = array + i;
 
--
Quoted 2 lines

2.35.1.473.g83b2b277ed-goog

#3 lore raw
In reply to Marco Elver
Quoted 13 lines · Marco Elver
Quoted 11 lines · Miaohe Lin
Quoted 6 lines · Peter Collingbourne

The function kasan_global_oob was renamed to kasan_global_oob_right, but the comments referring to it were not updated. Do so.

Fixes e5f4728767d2 ("kasan: test: add globals left-out-of-bounds test")

This Fixes tag is unneeded.

Quoted 8 lines
Quoted 3 lines

Except the above nit, this patch looks good to me. Thanks.

And yes, the Fixes tag should be removed to not have stable teams do unnecessary work.

I thought that Cc: [email protected] controlled whether the patch is to be taken to the stable kernel and Fixes: was more of an informational tag. At least that's what this seems to say:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#reviewer-s-statement-of-oversight

Quoted 3 lines

+Cc'ing missing mailing lists (use get_maintainers.pl - in particular, LKML is missing, which should always be Cc'd for archival purposes so that things like b4 can work properly).

get_maintainers.pl tends to list a lot of reviewers so I try to filter it to only the most important recipients or only use it for "important" patches (like the uaccess logging patch). It's also a bit broken in my workflow --
https://lore.kernel.org/all/[email protected]/
fixes one of the problems but there are others.

Doesn't b4 scan all the mailing lists? So I'd have imagined it wouldn't matter which one you send it to.

Peter

#4 lore raw

On Wed, 23 Feb 2022 at 23:31, Peter Collingbourne <[email protected]> wrote:
[...]

Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
Quoted 3 lines
Fixes e5f4728767d2 ("kasan: test: add globals left-out-of-bounds test")

This Fixes tag is unneeded.

Except the above nit, this patch looks good to me. Thanks.

Quoted 7 lines
Quoted 2 lines

And yes, the Fixes tag should be removed to not have stable teams do unnecessary work.

I thought that Cc: [email protected] controlled whether the patch is to be taken to the stable kernel and Fixes: was more of an informational tag. At least that's what this seems to say:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#reviewer-s-statement-of-oversight

These days patches that just have a Fixes tag (and no Cc: stable) will be auto-picked in many (most?) cases (by empirical observation).

I think there were also tree-specific variances of this policy, but am not sure anymore. What is the latest policy?

Quoted 10 lines
Quoted 3 lines

+Cc'ing missing mailing lists (use get_maintainers.pl - in particular, LKML is missing, which should always be Cc'd for archival purposes so that things like b4 can work properly).

get_maintainers.pl tends to list a lot of reviewers so I try to filter it to only the most important recipients or only use it for "important" patches (like the uaccess logging patch). It's also a bit broken in my workflow --
https://lore.kernel.org/all/[email protected]/
fixes one of the problems but there are others.

That's fair. It just seemed that something went wrong given [email protected] wasn't Cc'd. FWIW, syzbot uses 'get_maintainer.pl --git-min-percent=20' which is a bit less aggressive with Cc'ing folks not mentioned explicitly in MAINTAINERS.

Quoted 2 lines

Doesn't b4 scan all the mailing lists? So I'd have imagined it wouldn't matter which one you send it to.

Those under lore.kernel.org or lists.linux.dev. Seems linux-mm does get redirected to lore: https://lore.kernel.org/linux-mm/ -- It's not entirely obvious which are lore managed and which aren't (obviously things like [email protected] aren't).

maintainer
#5 lore raw
Quoted 10 lines · On Thu, 24 Feb 2022 00:35:32 +0100 Marco Elver <[email protected]> wrote:
Quoted 4 lines

I thought that Cc: [email protected] controlled whether the patch is to be taken to the stable kernel and Fixes: was more of an informational tag. At least that's what this seems to say:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#reviewer-s-statement-of-oversight

These days patches that just have a Fixes tag (and no Cc: stable) will be auto-picked in many (most?) cases (by empirical observation).

I think there were also tree-specific variances of this policy, but am not sure anymore. What is the latest policy?

The -stable maintainers have been asked not to do that for MM patches - to only take those which the developers (usually I) have explicitly tagged for backporting.

I don't know how rigorously this is being followed. Probably OK for patches to mm/* but if it's drivers/base/node.c then heaven knows.