[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220824194349.GB25951@gate.crashing.org>
Date: Wed, 24 Aug 2022 14:43:49 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>,
Michael Matz <matz@...e.de>, linux-toolchains@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/sev: Mark snp_abort() noreturn
On Wed, Aug 24, 2022 at 11:44:35AM -0700, Nick Desaulniers wrote:
> On Wed, Aug 24, 2022 at 10:33 AM Segher Boessenkool
> <segher@...nel.crashing.org> wrote:
> > On Wed, Aug 24, 2022 at 05:24:20PM +0200, Borislav Petkov wrote:
> > > Mark both the function prototype and definition as noreturn in order to
> > > prevent the compiler from doing transformations which confuse objtool
> > > like so:
> > >
> > > vmlinux.o: warning: objtool: sme_enable+0x71: unreachable instruction
> >
> > Would -Wmissing-noreturn have caught this?
>
> Oh, that's shiny. Is that relatively new?
Relatively, yes.
commit 0ca3fb0a168e9db2bd5405855d3932f62b08b7c9
Author: Kaveh R. Ghazi <ghazi@...p.rutgers.edu>
Date: Tue Oct 20 07:32:08 1998 +0000
New warning, `missing-noreturn':
The alias -Wsuggest-attribute=noreturn is newer:
commit 94ee697923f5a93881edbc5e1b3f810b290f0fc7
Author: Manuel López-Ibáñez <manu@....gnu.org>
Date: Sun Apr 29 09:15:30 2012 +0000
* common.opt (Wmissing-noreturn): Alias of -Wsuggest-attribute=noret
Segher
Powered by blists - more mailing lists