Re: [PATCH v2] power: supply: surface_battery: replace deprecated strncpy with strscpy

2023-10-21 Thread Maximilian Luz
ed-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-hardening@vger.kernel.org Signed-off-by: Justin Stitt Thanks! Reviewed-by: Maximilian Luz Tested-by: Maximilian Luz --- Changes in v2: - fix subjec

Re: [PATCH] power: supply: surface-charger: replace deprecated strncpy with strscpy

2023-10-21 Thread Maximilian Luz
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-hardening@vger.kernel.org Signed-off-by: Justin Stitt Thanks! Reviewed-by: Maximilian Luz

Re: [PATCH] platform/surface: aggregator: Annotate struct ssam_event with __counted_by

2023-09-24 Thread Maximilian Luz
CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct ssam_event. [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Cc: Maximilian Luz Cc: platform-driver-...@vger.kernel.org Signed-off-by: Kees Cook