Skip to contentSkip to conversation

Documentation/process: Add Researcher Guidelines

PATCH Applied Kees Cook 5 participants 8 messages Mar 4, 2022 – Jun 16

Subsystems (3)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH v3 1/1 Documentation/process: Add Researcher Guidelines

As a follow-up to the UMN incident[1], the TAB took the responsibility to document Researcher Guidelines so there would be a common place to point for describing our expectations as a developer community.

Document best practices researchers should follow to participate successfully with the Linux developer community.

[1] https://lore.kernel.org/lkml/202105051005.49BFABCE@keescook/

---
v1: https://lore.kernel.org/lkml/[email protected]
v2: https://lore.kernel.org/lkml/[email protected]
v3:
- move to /process

---
 Documentation/process/index.rst               |   1 +
 .../process/researcher-guidelines.rst         | 143 ++++++++++++++++++
 2 files changed, 144 insertions(+)
 create mode 100644 Documentation/process/researcher-guidelines.rst
Documentation/process/index.rst +1 -0
index 9f1b88492bb3..f7664a1db8b8 100644
@@ -48,6 +48,7 @@ Other guides to the community that are of interest to most developers are:
    deprecated
    embargoed-hardware-issues
    maintainers
+   researcher-guidelines
 
 These are some overall technical guides that have been put here for now for
 lack of a better place.
Documentation/process/researcher-guidelines.rst new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
2.32.0
maintainer Applied
#1 lore raw
Quoted 22 lines · Kees Cook

As a follow-up to the UMN incident[1], the TAB took the responsibility to document Researcher Guidelines so there would be a common place to point for describing our expectations as a developer community.

Document best practices researchers should follow to participate successfully with the Linux developer community.

[1] https://lore.kernel.org/lkml/202105051005.49BFABCE@keescook/

Quoted 5 lines

---
v1: https://lore.kernel.org/lkml/[email protected]
v2: https://lore.kernel.org/lkml/[email protected]
v3:
- move to /process

I've applied this, thanks.

jon

#2 lore raw
In reply to Kees Cook
Quoted 15 lines · Kees Cook
Documentation/process/researcher-guidelines.rst new file +15 -0
+For example::
+
+  From: Author <author@email>
+  Subject: [PATCH] drivers/foo_bar: Add missing kfree()
+
+  The error path in foo_bar driver does not correctly free the allocated
+  struct foo_bar_info. This can happen if the attached foo_bar device
+  rejects the initialization packets sent during foo_bar_probe(). This
+  would result in a 64 byte slab memory leak once per device attach,
+  wasting memory resources over time.
+
+  This flaw was found using an experimental static analysis tool we are
+  developing, LeakMagic[1], which reported the following warning when
+  analyzing the v5.15 kernel release:
+

Documentation/process/researcher-guidelines.rst line 120

Quoted 10 lines
Documentation/process/researcher-guidelines.rst new file +10 -0
+   path/to/foo_bar.c:187: missing kfree() call?
+
+  Add the missing kfree() to the error path. No other references to
+  this memory exist outside the probe function, so this is the only
+  place it can be freed.
+
+  x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC
+  11.2 show no new warnings, and LeakMagic no longer warns about this
+  code path. As we don't have a FooBar device to test with, no runtime
+  testing was able to be performed.

People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line.

Do we really want this "Compile tested only" stuff in the permanent git log?

regards,
dan carpenter

Quoted 8 lines
Documentation/process/researcher-guidelines.rst new file +8 -0
+
+  [1] https://url/to/leakmagic/details
+
+  Reported-by: Researcher <researcher@email>
+  Fixes: aaaabbbbccccdddd ("Introduce support for FooBar")
+  Signed-off-by: Author <author@email>
+  Reviewed-by: Reviewer <reviewer@email>
+
#3 lore raw
Quoted 1 line · Dan Carpenter

On Fri, Mar 04, 2022 at 10:14:18AM -0800, Kees Cook wrote:

...

Quoted 11 lines

Documentation/process/researcher-guidelines.rst line 120

Quoted 4 lines
Documentation/process/researcher-guidelines.rst new file +4 -0
+  x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC
+  11.2 show no new warnings, and LeakMagic no longer warns about this
+  code path. As we don't have a FooBar device to test with, no runtime
+  testing was able to be performed.

