lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210924005540.kunsfif7hdta6dlp@treble>
Date:   Thu, 23 Sep 2021 17:55:40 -0700
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Fenghua Yu <fenghua.yu@...el.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