[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y0CKz/wjvYYYgH3P@hirez.programming.kicks-ass.net>
Date: Fri, 7 Oct 2022 22:23:43 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: "Li, Xin3" <xin3.li@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 6/6] x86/gsseg: use the LKGS instruction if available for
load_gs_index()
On Fri, Oct 07, 2022 at 01:03:12PM -0700, H. Peter Anvin wrote:
> On October 7, 2022 12:24:13 PM PDT, Peter Zijlstra <peterz@...radead.org> wrote:
> >On Fri, Oct 07, 2022 at 06:01:06PM +0000, Li, Xin3 wrote:
> >> > > + alternative_io("1: call asm_load_gs_index\n"
> >> > > + ".pushsection \".fixup\",\"ax\"\n"
> >> > > + "2: xorl %k[sel], %k[sel]\n"
> >> > > + " jmp 1b\n"
> >> > > + ".popsection\n"
> >> > > + _ASM_EXTABLE(1b, 2b),
> >> > > + _ASM_BYTES(0x3e) LKGS_DI,
> >> > > + X86_FEATURE_LKGS,
> >> > > + ASM_OUTPUT2([sel] "+D" (sel), ASM_CALL_CONSTRAINT),
> >> > > + ASM_NO_INPUT_CLOBBER(_ASM_AX));
> >> > > }
> >> >
> >> > I'm very sure none of this was tested... the .fixup section hasn't existed for
> >> > almost a year now.
> >>
> >> Weird, did you ever check a kernel dump?
> >
> >$ readelf -WS defconfig-build/vmlinux | grep fixup
> >[ 5] .pci_fixup PROGBITS ffffffff826a5350 18a5350 003570 00 A 0 0 16
> >[ 6] .rela.pci_fixup RELA 0000000000000000 360c388 005028 18 I 60 5 8
> >
> >In fact, when I add one I get:
> >
> >ld: warning: orphan section `.fixup' from `arch/x86/kernel/traps.o' being placed in section `.fixup'
>
> Perhaps the two of you need to compare confugurations?
Whatever for? I know the robots report this warning because there was
one from the KVM cross-merge when the .fixup removal went in. It got
reported and fixed and that was the last of it.
Anyway; try:
$ git grep "\.fixup" arch/x86/
there isn't a single usage.
Andrew Cooper suggested upgrading the orphan section warning to a hard
link error, orphan sections are bad regardless.
Powered by blists - more mailing lists