People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line.

Do we really want this "Compile tested only" stuff in the permanent git log?

+1 here, can we rather avoid flooding commit messages with the meta, that anyways is available in lore.kernel.org archives?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#4 lore raw
Quoted 14 lines · Andy Shevchenko
Quoted 1 line · Dan Carpenter

On Fri, Mar 04, 2022 at 10:14:18AM -0800, Kees Cook wrote:

...

Quoted 9 lines

Documentation/process/researcher-guidelines.rst line 120

Quoted 4 lines
Documentation/process/researcher-guidelines.rst new file +4 -0
+  x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC
+  11.2 show no new warnings, and LeakMagic no longer warns about this
+  code path. As we don't have a FooBar device to test with, no runtime
+  testing was able to be performed.

People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line.

Quoted 5 lines
Quoted 2 lines

Do we really want this "Compile tested only" stuff in the permanent git log?

+1 here, can we rather avoid flooding commit messages with the meta, that anyways is available in lore.kernel.org archives?

Perhaps somebody should send a patch correcting the wording to how they think it should be...?

Thanks,

jon

#5 lore raw
Quoted 3 lines · Jonathan Corbet
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Dan Carpenter

On Fri, Mar 04, 2022 at 10:14:18AM -0800, Kees Cook wrote:

...

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Documentation/process/researcher-guidelines.rst line 120

Quoted 4 lines
Documentation/process/researcher-guidelines.rst new file +4 -0
+  x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC
+  11.2 show no new warnings, and LeakMagic no longer warns about this
+  code path. As we don't have a FooBar device to test with, no runtime
+  testing was able to be performed.

People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Do we really want this "Compile tested only" stuff in the permanent git log?

+1 here, can we rather avoid flooding commit messages with the meta, that anyways is available in lore.kernel.org archives?

Perhaps somebody should send a patch correcting the wording to how they think it should be...?

Perhaps Dan as native speaker can do it better or others who were involved in this?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#6 lore raw
In reply to Andy Shevchenko
Quoted 14 lines · Andy Shevchenko
Quoted 1 line · Dan Carpenter

On Fri, Mar 04, 2022 at 10:14:18AM -0800, Kees Cook wrote:

...

Quoted 9 lines

Documentation/process/researcher-guidelines.rst line 120

Quoted 4 lines
Documentation/process/researcher-guidelines.rst new file +4 -0
+  x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC
+  11.2 show no new warnings, and LeakMagic no longer warns about this
+  code path. As we don't have a FooBar device to test with, no runtime
+  testing was able to be performed.

People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line.

Quoted 5 lines
Quoted 2 lines

Do we really want this "Compile tested only" stuff in the permanent git log?

+1 here, can we rather avoid flooding commit messages with the meta, that anyways is available in lore.kernel.org archives?

Hm, I have gotten a lot of push-back from maintainers (reasonablly) wanting to know the specific level of testing patches get. In the case of lacking hardware, this seems like useful information still.

Signature · 1 line
Kees Cook
#7 lore raw
Quoted 3 lines · Kees Cook
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Dan Carpenter

On Fri, Mar 04, 2022 at 10:14:18AM -0800, Kees Cook wrote:

...

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines

Documentation/process/researcher-guidelines.rst line 120

Quoted 4 lines
Documentation/process/researcher-guidelines.rst new file +4 -0
+  x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC
+  11.2 show no new warnings, and LeakMagic no longer warns about this
+  code path. As we don't have a FooBar device to test with, no runtime
+  testing was able to be performed.

People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line.

Do we really want this "Compile tested only" stuff in the permanent git log?

Quoted 6 lines
Quoted 2 lines

+1 here, can we rather avoid flooding commit messages with the meta, that anyways is available in lore.kernel.org archives?

Hm, I have gotten a lot of push-back from maintainers (reasonablly) wanting to know the specific level of testing patches get. In the case of lacking hardware, this seems like useful information still.

I am *not* against providing this information (actually I on the same page), I'm just against putting it into the commit message! We have a comment block put it there, please.

Signature · 2 lines
With Best Regards,
Andy Shevchenko