Re: [PATCH] kunit: tool: Build compile_commands.json

2024-09-12 Thread Justin Stitt
= ['make', 'all', 'compile_commands.json', 'ARCH=' + > self._linux_arch, > + 'O=' + build_dir, '--jobs=' + str(jobs)] > if make_options: > command.extend(make_options) > if self._cross_compile: > > --- > base-commit: 3c999d1ae3c75991902a1a7dad0cb62c2a3008b4 > change-id: 20240516-kunit-compile-commands-d994074fc2be > > Best regards, > -- > Brendan Jackman > Reviewed-by: Justin Stitt Thanks Justin

Re: [PATCH] tracing: Replace strncpy() with strscpy() when copying comm

2024-08-27 Thread Justin Stitt
Hi, On Wed, Jul 31, 2024 at 03:50:58PM GMT, Jinjie Ruan wrote: > Replace the depreciated[1] strncpy() calls with strscpy() > when copying comm. > > Link: https://github.com/KSPP/linux/issues/90 [1] > Signed-off-by: Jinjie Ruan Reviewed-by: Justin Stitt > --- >

Re: [PATCH 1/2] compiler_types: Ensure __diag_clang() is always available

2024-03-19 Thread Justin Stitt
-op when using GCC. > > Fixes: f014a00bbeb0 ("compiler-clang.h: Add __diag infrastructure for clang") > Signed-off-by: Nathan Chancellor Reviewed-by: Justin Stitt > --- > include/linux/compiler_types.h | 4 > 1 file changed, 4 insertions(+) > > diff --gi

Re: [PATCH 2/2] tracing: Ignore -Wstring-compare with diagnostic macros

2024-03-19 Thread Justin Stitt
On Tue, Mar 19, 2024 at 9:08 AM Nathan Chancellor wrote: > > Commit b1afefa62ca9 ("tracing: Use strcmp() in __assign_str() WARN_ON() > check") addressed a clang warning, -Wstring-compare, with the use of > __builtin_constant_p() to dispatch to strcmp() if the source string is a > string literal an

Re: [PATCH v2 0/2] get_maintainer: add patch-only keyword matching

2023-09-28 Thread Justin Stitt
On Fri, Sep 29, 2023 at 11:50 AM Joe Perches wrote: > > On Fri, 2023-09-29 at 11:07 +0900, Justin Stitt wrote: > > On Fri, Sep 29, 2023 at 12:52 AM Nick Desaulniers > > wrote: > > > > > > On Wed, Sep 27, 2023 at 11:09 PM Joe Perches wrote: > > >

Re: [PATCH v2 0/2] get_maintainer: add patch-only keyword matching

2023-09-28 Thread Justin Stitt
On Fri, Sep 29, 2023 at 12:52 AM Nick Desaulniers wrote: > > On Wed, Sep 27, 2023 at 11:09 PM Joe Perches wrote: > > > > On Thu, 2023-09-28 at 14:31 +0900, Justin Stitt wrote: > > > On Thu, Sep 28, 2023 at 2:01 PM Joe Perches wrote: > > > > > >

Re: [PATCH v2 1/2] get_maintainer: add patch-only keyword-matching

2023-09-27 Thread Justin Stitt
On Thu, Sep 28, 2023 at 1:46 PM Joe Perches wrote: > > On Thu, 2023-09-28 at 04:23 +, Justin Stitt wrote: > > Add the "D:" type which behaves the same as "K:" but will only match > > content present in a patch file. > > > > To illustrate: >

[PATCH v2 2/2] MAINTAINERS: migrate some K to D

2023-09-27 Thread Justin Stitt
Let's get the ball rolling with some changes from K to D. Ultimately, if it turns out that 100% of K users want to change to D then really the behavior of K could just be changed. Signed-off-by: Justin Stitt Original-author: Kees Cook --- MAINTAINERS | 16 +--- 1 file chang

[PATCH v2 1/2] get_maintainer: add patch-only keyword-matching

2023-09-27 Thread Justin Stitt
e given like: $ ./scripts/get_maintainer.pl ./lib/string.c Han will not be noisily to/cc'd (like a K: type would in this circumstance) Signed-off-by: Justin Stitt --- MAINTAINERS | 5 + scripts/get_maintainer.pl | 12 ++-- 2 files changed, 15 insertions(+), 2 deletions(

[PATCH v2 0/2] get_maintainer: add patch-only keyword matching

2023-09-27 Thread Justin Stitt
e this series as, at the very least, a gentle migration in behavior which is purely opt-in and at some point could eagerly be merged with K:. [1]: https://lore.kernel.org/all/20230925172037.work.853-k...@kernel.org/ Signed-off-by: Justin Stitt --- Changes in v2: - remove bits about non-patch usage b

Re: [PATCH 3/3] get_maintainer: add patch-only pattern matching type

2023-09-26 Thread Justin Stitt
On Wed, Sep 27, 2023 at 3:14 PM Greg KH wrote: > > On Wed, Sep 27, 2023 at 03:19:16AM +, Justin Stitt wrote: > > Note that folks really shouldn't be using get_maintainer on tree files > > anyways [1]. > > That's not true, Linus and I use it on a daily basis t

