<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/objtool/include, branch v6.18</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=v6.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-10-11T18:19:16Z</updated>
<entry>
<title>Merge tag 'x86_core_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2025-10-11T18:19:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-10-11T18:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9591fdb0611dccdeeeeacb99d89f0098737d209b'/>
<id>urn:sha1:9591fdb0611dccdeeeeacb99d89f0098737d209b</id>
<content type='text'>
Pull more x86 updates from Borislav Petkov:

 - Remove a bunch of asm implementing condition flags testing in KVM's
   emulator in favor of int3_emulate_jcc() which is written in C

 - Replace KVM fastops with C-based stubs which avoids problems with the
   fastop infra related to latter not adhering to the C ABI due to their
   special calling convention and, more importantly, bypassing compiler
   control-flow integrity checking because they're written in asm

 - Remove wrongly used static branches and other ugliness accumulated
   over time in hyperv's hypercall implementation with a proper static
   function call to the correct hypervisor call variant

 - Add some fixes and modifications to allow running FRED-enabled
   kernels in KVM even on non-FRED hardware

 - Add kCFI improvements like validating indirect calls and prepare for
   enabling kCFI with GCC. Add cmdline params documentation and other
   code cleanups

 - Use the single-byte 0xd6 insn as the official #UD single-byte
   undefined opcode instruction as agreed upon by both x86 vendors

 - Other smaller cleanups and touchups all over the place

* tag 'x86_core_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
  x86,retpoline: Optimize patch_retpoline()
  x86,ibt: Use UDB instead of 0xEA
  x86/cfi: Remove __noinitretpoline and __noretpoline
  x86/cfi: Add "debug" option to "cfi=" bootparam
  x86/cfi: Standardize on common "CFI:" prefix for CFI reports
  x86/cfi: Document the "cfi=" bootparam options
  x86/traps: Clarify KCFI instruction layout
  compiler_types.h: Move __nocfi out of compiler-specific header
  objtool: Validate kCFI calls
  x86/fred: KVM: VMX: Always use FRED for IRQs when CONFIG_X86_FRED=y
  x86/fred: Play nice with invoking asm_fred_entry_from_kvm() on non-FRED hardware
  x86/fred: Install system vector handlers even if FRED isn't fully enabled
  x86/hyperv: Use direct call to hypercall-page
  x86/hyperv: Clean up hv_do_hypercall()
  KVM: x86: Remove fastops
  KVM: x86: Convert em_salc() to C
  KVM: x86: Introduce EM_ASM_3WCL
  KVM: x86: Introduce EM_ASM_1SRC2
  KVM: x86: Introduce EM_ASM_2CL
  KVM: x86: Introduce EM_ASM_2W
  ...
</content>
</entry>
<entry>
<title>objtool: Add action to check for absence of absolute relocations</title>
<updated>2025-09-03T15:59:51Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2025-08-28T10:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d6e4563fc03d83f948e6a6f7963cc31a4c81914'/>
<id>urn:sha1:0d6e4563fc03d83f948e6a6f7963cc31a4c81914</id>
<content type='text'>
The x86 startup code must not use absolute references to code or data,
as it executes before the kernel virtual mapping is up.

Add an action to objtool to check all allocatable sections (with the
exception of __patchable_function_entries, which uses absolute
references for nebulous reasons) and raise an error if any absolute
references are found.

Note that debug sections typically contain lots of absolute references
too, but those are not allocatable so they will be ignored.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/20250828102202.1849035-39-ardb+git@google.com
</content>
</entry>
<entry>
<title>objtool: Validate kCFI calls</title>
<updated>2025-08-18T12:23:09Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2025-04-12T11:56:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=894af4a1cde61c3401f237184fb770f72ff12df8'/>
<id>urn:sha1:894af4a1cde61c3401f237184fb770f72ff12df8</id>
<content type='text'>
Validate that all indirect calls adhere to kCFI rules. Notably doing
nocfi indirect call to a cfi function is broken.

Apparently some Rust 'core' code violates this and explodes when ran
with FineIBT.

All the ANNOTATE_NOCFI_SYM sites are prime targets for attackers.

 - runtime EFI is especially henous because it also needs to disable
   IBT. Basically calling unknown code without CFI protection at
   runtime is a massice security issue.

 - Kexec image handover; if you can exploit this, you get to keep it :-)

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Acked-by: Sean Christopherson &lt;seanjc@google.com&gt;
Link: https://lkml.kernel.org/r/20250714103441.496787279@infradead.org
</content>
</entry>
<entry>
<title>objtool: Speed up SHT_GROUP reindexing</title>
<updated>2025-05-14T11:09:02Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-05-07T23:56:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ed9d82bf5b21d65e2f18249eec89a6a84df8f23'/>
<id>urn:sha1:4ed9d82bf5b21d65e2f18249eec89a6a84df8f23</id>
<content type='text'>
After elf_update_group_sh_info() was introduced, a prototype version of
"objtool klp diff" went from taking ~1s to several minutes, due to
looping almost endlessly in elf_update_group_sh_info() while creating
thousands of local symbols in a file with thousands of sections.

Dramatically improve the performance by marking all symbols' correlated
SHT_GROUP sections while reading the object.  That way there's no need
to search for it every time a symbol gets reindexed.

