On 29.05.24 г. 21:09 ч., Jeff Johnson wrote:
As discussed in [1] add a prototype for __fortify_panic() to fix the
'make W=1 C=1' warning:
arch/x86/boot/compressed/misc.c:535:6: warning: symbol '__fortify_panic' was not declared. Should it be static?
Actually doesn't it make sense to have this defined under ../string.h ?
Actually given that we don't have any string fortification under the
boot/ why have the fortify _* functions at all ?
Link: https://lore.kernel.org/all/79653cc7-6e59-4657-9c0a-76f49f49d019@xxxxxxxxxxx/ [1]
Signed-off-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>
---
arch/x86/boot/compressed/misc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index b353a7be380c..3a56138484a9 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -68,6 +68,7 @@ void __putdec(unsigned long value);
#define error_putstr(__x) __putstr(__x)
#define error_puthex(__x) __puthex(__x)
#define error_putdec(__x) __putdec(__x)
+void __fortify_panic(const u8 reason, size_t avail, size_t size);
#ifdef CONFIG_X86_VERBOSE_BOOTUP
---
base-commit: e0cce98fe279b64f4a7d81b7f5c3a23d80b92fbc
change-id: 20240529-fortify_panic-325601efe71d