All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, rick.p.edgecombe@intel.com
Subject: Re: [PATCH 3/4] x86,objtool: Mark cpu_startup_entry() __noreturn
Date: Mon, 11 Apr 2022 13:32:37 -0700	[thread overview]
Message-ID: <20220411203237.v2eqjiee4kcmug6s@treble> (raw)
In-Reply-To: <20220408094718.383658532@infradead.org>

On Fri, Apr 08, 2022 at 11:45:55AM +0200, Peter Zijlstra wrote:
> GCC-8 isn't clever enough to figure out that cpu_start_entry() is a
> noreturn while objtool is. This results in code after the call in
> start_secondary(). Give GCC a hand so that they all agree on things.
> 
>   vmlinux.o: warning: objtool: start_secondary()+0x10e: unreachable
> 
> Reported-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  include/linux/cpu.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/include/linux/cpu.h
> +++ b/include/linux/cpu.h
> @@ -167,7 +167,7 @@ static inline int suspend_disable_second
>  static inline void suspend_enable_secondary_cpus(void) { }
>  #endif /* !CONFIG_PM_SLEEP_SMP */
>  
> -void cpu_startup_entry(enum cpuhp_state state);
> +void __noreturn cpu_startup_entry(enum cpuhp_state state);
>  
>  void cpu_idle_poll_ctrl(bool enable);

I just ran into this:

  init/main.o: warning: objtool: rest_init() falls through to next function kernel_init()

so we need this as well:

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 565fec451d69..fab2235599a0 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -184,6 +184,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
                "do_group_exit",
                "stop_this_cpu",
                "__invalid_creds",
+               "cpu_startup_entry",
        };

        if (!func)


  reply	other threads:[~2022-04-11 20:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  9:45 [PATCH 0/4] objtool: Fixes Peter Zijlstra
2022-04-08  9:45 ` [PATCH 1/4] lib/strn*,objtool: Enforce user_access_begin() rules Peter Zijlstra
2022-04-08 14:09   ` Josh Poimboeuf
2022-04-19 20:08   ` [tip: x86/urgent] " tip-bot2 for Peter Zijlstra
2022-04-08  9:45 ` [PATCH 2/4] x86,xen,objtool: Add UNWIND hint Peter Zijlstra
2022-04-19 20:08   ` [tip: x86/urgent] " tip-bot2 for Peter Zijlstra
2022-04-08  9:45 ` [PATCH 3/4] x86,objtool: Mark cpu_startup_entry() __noreturn Peter Zijlstra
2022-04-11 20:32   ` Josh Poimboeuf [this message]
2022-04-12 15:13   ` Josh Poimboeuf
2022-04-19 20:08   ` [tip: x86/urgent] " tip-bot2 for Peter Zijlstra
2022-04-08  9:45 ` [PATCH 4/4] x86,objtool: Explicitly mark idtentry_body()s tail REACHABLE Peter Zijlstra
2022-04-19 20:08   ` [tip: x86/urgent] " tip-bot2 for Peter Zijlstra
2022-04-08 14:10 ` [PATCH 0/4] objtool: Fixes Josh Poimboeuf

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=20220411203237.v2eqjiee4kcmug6s@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --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 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.