[PATCH 5.15 01/87] gcc-plugins: Rename last_stmt() for GCC 14+

2024-07-25 Thread Greg Kroah-Hartman
5.15-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook commit 2e3f65ccfe6b0778b261ad69c9603ae85f210334 upstream. In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper macro to handle the renaming. Cc: linux-hardening@

[PATCH 5.10 01/59] gcc-plugins: Rename last_stmt() for GCC 14+

2024-07-25 Thread Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook commit 2e3f65ccfe6b0778b261ad69c9603ae85f210334 upstream. In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper macro to handle the renaming. Cc: linux-hardening@

[PATCH 5.4 01/43] gcc-plugins: Rename last_stmt() for GCC 14+

2024-07-25 Thread Greg Kroah-Hartman
5.4-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook commit 2e3f65ccfe6b0778b261ad69c9603ae85f210334 upstream. In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper macro to handle the renaming. Cc: linux-hardening@v

[PATCH 4.19 01/33] gcc-plugins: Rename last_stmt() for GCC 14+

2024-07-25 Thread Greg Kroah-Hartman
4.19-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook commit 2e3f65ccfe6b0778b261ad69c9603ae85f210334 upstream. In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper macro to handle the renaming. Cc: linux-hardening@

Re: [PATCH] leds: gpio: Set num_leds after allocation

2024-07-25 Thread Lee Jones
On Tue, 16 Jul 2024, Gustavo A. R. Silva wrote: > > > On 16/07/24 15:24, Kees Cook wrote: > > With the new __counted_by annotation, the "num_leds" variable needs to > > valid for accesses to the "leds" array. This requirement is not met in > > gpio_leds_create(), since "num_leds" starts at "0",

[PATCH 2/2] coccinelle: Add rules to find str_up_down() replacements

2024-07-25 Thread Michal Wajdeczko
Add rules for finding places where str_up_down() can be used. This currently finds over 20 locations. Signed-off-by: Michal Wajdeczko --- Cc: Kees Cook Cc: Andy Shevchenko --- ./drivers/net/bonding/bond_sysfs.c:511:32-38: opportunity for str_up_down(active) ./drivers/net/bonding/bond_procfs.c:

[PATCH 1/2] lib/string_choices: Add str_up_down() helper

2024-07-25 Thread Michal Wajdeczko
Add str_up_down() helper to return "up" or "down" string literal. Signed-off-by: Michal Wajdeczko --- Cc: Kees Cook Cc: Andy Shevchenko --- include/linux/string_choices.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h in