[PATCH 3/3] get_maintainer: add patch-only pattern matching type

2023-09-26 Thread Justin Stitt
Add the "D:" type which behaves the same as "K:" but will only match content present in a patch file. To illustrate: Imagine this entry in MAINTAINERS: NEW REPUBLIC M: Han Solo W: https://www.jointheresistance.org D: \bstrncpy\b Our maintainer, Han, will only be added to the recipients if a pa

[PATCH 1/3] MAINTAINERS: add documentation for D:

2023-09-26 Thread Justin Stitt
Document what "D:" does. This is more or less the same as what "K:" does but only works for patch files. See [3/3] for more info and an illustrative example. --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b19995690904..de68d2c0cf29 100644 -

Re: [PATCH 1/3] MAINTAINERS: add documentation for D:

2023-09-26 Thread Justin Stitt
On Wed, Sep 27, 2023 at 12:27 PM Joe Perches wrote: > > On Wed, 2023-09-27 at 03:19 +, Justin Stitt wrote: > > Document what "D:" does. > > > > This is more or less the same as what "K:" does but only works for patch > > files. > > Nack.

[PATCH 0/3] get_maintainer: add patch-only keyword matching

2023-09-26 Thread Justin Stitt
human eye. [1]: https://lore.kernel.org/all/20230726151515.1650519-1-k...@kernel.org/ [2]: https://lore.kernel.org/all/20230925172037.work.853-k...@kernel.org/ Signed-off-by: Justin Stitt --- Justin Stitt (3): MAINTAINERS: add documentation for D: get_maintainer: run perltidy

[PATCH] HID: uhid: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
nux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- drivers/hid/uhid.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 4588d2cd4ea4..00e1566ad37b 100644 --- a/drivers/hid/u

[PATCH] HID: prodikeys: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt

[PATCH] firmware: ti_sci: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
nual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only. --- drivers/firmware/ti_sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/

[PATCH] firmware: tegra: bpmp: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: compile tested only. --- drivers/firmware/tegra/bpmp-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c index 6dfe3d34109e..bbcdd9fed3fb 100644

[PATCH v3] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt

Re: [PATCH] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
ensure that the functionality is the same. > > > > Link: > > https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings > > [1] > > Link: > > https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] > > L

[PATCH v2] ipmi: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
d.net/ [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- Changes in v2: - use memcpy_and_pad (thanks Corey) - Link to v1: https://lore.kernel.org/r/20230912-strncpy-drivers-char-ipmi-ipmi-v1-1-cc43e0d1c...@googl

Re: [PATCH] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 6:26 PM Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy_pad` [2] due to the fact that i

[PATCH v2] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Changes in v2: - included refactor of another strncpy in same file - Link to v1: https://lore.kernel.org/r/202

[PATCH] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only. --- drivers/edac/edac_mc_sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 dele

[PATCH] dax: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only. --- drivers/dax/bus.c | 2 +- 1 file changed, 1 ins

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 5:55 PM Justin Stitt wrote: > > On Tue, Sep 12, 2023 at 5:19 PM Corey Minyard wrote: > > > > On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > >

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 5:19 PM Corey Minyard wrote: > > On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > In this case, strncpy is being used specifically for its NUL-paddi

[PATCH] cpuidle: dt: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only --- drivers/cpuidle/dt_idle_states.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c index 12fec92a85fd..97feb7d8fb23 100644

[PATCH] cpufreq: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested --- drivers/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpuf

[PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
well then we should opt again for `strscpy_pad`. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- drivers/char

[PATCH] bus: fsl-mc: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
s/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- Note: build-tested --- drivers/bus/fsl-mc/dprc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/bus/fsl-mc/dprc.c b/drivers/bus/fsl-mc/dprc.c index d129338b8bc0..dd1b

Re: [PATCH] um,ethertap: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 12:36 AM Geert Uytterhoeven wrote: > > Hi Justin, > > Thanks for your patch! > > On Mon, Sep 11, 2023 at 7:53 PM Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > `gate_buf` shou

Re: [PATCH] x86/tdx: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
On Mon, Sep 11, 2023 at 11:51 AM Dave Hansen wrote: > > On 9/11/23 11:27, Justin Stitt wrote: > > `strncpy` is deprecated and we should prefer more robust string apis. > > I dunno. It actually seems like a pretty good fit here. > > > In this case, `message.str

[PATCH] auxdisplay: panel: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
its behavior. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- Note: build-tested --- drivers/auxdisplay

[PATCH] ACPI: OSI: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
ul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- Note: build-tested --- drivers/acpi/osi.c | 2 +- 1 file changed

[PATCH] x86/tdx: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
r to understand interface. Link: www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings[1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Cc: Nick Desaulniers Signed-off-by: Justin Stitt --- Note: build-tested ---

[PATCH] xen/efi: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
st/process/deprecated.html#strncpy-on-nul-terminated-strings[1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt --- Note: build-tested --- ar

[PATCH] um,ethertap: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings[1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin St