mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikolay Borisov <nik.borisov@suse.com>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, kees@kernel.org, bp@alien8.de,
	Nikolay Borisov <nik.borisov@suse.com>
Subject: [PATCH] x86/boot: Remove unused function __fortify_panic()
Date: Mon, 10 Jun 2024 14:57:22 +0300	[thread overview]
Message-ID: <20240610115722.107780-1-nik.borisov@suse.com> (raw)

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


             reply	other threads:[~2024-06-10 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 11:57 Nikolay Borisov [this message]
2024-06-10 16:29 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240610115722.107780-1-nik.borisov@suse.com \
    --to=nik.borisov@suse.com \
    --cc=bp@alien8.de \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®