[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YU0ihC6EYBZCSylV@otcwcpicx3.sc.intel.com>
Date: Fri, 24 Sep 2021 00:57:40 +0000
From: Fenghua Yu <fenghua.yu@...el.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...el.com>,
Tony Luck <tony.luck@...el.com>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
Dave Jiang <dave.jiang@...el.com>,
Jacob Jun Pan <jacob.jun.pan@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Ravi V Shankar <ravi.v.shankar@...el.com>,
iommu@...ts.linux-foundation.org, x86 <x86@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/8] tools/objtool: Check for use of the ENQCMD
instruction in the kernel
Hi, Josh,
On Thu, Sep 23, 2021 at 05:55:40PM -0700, Josh Poimboeuf wrote:
> On Thu, Sep 23, 2021 at 03:26:14PM +0000, Fenghua Yu wrote:
> > > > + } else if (op2 == 0x38 && op3 == 0xf8) {
> > > > + if (insn.prefixes.nbytes == 1 &&
> > > > + insn.prefixes.bytes[0] == 0xf2) {
> > > > + /* ENQCMD cannot be used in the kernel. */
> > > > + WARN("ENQCMD instruction at %s:%lx", sec->name,
> > > > + offset);
> > > > +
> > > > + return -1;
> > > > + }
> > >
> > > The only concern here is if we want it to be fatal or not. But otherwise
> > > this seems to be all that's required.
> >
> > objtool doesn't fail kernel build on this fatal warning.
> >
> > Returning -1 here stops checking the rest of the file and won't report any
> > further warnings unless this ENQCMD warning is fixed. Not returning -1
> > continues checking the rest of the file and may report more warnings.
> > Seems that's the only difference b/w them.
> >
> > Should I keep this "return -1" or not? Please advice.
>
> I'd say remove the "return -1" since it's not a fatal-type analysis
> error and there's nothing to prevent objtool from analyzing the rest of
> the file.
Sure. It does make sense to remove "return -1". I will remove it.
Thanks.
-Fenghua
Powered by blists - more mailing lists