lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/8] tools/objtool: Check for use of the ENQCMD instruction in the kernel
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.

--
Josh

\
 
 \ /
  Last update: 2021-09-24 02:56    [W:0.102 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site