[PATCH][next] Makefile: Enable -Wstringop-overflow globally

2023-11-15 Thread Gustavo A. R. Silva
It seems that we have finished addressing all the remaining issues regarding compiler option -Wstringop-overflow. So, we are now in good shape to enable this compiler option globally. Signed-off-by: Gustavo A. R. Silva --- Makefile | 3 +++ scripts/Makefile.extrawarn | 2 -- 2

[PATCH 6.1 018/379] string: Adjust strtomem() logic to allow for smaller sources

2023-11-15 Thread Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook [ Upstream commit 0e108725f6cc5b3be9e607f89c9fbcbb236367b7 ] Arnd noticed we have a case where a shorter source string is being copied into a destination byte array, but this results

[net-next V2 06/13] net/mlx5: simplify mlx5_set_driver_version string assignments

2023-11-15 Thread Saeed Mahameed
From: Justin Stitt In total, just assigning this version string takes: (1) strncpy()'s (5) strlen()'s (3) strncat()'s (1) snprintf()'s (4) max_t()'s Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't be used either [2]. With this in mind, let's simply use a single `snprintf`.

[PATCH 6.6 033/603] string: Adjust strtomem() logic to allow for smaller sources

2023-11-15 Thread Greg Kroah-Hartman
6.6-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook [ Upstream commit 0e108725f6cc5b3be9e607f89c9fbcbb236367b7 ] Arnd noticed we have a case where a shorter source string is being copied into a destination byte array, but this results

[PATCH 6.5 034/550] string: Adjust strtomem() logic to allow for smaller sources

2023-11-15 Thread Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook [ Upstream commit 0e108725f6cc5b3be9e607f89c9fbcbb236367b7 ] Arnd noticed we have a case where a shorter source string is being copied into a destination byte array, but this results

Re: [PATCH v2][next] hwmon: (aspeed-pwm-tacho) Fix -Wstringop-overflow warning in aspeed_create_fan_tach_channel()

2023-11-15 Thread Gustavo A. R. Silva
On 11/15/23 07:12, Guenter Roeck wrote: On Tue, Nov 14, 2023 at 01:53:08PM -0600, Gustavo A. R. Silva wrote: Based on the documentation below, the maximum number of Fan tach channels is 16: Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt:45: 45 - aspeed,fan-tach-ch : should sp

Re: [PATCH v2] scsi: elx: libefc: replace deprecated strncpy with strscpy_pad/memcpy

2023-11-15 Thread Martin K. Petersen
Justin, > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. Applied to 6.8/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: csiostor: replace deprecated strncpy with strscpy

2023-11-15 Thread Martin K. Petersen
Justin, > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. Applied to 6.8/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: ch: replace deprecated strncpy with strscpy

2023-11-15 Thread Martin K. Petersen
Justin, > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. Applied to 6.8/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: bnx2fc: replace deprecated strncpy with strscpy

2023-11-15 Thread Martin K. Petersen
Justin, > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. Applied to 6.8/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: 3w-sas: replace deprecated strncpy with strscpy

2023-11-15 Thread Martin K. Petersen
Justin, > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. Applied to 6.8/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2][next] hwmon: (aspeed-pwm-tacho) Fix -Wstringop-overflow warning in aspeed_create_fan_tach_channel()

2023-11-15 Thread Guenter Roeck
On Tue, Nov 14, 2023 at 01:53:08PM -0600, Gustavo A. R. Silva wrote: > Based on the documentation below, the maximum number of Fan tach > channels is 16: > > Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt:45: > 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. >