lkml.org 
[lkml]   [2022]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/kvm, objtool: Avoid fastop ENDBR from being sealed
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.

\
 
 \ /
  Last update: 2022-08-18 13:07    [W:0.056 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site