From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Pengfei Xu <pengfei.xu@intel.com>,
"Yang, Weijiang" <weijiang.yang@intel.com>,
"Su, Heng" <heng.su@intel.com>,
linux-kernel@vger.kernel.org,
Josh Poimboeuf <jpoimboe@redhat.com>,
pbonzini@redhat.com, x86@kernel.org
Subject: Re: [PATCH] x86/kvm, objtool: Avoid fastop ENDBR from being sealed
Date: Thu, 18 Aug 2022 08:17:05 -0700 [thread overview]
Message-ID: <20220818151705.alu2y52rknp2mgsa@treble> (raw)
In-Reply-To: <Yv4dKABja9CxqcDS@worktop.programming.kicks-ass.net>
On Thu, Aug 18, 2022 at 01:06:16PM +0200, Peter Zijlstra wrote:
> On Thu, Aug 18, 2022 at 03:38:45PM +0800, Pengfei Xu wrote:
> > And this "Missing ENDBR: andw_ax_dx+0x0/0x10 [kvm]" issue was
> > reproduced again after ran syzkaller 5min on ADL-P.
>
> Ha, indeed :/
>
> > > > +/*
> > > > + * Create a dummy function pointer reference to prevent objtool from marking
> > > > + * the function as needing to be "sealed" (i.e. ENDBR converted to NOP by
> > > > + * apply_ibt_endbr()).
> > > > + */
> > > > +#define IBT_NOSEAL(fname) \
> > > > + ".pushsection .discard.endbr.noseal\n\t" \
> > > > + _ASM_PTR fname "\n\t" \
> > > > + ".popsection\n\t"
> > > > +
>
> objtool/check.c:validate_ibt():
>
> if (!strncmp(sec->name, ".discard", 8) ||
> ...)
> continue;
>
> So yeah, that'll just get ignored. So at the very least we need to
> special case this section.
Indeed. I swear that patch worked last night.
I also found that not all fastops use __FOP_FUNC().
Anyway I'll post a new (official) pair of patches shortly.
--
Josh
next prev parent reply other threads:[~2022-08-18 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <PH0PR11MB4839B4D2FB8B8D8D52A62C7F9A629@PH0PR11MB4839.namprd11.prod.outlook.com>
2022-08-17 10:56 ` Peter Zijlstra
2022-08-17 16:26 ` [tip: core/urgent] " tip-bot2 for Peter Zijlstra
2022-08-18 1:10 ` [PATCH] " Josh Poimboeuf
2022-08-18 7:28 ` Peter Zijlstra
2022-08-18 7:38 ` Pengfei Xu
2022-08-18 11:06 ` Peter Zijlstra
2022-08-18 15:17 ` Josh Poimboeuf [this message]
2022-08-18 5:04 ` Pengfei Xu
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=20220818151705.alu2y52rknp2mgsa@treble \
--to=jpoimboe@kernel.org \
--cc=heng.su@intel.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=pengfei.xu@intel.com \
--cc=peterz@infradead.org \
--cc=weijiang.yang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®