* [PATCH] x86/boot: Remove unused function __fortify_panic()
@ 2024-06-10 11:57 Nikolay Borisov
2024-06-10 16:29 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Borisov @ 2024-06-10 11:57 UTC (permalink / raw)
To: x86; +Cc: linux-kernel, kees, bp, Nikolay Borisov
That functino is only used when the kernel is compiled with
FORTIFY_SOURCE and when the kernel proper string.h header is used. The
decompressor code doesn't use the kernel proper header but has local
copy which doesn't contain any fortified implementations of the various
string functions. As such __fortify_panic can never be called from the
decompressor so let's remove it.
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
arch/x86/boot/compressed/misc.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index b70e4a21c15f..944454306ef4 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -531,8 +531,3 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output)
return output + entry_offset;
}
-
-void __fortify_panic(const u8 reason, size_t avail, size_t size)
-{
- error("detected buffer overflow");
-}
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/boot: Remove unused function __fortify_panic()
2024-06-10 11:57 [PATCH] x86/boot: Remove unused function __fortify_panic() Nikolay Borisov
@ 2024-06-10 16:29 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2024-06-10 16:29 UTC (permalink / raw)
To: Nikolay Borisov; +Cc: x86, linux-kernel, kees
On Mon, Jun 10, 2024 at 02:57:22PM +0300, Nikolay Borisov wrote:
> That functino is only used when the kernel is compiled with
^^^^^^^^^
Please introduce a spellchecker into your patch creation workflow.
Like, run the thing through the spellchecker on the system or you can
even use my python script which checks patches and can do that for you:
https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=vp
> FORTIFY_SOURCE and when the kernel proper string.h header is used. The
> decompressor code doesn't use the kernel proper header but has local
> copy which doesn't contain any fortified implementations of the various
> string functions. As such __fortify_panic can never be called from the
> decompressor so let's remove it.
Yap, might as well whack it.
We can always resurrect it if it is really needed as it is trivial.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-10 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10 11:57 [PATCH] x86/boot: Remove unused function __fortify_panic() Nikolay Borisov
2024-06-10 16:29 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®