Re: [PATCH] drm/panthor: Fix clang -Wunused-but-set-variable in tick_ctx_apply()

2024-03-28 Thread Justin Stitt
gt; Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") > Signed-off-by: Nathan Chancellor Reviewed-by: Justin Stitt > --- > drivers/gpu/drm/panthor/panthor_sched.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/dr

[PATCH] video/hdmi: prefer length specifier in format over string copying

2024-03-20 Thread Justin Stitt
/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only. Found with: $ rg "strncpy\(" --- drivers/video/hdmi.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/video/hdmi.c b/drivers/video/hd

[PATCH] fbdev: uvesafb: replace deprecated strncpy with strscpy_pad

2024-03-20 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 Link: https://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-

[PATCH] video: fbdev: fsl-diu-fb: replace deprecated strncpy with strscpy_pad

2024-03-20 Thread Justin Stitt
/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only. Found with: $ rg "strncpy\(" --- drivers/video/fbdev/fsl-diu-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/v

Re: [PATCH] video: fbdev: au1200fb: replace deprecated strncpy with strscpy

2024-03-20 Thread Justin Stitt
Hi, On Wed, Mar 20, 2024 at 12:56 AM Helge Deller wrote: > > On 3/19/24 00:46, Justin Stitt wrote: > > strncpy() is deprecated for use on NUL-terminated destination strings > > [1] and as such we should prefer more robust and less ambiguous string > > interfaces. >

[PATCH] video: fbdev: au1200fb: replace deprecated strncpy with strscpy

2024-03-18 Thread Justin Stitt
org Signed-off-by: Justin Stitt --- Note: build-tested only. Found with: $ rg "strncpy\(" --- drivers/video/fbdev/au1200fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 6f20efc663d7..e718fe

Re: [PATCH 7/9] drm: tests: Fix invalid printf format specifiers in KUnit tests

2024-02-21 Thread Justin Stitt
> Fixes: fca7526b7d89 ("drm/tests/drm_buddy: fix build failure on 32-bit > targets") > Fixes: fc8d29e298cf ("drm: selftest: convert drm_mm selftest to KUnit") > Signed-off-by: David Gow Reviewed-by: Justin Stitt > --- > drivers/gpu/drm/tests/drm_buddy_test.c | 1

Re: [PATCH 6/9] net: test: Fix printf format specifier in skb_segment kunit test

2024-02-21 Thread Justin Stitt
ooks good. For those wondering, %pe has a special meaning in the kernel which can be seen in lib/vsprintf.c. Reviewed-by: Justin Stitt > --- > net/core/gso_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/core/gso_test.c b/net/core/gso_test.c >

Re: [PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-21 Thread Justin Stitt
nce of rtc_time64_to_tm(). Add > tests.") > Signed-off-by: David Gow Reviewed-by: Justin Stitt > --- > drivers/rtc/lib_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/rtc/lib_test.c b/drivers/rtc/lib_test.c > index d5caf36c56cd

Re: [PATCH 4/9] time: test: Fix incorrect format specifier

2024-02-21 Thread Justin Stitt
ormance of time64_to_tm()") > Signed-off-by: David Gow Reviewed-by: Justin Stitt > --- > kernel/time/time_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/time/time_test.c b/kernel/time/time_test.c > index ca058c8af6ba..3e5d422dd15c 1006

Re: [PATCH 3/9] lib: memcpy_kunit: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread Justin Stitt
s: bb95ebbe89a7 ("lib: Introduce CONFIG_MEMCPY_KUNIT_TEST") > Signed-off-by: David Gow > --- Reviewed-by: Justin Stitt > lib/memcpy_kunit.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/memcpy_kunit.c b/lib/memcpy_kunit.c >

Re: [PATCH 2/9] lib/cmdline: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread Justin Stitt
Hi, On Wed, Feb 21, 2024 at 05:27:15PM +0800, David Gow wrote: > The correct format specifier for p - n (both p and n are pointers) is > %td, as the type should be ptrdiff_t. I think %tu is better. d specifies a signed type. I don't doubt that the warning is fixed but I think %tu represents the

Re: [PATCH 1/9] kunit: test: Log the correct filter string in executor_test

2024-02-21 Thread Justin Stitt
et gcc validate > the format string. > > Fixes: 76066f93f1df ("kunit: add tests for filtering attributes") > Signed-off-by: David Gow Reviewed-by: Justin Stitt > --- > lib/kunit/executor_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH 9/9] kunit: Annotate _MSG assertion variants with gnu printf specifiers

2024-02-21 Thread Justin Stitt
that we've fixed these errors, to > prevent them from recurring. > > Suggested-by: Linus Torvalds > Signed-off-by: David Gow Reviewed-by: Justin Stitt > --- > include/kunit/test.h | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include

[PATCH v2] drm/modes: replace deprecated strncpy with strscpy_pad

2023-10-16 Thread Justin Stitt
ink: 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: Xu Panda Signed-off-by: Justin Stitt --- Changes in v2: - use strscpy_pad (thanks Kees) - rebase o

