[PATCH v3 00/26] objtool: vmlinux.o and noinstr validation

From: Peter Zijlstra
Date: Tue Mar 24 2020 - 12:13:20 EST


Hi all,

Once more, more patches... up 7 from last time.

As should be familiar by now; these patches implement the noinstr
(no-instrument) validation in objtool as requested by Thomas, to ensure
critical code (entry for now, idle later) run no unexpected code.

Functions are marked with: noinstr, which implies notrace, noinline and sticks
things in the .noinstr.text section. Such functions can then use instr_begin()
and instr_end() to allow calls to code outside of this section in sanctioned
areas.

Since a RELA does not include section information, we need to run objtool on
a vmlinux.o which includes all relevant functions; so the first 'few' patches
optimize objtool to allow running on vmlinux.o.

This all is starting to look good and barring any show-stoppers the plan is to
get this merged soonish. There's one wobbly in patch 18, Josh any
suggestions -- all I could come up with was ugleh.