Hopefully last posting... Since last time: - updated the ftrace_location() patch (naveen, rostedt) - added a few comments and clarifications (bpetkov) - disable jump-tables (joao) - verified clang-14-rc2 works - fixed a whole bunch of objtool unreachable insn issue - picked up a few more tags Patches go on top of tip/master + arm64/for-next/linkage. Also available here: git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt Enjoy!
On Tue, Mar 08, 2022 at 04:30:11PM +0100, Peter Zijlstra wrote: > Hopefully last posting... > > Since last time: > > - updated the ftrace_location() patch (naveen, rostedt) > - added a few comments and clarifications (bpetkov) > - disable jump-tables (joao) > - verified clang-14-rc2 works > - fixed a whole bunch of objtool unreachable insn issue > - picked up a few more tags > > Patches go on top of tip/master + arm64/for-next/linkage. Also available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt I've tried to test it. Applied the first 23 patches, since patch 24 failed to apply to bpf and bpf-next trees. selftest/bpf/test_progs shows that all bpf trampoline tests are failing and eventually the kernel is crashing: [ 53.040582] RIP: 0010:do_init_module+0x9/0x6f0 [ 53.052044] Call Trace: [ 53.052319] <TASK> [ 53.052559] bpf_trampoline_6442471381_0+0x32/0x1000 [ 53.053117] do_init_module+0x5/0x6f0 [ 53.053550] load_module+0x77c0/0x9c00 I havne't had time to debug what's going on.
On Tue, Mar 08, 2022 at 04:30:11PM +0100, Peter Zijlstra wrote: > Hopefully last posting... > > Since last time: > > - updated the ftrace_location() patch (naveen, rostedt) > - added a few comments and clarifications (bpetkov) > - disable jump-tables (joao) > - verified clang-14-rc2 works > - fixed a whole bunch of objtool unreachable insn issue > - picked up a few more tags > > Patches go on top of tip/master + arm64/for-next/linkage. Also available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt <applause> Nice work!!! kernel shadow stacks next? ;-) Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> As talked about on IRC there are still a few outstanding issues, that I'm fine with fixing after the merge window during the upcoming -next cycle: - xen hypercall page functions need 'ret' - (I think you already fixed) - why don't unreachables need to fill up the entire sym hole? - get rid of the 'c_file' hack - improve cmdline option intuitive-ness - properly integrate the retpoline "demotion" with the new Spectre BHI related patches - probably still needs more discussion - for example we might instead want to disable IBT and warn -- Josh
On Tue, Mar 08, 2022 at 12:06:18PM -0800, Josh Poimboeuf wrote: > As talked about on IRC there are still a few outstanding issues, that > I'm fine with fixing after the merge window during the upcoming -next > cycle: > > - xen hypercall page functions need 'ret' - (I think you already fixed) > > - why don't unreachables need to fill up the entire sym hole? > > - get rid of the 'c_file' hack > > - improve cmdline option intuitive-ness > > - properly integrate the retpoline "demotion" with the new Spectre BHI > related patches - probably still needs more discussion - for example > we might instead want to disable IBT and warn One more: - Changing objtool should force a vmlinux re-link. -- Josh
From: Josh Poimboeuf > Sent: 09 March 2022 06:57 > > On Tue, Mar 08, 2022 at 12:06:18PM -0800, Josh Poimboeuf wrote: > > As talked about on IRC there are still a few outstanding issues, that > > I'm fine with fixing after the merge window during the upcoming -next > > cycle: > > > > - xen hypercall page functions need 'ret' - (I think you already fixed) > > > > - why don't unreachables need to fill up the entire sym hole? > > > > - get rid of the 'c_file' hack > > > > - improve cmdline option intuitive-ness > > > > - properly integrate the retpoline "demotion" with the new Spectre BHI > > related patches - probably still needs more discussion - for example > > we might instead want to disable IBT and warn > > One more: > > - Changing objtool should force a vmlinux re-link. I'm wondering what actually happens to loadable modules? Especially those built 'out of tree', potentially with a different compiler, and maybe containing binary 'blobs'. The requirement to run programs on old distributions means that things get compiled with quite old versions of gcc. For instance RHEL7 is gcc 4.8.5. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
On Tue, 8 Mar 2022, Peter Zijlstra wrote: > Hopefully last posting... > > Since last time: > > - updated the ftrace_location() patch (naveen, rostedt) > - added a few comments and clarifications (bpetkov) > - disable jump-tables (joao) > - verified clang-14-rc2 works > - fixed a whole bunch of objtool unreachable insn issue > - picked up a few more tags > > Patches go on top of tip/master + arm64/for-next/linkage. Also available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt FWIW objtool changes look good to me. I only came across arch/x86/kernel/head_64.o: warning: objtool: .noinstr.text: unexpected end of section with CC_HAS_IBT=n, which you already know about. CC_HAS_IBT=y compilation gives vmlinux.o: warning: objtool: xen_vcpu_setup()+0xa3: unreachable instruction Miroslav
© 2016 - 2026 Red Hat, Inc.