<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/objtool/include, branch v5.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-01-13T00:31:19Z</updated>
<entry>
<title>Merge tag 'x86_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2022-01-13T00:31:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-01-13T00:31:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64ad9461521b1a357846ef6cedc4bccd48a046e0'/>
<id>urn:sha1:64ad9461521b1a357846ef6cedc4bccd48a046e0</id>
<content type='text'>
Pull x86 core updates from Borislav Petkov:

 - Get rid of all the .fixup sections because this generates
   misleading/wrong stacktraces and confuse RELIABLE_STACKTRACE and
   LIVEPATCH as the backtrace misses the function which is being fixed
   up.

 - Add Straight Line Speculation mitigation support which uses a new
   compiler switch -mharden-sls= which sticks an INT3 after a RET or an
   indirect branch in order to block speculation after them. Reportedly,
   CPUs do speculate behind such insns.

 - The usual set of cleanups and improvements

* tag 'x86_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
  x86/entry_32: Fix segment exceptions
  objtool: Remove .fixup handling
  x86: Remove .fixup section
  x86/word-at-a-time: Remove .fixup usage
  x86/usercopy: Remove .fixup usage
  x86/usercopy_32: Simplify __copy_user_intel_nocache()
  x86/sgx: Remove .fixup usage
  x86/checksum_32: Remove .fixup usage
  x86/vmx: Remove .fixup usage
  x86/kvm: Remove .fixup usage
  x86/segment: Remove .fixup usage
  x86/fpu: Remove .fixup usage
  x86/xen: Remove .fixup usage
  x86/uaccess: Remove .fixup usage
  x86/futex: Remove .fixup usage
  x86/msr: Remove .fixup usage
  x86/extable: Extend extable functionality
  x86/entry_32: Remove .fixup usage
  x86/entry_64: Remove .fixup usage
  x86/copy_mc_64: Remove .fixup usage
  ...
</content>
</entry>
<entry>
<title>objtool, kcsan: Remove memory barrier instrumentation from noinstr</title>
<updated>2021-12-10T00:42:28Z</updated>
<author>
<name>Marco Elver</name>
<email>elver@google.com</email>
</author>
<published>2021-11-30T11:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0509811952e41ad1e04c50d2378078250b6b7be3'/>
<id>urn:sha1:0509811952e41ad1e04c50d2378078250b6b7be3</id>
<content type='text'>
Teach objtool to turn instrumentation required for memory barrier
modeling into nops in noinstr text.

The __tsan_func_entry/exit calls are still emitted by compilers even
with the __no_sanitize_thread attribute. The memory barrier
instrumentation will be inserted explicitly (without compiler help), and
thus needs to also explicitly be removed.

Signed-off-by: Marco Elver &lt;elver@google.com&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>objtool: Add straight-line-speculation validation</title>
<updated>2021-12-08T18:26:50Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-12-04T13:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1cc1e4c8aab4213bd4e6353dec2620476a233d6d'/>
<id>urn:sha1:1cc1e4c8aab4213bd4e6353dec2620476a233d6d</id>
<content type='text'>
Teach objtool to validate the straight-line-speculation constraints:

 - speculation trap after indirect calls
 - speculation trap after RET

Notable: when an instruction is annotated RETPOLINE_SAFE, indicating
  speculation isn't a problem, also don't care about sls for that
  instruction.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20211204134908.023037659@infradead.org
</content>
</entry>
<entry>
<title>objtool,x86: Replace alternatives with .retpoline_sites</title>
<updated>2021-10-28T21:25:25Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-10-26T12:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=134ab5bd1883312d7a4b3033b05c6b5a1bb8889b'/>
<id>urn:sha1:134ab5bd1883312d7a4b3033b05c6b5a1bb8889b</id>
<content type='text'>
Instead of writing complete alternatives, simply provide a list of all
the retpoline thunk calls. Then the kernel is free to do with them as
it pleases. Simpler code all-round.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Tested-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/r/20211026120309.850007165@infradead.org
</content>
</entry>
<entry>
<title>objtool: Shrink struct instruction</title>
<updated>2021-10-28T21:25:25Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-10-26T12:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c509331b41b7365e17396c246e8c5797bccc8074'/>
<id>urn:sha1:c509331b41b7365e17396c246e8c5797bccc8074</id>
<content type='text'>
Any one instruction can only ever call a single function, therefore
insn-&gt;mcount_loc_node is superfluous and can use insn-&gt;call_node.

