From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: x86@kernel.org, joao@overdrivepizza.com, hjl.tools@gmail.com,
andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org,
ndesaulniers@google.com, keescook@chromium.org,
samitolvanen@google.com, mark.rutland@arm.com,
alyssa.milburn@intel.com, mbenes@suse.cz, rostedt@goodmis.org,
mhiramat@kernel.org, alexei.starovoitov@gmail.com
Subject: Re: [PATCH v3 00/39] x86: Kernel IBT
Date: Fri, 4 Mar 2022 22:39:30 +0100 [thread overview]
Message-ID: <20220304213930.GS11184@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220304190958.comlw5wt7zdgeakc@treble>
On Fri, Mar 04, 2022 at 11:09:58AM -0800, Josh Poimboeuf wrote:
> On Thu, Mar 03, 2022 at 12:23:21PM +0100, Peter Zijlstra wrote:
> > Hi, another week, another series.
> >
> > Since last time:
> >
> > - fixed and tested kexec (redgecomb)
> > - s/4*HAS_KERNEL_IBT/ENDBR_INSN_SIZE/ (jpoimboe)
> > - re-arranged Xen patches to avoid churn (andyhpp)
> > - folded IBT_SEAL Kconfig and objtool options (jpoimboe)
> > - dropped direct call/jmp rewrite from objtool (jpoimboe)
> > - dropped UD1 poison (jpoimboe)
> > - fixed kprobe selftests (masami,naveen)
> > - fixed ftrace selftests (rostedt)
> > - simplified CET/INT3 selftests (jpoimboe)
> > - boot time msg on IBT (kees)
> > - objtool WARN_FUNC sym+off fallback (jpoimboe)
> > - picked up tags for unchanged patches
> > - probably more
> >
> > Supposedly clang-14-rc2 will work on this series, I'll validate the moment the
> > Debian package gets updated.
> >
> > 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'm getting some warnings with CONFIG_X86_KERNEL_IBT=n:
>
> arch/x86/entry/entry_64.o: warning: objtool: irq_entries_start()+0x7: unreachable instruction
> arch/x86/kernel/ftrace_64.o: warning: objtool: return_to_handler()+0x2a: unreachable instruction
Blergh, those are INT3 instructions, the first is the LDT stub padding
while the second is that INT3 you asked about earlier.
I can mark then all using SLS style rules, but that then triggers:
arch/x86/kernel/reboot.o: warning: objtool: native_machine_emergency_restart()+0x8f: BUG: why am I validating an ignored function?
which does horrible things on purpose to tickle a tripple fault in order
to reboot the machine.
Perhaps we should ignore INT3 by default, just like NOP ?
prev parent reply other threads:[~2022-03-04 21:39 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 11:23 [PATCH v3 00/39] x86: Kernel IBT Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 01/39] static_call: Avoid building empty .static_call_sites Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 02/39] x86/module: Fix the paravirt vs alternative order Peter Zijlstra
2022-03-08 13:58 ` [tip: x86/urgent] " tip-bot2 for Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 03/39] objtool: Add --dry-run Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 04/39] x86/ibt: Base IBT bits Peter Zijlstra
2022-03-07 11:17 ` Peter Zijlstra
2022-03-07 12:25 ` Joao Moreira
2022-03-07 18:19 ` Nick Desaulniers
2022-03-03 11:23 ` [PATCH v3 05/39] x86/ibt: Add ANNOTATE_NOENDBR Peter Zijlstra
2022-03-04 18:59 ` Josh Poimboeuf
2022-03-04 20:22 ` Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 06/39] x86/text-patching: Make text_gen_insn() play nice with ANNOTATE_NOENDBR Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 07/39] x86/ibt,paravirt: Use text_gen_insn() for paravirt_patch() Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 08/39] x86/entry: Cleanup PARAVIRT Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 09/39] x86/entry,xen: Early rewrite of restore_regs_and_return_to_kernel() Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 10/39] x86/ibt,xen: Sprinkle the ENDBR Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 11/39] x86/ibt,entry: Sprinkle ENDBR dust Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 12/39] x86/linkage: Add ENDBR to SYM_FUNC_START*() Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 13/39] x86/ibt,paravirt: Sprinkle ENDBR Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 14/39] x86/ibt,crypto: Add ENDBR for the jump-table entries Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 15/39] x86/ibt,kvm: Add ENDBR to fastops Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 16/39] x86/ibt,ftrace: Search for __fentry__ location Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 17/39] x86/livepatch: Validate " Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 18/39] x86/ibt,ftrace: Make function-graph play nice Peter Zijlstra
2022-03-04 17:51 ` Josh Poimboeuf
2022-03-04 19:48 ` Peter Zijlstra
2022-03-04 21:03 ` Josh Poimboeuf
2022-03-04 21:44 ` Peter Zijlstra
2022-03-04 22:05 ` Josh Poimboeuf
2022-03-04 23:08 ` David Laight
2022-03-03 11:23 ` [PATCH v3 19/39] x86/ibt,kprobes: Cure sym+0 equals fentry woes Peter Zijlstra
2022-03-07 9:44 ` Masami Hiramatsu
2022-03-03 11:23 ` [PATCH v3 20/39] x86/ibt,bpf: Add ENDBR instructions to prologue and trampoline Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 21/39] x86/ibt,ftrace: Add ENDBR to samples/ftrace Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 22/39] x86/ibt: Add IBT feature, MSR and #CP handling Peter Zijlstra
2022-03-04 17:57 ` Josh Poimboeuf
2022-03-04 20:38 ` Peter Zijlstra
2022-03-04 18:07 ` Josh Poimboeuf
2022-03-04 20:39 ` Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 23/39] x86/alternative: Simplify int3_selftest_ip Peter Zijlstra
2022-03-04 18:02 ` Josh Poimboeuf
2022-03-04 18:09 ` Josh Poimboeuf
2022-03-03 11:23 ` [PATCH v3 24/39] x86/ibt: Disable IBT around firmware Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 25/39] x86/bugs: Disable Retpoline when IBT Peter Zijlstra
2022-03-04 17:39 ` Josh Poimboeuf
2022-03-03 11:23 ` [PATCH v3 26/39] x86/ibt: Annotate text references Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 27/39] x86/ibt,ftrace: Annotate ftrace code patching Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 28/39] x86/ibt,sev: Annotations Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 29/39] x86/ibt: Dont generate ENDBR in .discard.text Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 30/39] x86/ibt: Ensure module init/exit points have references Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 31/39] objtool: Rename --duplicate to --lto Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 32/39] Kbuild: Allow whole module objtool runs Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 33/39] objtool: Read the NOENDBR annotation Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 34/39] objtool: Have WARN_FUNC fall back to sym+off Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 35/39] objtool: Add IBT/ENDBR decoding Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 36/39] objtool: Validate IBT assumptions Peter Zijlstra
2022-03-03 11:23 ` [PATCH v3 37/39] objtool: Optionally WARN about unused ANNOTATE_NOENDBR Peter Zijlstra
2022-03-04 18:27 ` Josh Poimboeuf
2022-03-03 11:23 ` [PATCH v3 38/39] objtool: Find unused ENDBR instructions Peter Zijlstra
2022-03-03 11:24 ` [PATCH v3 39/39] x86/alternative: Use .ibt_endbr_seal to seal indirect calls Peter Zijlstra
2022-03-04 19:09 ` [PATCH v3 00/39] x86: Kernel IBT Josh Poimboeuf
2022-03-04 20:22 ` Peter Zijlstra
2022-03-04 21:39 ` Peter Zijlstra [this message]
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=20220304213930.GS11184@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=alexei.starovoitov@gmail.com \
--cc=alyssa.milburn@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=hjl.tools@gmail.com \
--cc=joao@overdrivepizza.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mbenes@suse.cz \
--cc=mhiramat@kernel.org \
--cc=ndesaulniers@google.com \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.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;
as well as URLs for NNTP newsgroup(s).