Re: Coverity: __do_sys_pidfd_send_signal(): UNINIT

2024-02-13 Thread Tycho Andersen
On Tue, Feb 13, 2024 at 03:59:37PM -0800, coverity-bot wrote: > Hello! > > This is an experimental semi-automated report about issues detected by > Coverity from a scan of next-20240213 as part of the linux-next scan project: > https://scan.coverity.com/projects/linux-next-weekly-s

Coverity: __do_sys_pidfd_send_signal(): UNINIT

2024-02-13 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20240213 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

[PATCH v2 0/2] stddef: Allow attributes to be used when creating flex arrays

2024-02-13 Thread Kees Cook
v2: - don't add a new helper, just add __VA_ARGS__ (Rasmus) v1: https://lore.kernel.org/all/20240210011452.work.985-k...@kernel.org/ Hi, We're going to have more cases where we need to apply attributes (e.g. __counted_by) to struct members that have been declared with DECLARE_FLEX_ARRAY. Add an

[PATCH v2 2/2] net/ipv4: Annotate imsf_slist_flex with __counted_by(imsf_numsrc)

2024-02-13 Thread Kees Cook
The size of the imsf_slist_flex member is determined by imsf_numsrc, so annotate it as such. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Paolo Abeni Cc: net...@vger.kernel.org Cc: linux-hardening@vger.kernel.org Acked-by: Jakub Kicinski Reviewed-by: "Gustavo A. R. Silva" Signed-off-by: Kees Co

[PATCH v2 1/2] stddef: Allow attributes to be used when creating flex arrays

2024-02-13 Thread Kees Cook
With the coming support for the __counted_by struct member attribute, we will need a way to add such annotations to the places where DECLARE_FLEX_ARRAY() is used. Add an optional 3rd argument that can be used for including attributes in the flexible array definition. Cc: Rasmus Villemoes Cc: Dan

Re: [PATCH 1/2] stddef: Allow attributes to be used when creating flex arrays

2024-02-13 Thread Kees Cook
On Tue, Feb 13, 2024 at 08:22:00AM +0100, Rasmus Villemoes wrote: > On 10/02/2024 02.16, Kees Cook wrote: > > With the coming support for the __counted_by struct member attribute, we > > will need a way to add such annotations to the places where > > DECLARE_FLEX_ARRAY() is used. Introduce DECLARE_

[PATCH v6 1/3] overflow: Adjust check_*_overflow() kern-doc to reflect results

2024-02-13 Thread Kees Cook
The check_*_overflow() helpers will return results with potentially wrapped-around values. These values have always been checked by the selftests, so avoid the confusing language in the kern-doc. The idea of "safe for use" was relative to the expectation of whether or not the caller wants a wrapped

[PATCH v6 2/3] overflow: Introduce wrapping_add(), wrapping_sub(), and wrapping_mul()

2024-02-13 Thread Kees Cook
Provide helpers that will perform wrapping addition, subtraction, or multiplication without tripping the arithmetic wrap-around sanitizers. The first argument is the type under which the wrap-around should happen with. In other words, these two calls will get very different results: wrappi

[PATCH v6 0/3] overflow: Introduce wrapping helpers

2024-02-13 Thread Kees Cook
v6: rename wrapping_inc/dec to wraping_assign_add/sub (andy) v5: https://lore.kernel.org/all/20240207152317.do.560-k...@kernel.org/ v4: https://lore.kernel.org/all/20240206102354.make.081-k...@kernel.org/ v3: https://lore.kernel.org/all/20240205090854.make.507-k...@kernel.org/ v2: https://lore.kern

[PATCH v6 3/3] overflow: Introduce wrapping_assign_add() and wrapping_assign_sub()

2024-02-13 Thread Kees Cook
This allows replacements of the idioms "var += offset" and "var -= offset" with the wrapping_assign_add() and wrapping_assign_sub() helpers respectively. They will avoid wrap-around sanitizer instrumentation. Add to the selftests to validate behavior and lack of side-effects. Cc: Rasmus Villemoes

Re: (subset) [PATCH 0/7] Xperia 1 V support

2024-02-13 Thread Mark Brown
On Mon, 12 Feb 2024 14:10:08 +0100, Konrad Dybcio wrote: > DTS for the phone and some fly-by fixes > > Patch 1 for Mark/sound > Rest for qcom > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/7] dt-bindings: ASoC: cs35l45: Add interrupts

[PATCH v2] fs/ntfs3: use kcalloc() instead of kzalloc()

2024-02-13 Thread Lenko Donchev
We are trying to get rid of all multiplications from allocation functions to prevent integer overflows[1]. Here the multiplication is obviously safe, but using kcalloc() is more appropriate and improves readability. This patch has no effect on runtime behavior. Link: https://github.com/KSPP/linux/