This shrinks struct instruction, which is by far the most numerous
structure objtool creates.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Tested-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/r/20211026120309.785456706@infradead.org
</content>
</entry>
<entry>
<title>objtool: Classify symbols</title>
<updated>2021-10-28T21:25:24Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-10-26T12:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1739c66eb7bd5f27f1b69a5a26e10e8327d1e136'/>
<id>urn:sha1:1739c66eb7bd5f27f1b69a5a26e10e8327d1e136</id>
<content type='text'>
In order to avoid calling str*cmp() on symbol names, over and over, do
them all once upfront and store the result.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Tested-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/r/20211026120309.658539311@infradead.org
</content>
</entry>
<entry>
<title>Merge branch 'objtool/urgent'</title>
<updated>2021-10-06T22:40:17Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-10-06T22:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c'/>
<id>urn:sha1:b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c</id>
<content type='text'>
Fixup conflicts.

# Conflicts:
#	tools/objtool/check.c
</content>
</entry>
<entry>
<title>objtool: Remove redundant 'len' field from struct section</title>
<updated>2021-10-05T19:03:21Z</updated>
<author>
<name>Joe Lawrence</name>
<email>joe.lawrence@redhat.com</email>
</author>
<published>2021-08-22T22:50:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe255fe6ad97685e5a4be0d871f43288dbc10ad6'/>
<id>urn:sha1:fe255fe6ad97685e5a4be0d871f43288dbc10ad6</id>
<content type='text'>
The section structure already contains sh_size, so just remove the extra
'len' member that requires extra mirroring and potential confusion.

Suggested-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Joe Lawrence &lt;joe.lawrence@redhat.com&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20210822225037.54620-3-joe.lawrence@redhat.com
Cc: Andy Lavr &lt;andy.lavr@gmail.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
</content>
</entry>
<entry>
<title>objtool: Support pv_opsindirect calls for noinstr</title>
<updated>2021-09-17T11:20:26Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-06-24T09:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db2b0c5d7b6f19b3c2cab08c531b65342eb5252b'/>
<id>urn:sha1:db2b0c5d7b6f19b3c2cab08c531b65342eb5252b</id>
<content type='text'>
Normally objtool will now follow indirect calls; there is no need.

However, this becomes a problem with noinstr validation; if there's an
indirect call from noinstr code, we very much need to know it is to
another noinstr function. Luckily there aren't many indirect calls in
entry code with the obvious exception of paravirt. As such, noinstr
validation didn't work with paravirt kernels.

In order to track pv_ops[] call targets, objtool reads the static
pv_ops[] tables as well as direct assignments to the pv_ops[] array,
provided the compiler makes them a single instruction like:

  bf87:       48 c7 05 00 00 00 00 00 00 00 00        movq   $0x0,0x0(%rip)
    bf92 &lt;xen_init_spinlocks+0x5f&gt;
    bf8a: R_X86_64_PC32     pv_ops+0x268

There are, as of yet, no warnings for when this goes wrong :/

Using the functions found with the above means, all pv_ops[] calls are
now subject to noinstr validation.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20210624095149.118815755@infradead.org
</content>
</entry>
<entry>
<title>objtool: Handle __sanitize_cov*() tail calls</title>
<updated>2021-09-15T13:51:45Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-06-24T09:41:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f56dae88a81fded66adf2bea9922d1d98d1da14f'/>
<id>urn:sha1:f56dae88a81fded66adf2bea9922d1d98d1da14f</id>
<content type='text'>
Turns out the compilers also generate tail calls to __sanitize_cov*(),
make sure to also patch those out in noinstr code.

Fixes: 0f1441b44e82 ("objtool: Fix noinstr vs KCOV")
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Marco Elver &lt;elver@google.com&gt;
Link: https://lore.kernel.org/r/20210624095147.818783799@infradead.org
</content>
</entry>
</feed>