[PATCH v2] drm/i915: refactor deprecated strncpy

2023-09-18 Thread Justin Stitt
.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: - drop the `... - 1` (thanks Kees) - Link to v1: https://lore.kernel.org/r/20230914-strncpy-drivers-gpu-drm-i915-gem-selftests-mock_context-c-v1-1-c3f92df94

[PATCH v2] drm/gma500: refactor deprecated strncpy

2023-09-18 Thread Justin Stitt
tps://github.com/KSPP/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Changes in v2: - use sizeof() instead of I2C_NAME_SIZE (thanks Kees, Patrik) - Link to v1: https://lore.kernel.org/r/20230914-drivers-gpu-drm-gma500-oaktrail_lvds_i2c-c-v1-1-0a53a0

[PATCH v2] drm/etnaviv: refactor deprecated strncpy

2023-09-18 Thread Justin Stitt
behavior that strncpy provides. 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: Bo YU Signed-off-by: Justin Stitt --- Changes in v2: - use strscpy_pad

[PATCH] drm/nouveau/pm: 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] drm/nouveau/core: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
#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 --- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 3 +-- 1 file

[PATCH] drm/nouveau/nvif: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
/linux/issues/90 Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- Note: build-tested only. --- drivers/gpu/drm/nouveau/nvif/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvif/client.c b/drivers/gpu/drm/nouveau/nvif/client.c

[PATCH] drm/i915: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
/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 --- drivers/gpu/drm/i915/gem/selftests/mock_context.c | 2

[PATCH] drm/gma500: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
Cc: linux-harden...@vger.kernel.org Signed-off-by: Justin Stitt --- drm/gma500: refactor deprecated strncpy --- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c b/drivers/gpu/drm/gma

[PATCH] drm/etnaviv: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
/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: Bo YU Signed-off-by: Justin Stitt --- Similar to [1

[PATCH] drm/modes: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
...@vger.kernel.org Cc: Xu Panda Signed-off-by: Justin Stitt --- This patch is basically a resend of [1] by Xu but rebased onto mainline. This patch is also similar to: commit 0f9aa074c92dd ("drm/modes: Use strscpy() to copy command-line mode name") [1]: https://lore.kernel.org/all/20221205

Re: [PATCH] habanalabs/gaudi: refactor deprecated strncpy

2023-08-25 Thread Justin Stitt
This patch as well as two other related patches were combined into a single patch [1] On Thu, Aug 24, 2023 at 1:41 PM Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > A suitable replacement is `strscpy` [2] due

Re: [PATCH] habanalabs/gaudi2: refactor deprecated strncpy

2023-08-25 Thread Justin Stitt
This patch as well as two other related patches were combined into a single patch [1] On Thu, Aug 24, 2023 at 1:45 PM Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > A suitable replacement is `strscpy` [2] due

Re: [PATCH] habanalabs/goya: refactor deprecated strncpy

2023-08-25 Thread Justin Stitt
This patch as well as two other related patches were combined into a single patch [1] Thu, Aug 24, 2023 at 1:49 PM Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > A suitable replacement is `strscpy` [2] due to the fact that it

[PATCH] accel/habanalabs: refactor deprecated strncpy to strscpy_pad

2023-08-25 Thread Justin Stitt
l/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 Suggested-by: Kees Cook --- Note: build-

[PATCH] accel/ivpu: refactor deprecated strncpy

2023-08-24 Thread Justin Stitt
ml#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 --- Note: build-tested only. --- drivers/accel/ivpu/ivpu_jsm_msg.c | 3 +

[PATCH] habanalabs/goya: refactor deprecated strncpy

2023-08-24 Thread Justin Stitt
/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 --- Note: build-tested only. --- drivers/accel/habanalabs/goya

[PATCH] habanalabs/gaudi2: refactor deprecated strncpy

2023-08-24 Thread Justin Stitt
/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 --- Note: build-tested only. --- drivers/accel/habanalabs/gaudi2

[PATCH] habanalabs/gaudi: refactor deprecated strncpy

2023-08-24 Thread Justin Stitt
/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 --- Note: build-tested only --- drivers/accel/habanalabs/gaudi

[PATCH] accel/habanalabs: refactor deprecated strncpy

2023-08-22 Thread Justin Stitt
/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 --- Note: build-tested only

[PATCH] drm: pl111: fix clang -Wvoid-pointer-to-enum-cast warning

2023-08-16 Thread Justin Stitt
Signed-off-by: Justin Stitt --- drivers/gpu/drm/pl111/pl111_versatile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_versatile.c b/drivers/gpu/drm/pl111/pl111_versatile.c index 00c3ebd32359..d6fd9e51377e 100644 --- a/drivers/g

[PATCH] drm/repaper: fix -Wvoid-pointer-to-enum-cast warning

2023-08-16 Thread Justin Stitt
->driver_data; Link: https://github.com/ClangBuiltLinux/linux/issues/1910 Reported-by: Nathan Chancellor Signed-off-by: Justin Stitt --- drivers/gpu/drm/tiny/repaper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repape