[PATCH] acl: Annotate struct posix_acl with __counted_by()

2024-09-23 Thread Thorsten Blum
Add the __counted_by compiler attribute to the flexible array member a_entries to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Use struct_size() to calculate the number of bytes to allocate for new and cloned acls and remove the local size variables. Change th

Re: [PATCH v2] HID: ishtp-hid-client: replace fake-flex arrays with flex-array members

2024-09-23 Thread srinivas pandruvada
On Sun, 2024-09-22 at 17:22 -0700, Kees Cook wrote: > From: Erick Archer > > One-element arrays as fake flex arrays are deprecated[1] as the > kernel > has switched to C99 flexible-array members instead. This case, > however, > has more complexity because it is a flexible array of flexible arrays

Re: [PATCH -next v3 01/10] coccinelle: Add rules to find str_true_false() replacements

2024-09-23 Thread Julia Lawall
Thanks for testing it. I will see if there is some other way to improve the performance. Sent from my iPhone > On 23 Sep 2024, at 09:01, Hongbo Li wrote: > >  > >> On 2024/9/19 14:25, Julia Lawall wrote: >>> On Wed, 11 Sep 2024, Hongbo Li wrote: >>> After str_true_false() has been introduced

Re: [PATCH -next v3 01/10] coccinelle: Add rules to find str_true_false() replacements

2024-09-23 Thread Hongbo Li
On 2024/9/19 14:25, Julia Lawall wrote: On Wed, 11 Sep 2024, Hongbo Li wrote: After str_true_false() has been introduced in the tree, we can add rules for finding places where str_true_false() can be used. A simple test can find over 10 locations. Signed-off-by: Hongbo Li --- scripts/c