Re: [Xen-devel] [PATCH -tip v2 1/2] x86: xen: insn: Decode Xen and KVM emulate-prefix signature

2019-09-05 Thread Josh Poimboeuf
uot;^#include > [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]"' > +check arch/x86/lib/insn.c '-I "^#include > [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include > [\"<]\(../include/\)*asm/xen/prefix.h[\"

Re: [Xen-devel] [RFC PATCH 2/2] x86/xen: Make the secondary CPU idle tasks reliable

2020-03-16 Thread Josh Poimboeuf
On Mon, Mar 16, 2020 at 04:51:12PM +0100, Miroslav Benes wrote: > > diff --git a/arch/x86/xen/smp_pv.c b/arch/x86/xen/smp_pv.c > > index 6b88cdcbef8f..39afd88309cb 100644 > > --- a/arch/x86/xen/smp_pv.c > > +++ b/arch/x86/xen/smp_pv.c > > @@ -92,6 +92,7 @@ asmlinkage __visible void cpu_bringup_and_

Re: [RFC PATCH 04/28] x86/boot: Permit GOTPCREL relocations for x86_64 builds

2024-09-30 Thread Josh Poimboeuf
On Wed, Sep 25, 2024 at 05:01:04PM +0200, Ard Biesheuvel wrote: > + if (r_type == R_X86_64_GOTPCREL) { > + Elf_Shdr *s = &secs[sec->shdr.sh_info].shdr; > + unsigned file_off = offset - s->sh_addr + s->sh_offset; > + > + /* > +

Re: [RFC PATCH 24/28] tools/objtool: Treat indirect ftrace calls as direct calls

2024-10-01 Thread Josh Poimboeuf
On Wed, Sep 25, 2024 at 05:01:24PM +0200, Ard Biesheuvel wrote: > + if (insn->type == INSN_CALL_DYNAMIC) { > + if (!reloc) > + continue; > + > + /* > + * GCC 13 and older on x86 will always emit the

[PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-18 Thread Josh Poimboeuf
The startup_xen() kernel entry point is referenced by the ".note.Xen" section, but is presumably not indirect-branched to. Add ANNOTATE_ENDBR to silence future objtool warnings. Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Signed-of

Re: [PATCH v2 2/3] x86: fix setup of brk area

2022-06-29 Thread Josh Poimboeuf
Hi Juergen, It helps to actually Cc the person who broke it ;-) On Thu, Jun 23, 2022 at 11:46:07AM +0200, Juergen Gross wrote: > Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") > put the brk area into the .bss..brk section (placed directly behind > .bss), Hm? It didn't actua

Re: [PATCH v2 3/3] x86: fix .brk attribute in linker script

2022-06-29 Thread Josh Poimboeuf
32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") > Signed-off-by: Juergen Gross Reviewed-by: Josh Poimboeuf -- Josh

Re: objtool warning for next-20221118

2022-11-23 Thread Josh Poimboeuf
On Wed, Nov 23, 2022 at 10:52:09AM +, Andrew Cooper wrote: > > Well, if you return from arch_cpu_idle_dead() you're back in the idle > > loop -- exactly where you would be if you were to bootstrap the whole > > CPU -- provided you have it remember the whole state (easier with a > > vCPU). play

Re: objtool warning for next-20221118

2022-11-23 Thread Josh Poimboeuf
On Wed, Nov 23, 2022 at 09:03:40AM -0800, Josh Poimboeuf wrote: > On Wed, Nov 23, 2022 at 10:52:09AM +, Andrew Cooper wrote: > > > Well, if you return from arch_cpu_idle_dead() you're back in the idle > > > loop -- exactly where you would be if you were to boo

Re: objtool warning for next-20221118

2022-11-24 Thread Josh Poimboeuf
On Thu, Nov 24, 2022 at 08:47:47AM +0100, Juergen Gross wrote: > > > +++ b/arch/x86/xen/smp_pv.c > > > @@ -385,17 +385,9 @@ static void xen_pv_play_dead(void) /* used only > > > with HOTPLUG_CPU */ > > >   { > > >   play_dead_common(); > > >   HYPERVISOR_vcpu_op(VCPUOP_down, xen_vcpu_nr(smp

Re: [PATCH] x86: xen: remove STACK_FRAME_NON_STANDARD from xen_cpuid

2022-05-17 Thread Josh Poimboeuf
on. Hence, marking the function as STACKFRAME_NON_STANDARD is > no longer needed. > > This commit is basically a revert of commit 983bb6d254c7 ("x86/xen: Mark > xen_cpuid() stack frame as non-standard"). > > Signed-off-by: Maximilian Heyne > CC: Josh Poimboeuf

Re: [PATCH v2 00/12] x86: major paravirt cleanup

2020-12-15 Thread Josh Poimboeuf
On Tue, Dec 15, 2020 at 03:54:08PM +0100, Peter Zijlstra wrote: > The problem is that a single instance of unwind information (ORC) must > capture and correctly unwind all alternatives. Since the trivially > correct mandate is out, implement the straight forward brute-force > approach: > > 1) gen

Re: [PATCH v2 00/12] x86: major paravirt cleanup

2020-12-16 Thread Josh Poimboeuf
On Wed, Dec 16, 2020 at 09:40:59AM +0100, Peter Zijlstra wrote: > > So much algorithm. > > :-) > > It's not really hard, but it has a few pesky details (as always). It really hurt my brain to look at it. > > Could we make it easier by caching the shared > > per-alt-group CFI state somewhere alo

[PATCH 2/3] objtool: Add 'alt_group' struct

2020-12-22 Thread Josh Poimboeuf
Create a new struct associated with each group of alternatives instructions. This will help with the removal of fake jumps, and more importantly with adding support for stack layout changes in alternatives. Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 29

[PATCH 0/3] Alternatives vs ORC, a slightly easier way

2020-12-22 Thread Josh Poimboeuf
These patches replace Peter's "Alternatives vs ORC, the hard way". The end result should be the same (support for paravirt patching's using of alternatives which modify the stack). Josh Poimboeuf (3): objtool: Refactor ORC section generation objtool: Add 'alt_group&#

[PATCH 1/3] objtool: Refactor ORC section generation

2020-12-22 Thread Josh Poimboeuf
Decouple ORC entries from instructions. This simplifies the control/data flow, and is going to make it easier to support alternative instructions which change the stack layout. Signed-off-by: Josh Poimboeuf --- tools/objtool/Makefile | 4 - tools/objtool/arch.h| 4 - tools

[PATCH 3/3] objtool: Support stack layout changes in alternatives

2020-12-22 Thread Josh Poimboeuf
p struct) objtool can finally be rid of fake jumps, which were a constant source of headaches. [1] https://lkml.kernel.org/r/2020170536.arx2zbn4ngvjoov7@treble Cc: Shinichiro Kawasaki Signed-off-by: Josh Poimboeuf --- .../Documentation/stack-validation.txt| 16 +- t

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-04 Thread Josh Poimboeuf
On Mon, Jan 04, 2021 at 03:09:52PM +0100, Peter Zijlstra wrote: > On Tue, Dec 22, 2020 at 11:18:10PM -0600, Josh Poimboeuf wrote: > > > For example, this scenario is allowed: > > > > Alt1Alt2Alt3 > > > >

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-07 Thread Josh Poimboeuf
On Thu, Jan 07, 2021 at 02:22:27PM +0100, Miroslav Benes wrote: > On Tue, 22 Dec 2020, Josh Poimboeuf wrote: > > > BTW, another benefit of these changes is that, thanks to some related > > cleanups (new fake nops and alt_group struct) objtool can finally be rid > > of

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-13 Thread Josh Poimboeuf
On Fri, Jan 08, 2021 at 09:15:43AM +0100, Miroslav Benes wrote: > > That comment is indeed now obsolete. I can squash something like so: > > > > diff --git a/tools/objtool/check.c b/tools/objtool/check.c > > index 81d56fdef1c3..ce67437aaf3f 100644 > > --- a/tools/objtool/check.c > > +++ b/tools/o

Re: [PATCH v2 0/7] x86: retbleed=stuff fixes

2023-05-16 Thread Josh Poimboeuf
On Mon, Jan 16, 2023 at 03:25:33PM +0100, Peter Zijlstra wrote: > Hi all, > > Patches to address the various callthunk fails reported by Joan. > > The first two patches are new (and I've temporarily dropped the > restore_processor_state sealing). > > It is my understanding that AP bringup will a