All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: <linux-hardening@vger.kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Subject: __fortify_panic() question
Date: Wed, 29 May 2024 07:36:25 -0700	[thread overview]
Message-ID: <79653cc7-6e59-4657-9c0a-76f49f49d019@quicinc.com> (raw)

'make W=1 C=1' on x86 gives the warning:
arch/x86/boot/compressed/misc.c:535:6: warning: symbol '__fortify_panic' was not declared. Should it be static?

Looking at this I see for ARM there is a prototype for __fortify_panic() in
arch/arm/boot/compressed/misc.h
And there is a matching implementation in arch/arm/boot/compressed/misc.c

But for x86 there is only the implementation in
arch/x86/boot/compressed/misc.c
There is not a prototype in arch/x86/boot/compressed/misc.h.

The easy fix for this would be to add a prototype to
arch/x86/boot/compressed/misc.h.

But it seems strange to me to add a prototype to a header file that is only 
for the benefit of the callee and is not the prototype/header used by the 
caller, in this case the one in include/linux/fortify-string.h

Is there a reason this prototype can't be defined in a single header file that 
is then included by all callers and callees?

/jeff

             reply	other threads:[~2024-05-29 14:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 14:36 Jeff Johnson [this message]
2024-05-29 16:55 ` __fortify_panic() question Kees Cook
2024-05-29 17:09   ` Jeff Johnson
2024-05-29 17:18     ` Kees Cook

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=79653cc7-6e59-4657-9c0a-76f49f49d019@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.