Fixes: 2cb291596e2c ("objtool: Fix up st_info in COMDAT group section")
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Tested-by: Rong Xu &lt;xur@google.com&gt;
Link: https://lkml.kernel.org/r/2a33e583c87e3283706f346f9d59aac20653b7fd.1746662991.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>objtool: Split INSN_CONTEXT_SWITCH into INSN_SYSCALL and INSN_SYSRET</title>
<updated>2025-04-08T07:14:11Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-04-08T07:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe1042b1ef79e4d5df33d5c0f0ce936493714eec'/>
<id>urn:sha1:fe1042b1ef79e4d5df33d5c0f0ce936493714eec</id>
<content type='text'>
INSN_CONTEXT_SWITCH is ambiguous.  It can represent both call semantics
(SYSCALL, SYSENTER) and return semantics (SYSRET, IRET, RETS, RETU).
Those differ significantly: calls preserve control flow whereas returns
terminate it.

Objtool uses an arbitrary rule for INSN_CONTEXT_SWITCH that almost works
by accident: if in a function, keep going; otherwise stop.  It should
instead be based on the semantics of the underlying instruction.

In preparation for improving that, split INSN_CONTEXT_SWITCH into
INSN_SYCALL and INSN_SYSRET.

No functional change.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/19a76c74d2c051d3bc9a775823cafc65ad267a7a.1744095216.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>objtool: Change "warning:" to "error: " for fatal errors</title>
<updated>2025-04-01T07:07:13Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-04-01T04:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e7be635937d19b91bab70695328214a3d789d51'/>
<id>urn:sha1:3e7be635937d19b91bab70695328214a3d789d51</id>
<content type='text'>
This is similar to GCC's behavior and makes it more obvious why the
build failed.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/0ea76f4b0e7a370711ed9f75fd0792bb5979c2bf.1743481539.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>Revert "objtool: Increase per-function WARN_FUNC() rate limit"</title>
<updated>2025-04-01T07:07:13Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-04-01T04:26:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5610071a69d1c94c70e681874298b4fc6942098'/>
<id>urn:sha1:c5610071a69d1c94c70e681874298b4fc6942098</id>
<content type='text'>
This reverts commit 0a7fb6f07e3ad497d31ae9a2082d2cacab43d54a.

The "skipping duplicate warnings" warning is technically not an actual
warning, which can cause confusion.  This feature isn't all that useful
anyway.  It's exceedingly rare for a function to have more than one
unrelated warning.

Suggested-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/e5abe5e858acf1a9207a5dfa0f37d17ac9dca872.1743481539.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>objtool: Reduce CONFIG_OBJTOOL_WERROR verbosity</title>
<updated>2025-03-25T08:20:27Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-03-24T21:56:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d39f82a058c0269392a797cb04f2a6064e5dcab6'/>
<id>urn:sha1:d39f82a058c0269392a797cb04f2a6064e5dcab6</id>
<content type='text'>
Remove the following from CONFIG_OBJTOOL_WERROR:

  * backtrace

  * "upgraded warnings to errors" message

  * cmdline args

This makes the default output less cluttered and makes it easier to spot
the actual warnings.  Note the above options are still are available
with --verbose or OBJTOOL_VERBOSE=1.

Also, do the cmdline arg printing on all warnings, regardless of werror.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/d61df69f64b396fa6b2a1335588aad7a34ea9e71.1742852846.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>objtool: Improve error handling</title>
<updated>2025-03-25T08:20:27Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-03-24T21:55:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5995abe15476798b2e2f0163a33404c41aafc8f'/>
<id>urn:sha1:c5995abe15476798b2e2f0163a33404c41aafc8f</id>
<content type='text'>
Fix some error handling issues, improve error messages, properly
distinguish betwee errors and warnings, and generally try to make all
the error handling more consistent.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/3094bb4463dad29b6bd1bea03848d1571ace771c.1742852846.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>objtool: Fix X86_FEATURE_SMAP alternative handling</title>
<updated>2025-03-25T08:20:26Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-03-24T21:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1154bbd326de4453858cf78cf29420888b3ffd52'/>
<id>urn:sha1:1154bbd326de4453858cf78cf29420888b3ffd52</id>
<content type='text'>
For X86_FEATURE_SMAP alternatives which replace NOP with STAC or CLAC,
uaccess validation skips the NOP branch to avoid following impossible
code paths, e.g. where a STAC would be patched but a CLAC wouldn't.

However, it's not safe to assume an X86_FEATURE_SMAP alternative is
patching STAC/CLAC.  There can be other alternatives, like
static_cpu_has(), where both branches need to be validated.

Fix that by repurposing ANNOTATE_IGNORE_ALTERNATIVE for skipping either
original instructions or new ones.  This is a more generic approach
which enables the removal of the feature checking hacks and the
insn-&gt;ignore bit.

Fixes the following warnings:

  arch/x86/mm/fault.o: warning: objtool: do_user_addr_fault+0x8ec: __stack_chk_fail() missing __noreturn in .c/.h or NORETURN() in noreturns.h
  arch/x86/mm/fault.o: warning: objtool: do_user_addr_fault+0x8f1: unreachable instruction

[ mingo: Fix up conflicts with recent x86 changes. ]

Fixes: ea24213d8088 ("objtool: Add UACCESS validation")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/de0621ca242130156a55d5d74fed86994dfa4c9c.1742852846.git.jpoimboe@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202503181736.zkZUBv4N-lkp@intel.com/
</content>
</entry>
</feed>
