<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/entry/entry.S, branch linux-6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-12-02T22:16:42Z</updated>
<entry>
<title>Merge tag 'x86_misc_for_6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2025-12-02T22:16:42Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2025-12-02T22:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2aa39b368bb147afe8f6bd63d962494354f6498'/>
<id>urn:sha1:e2aa39b368bb147afe8f6bd63d962494354f6498</id>
<content type='text'>
Pull misc x86 updates from Dave Hansen:
 "The most significant are some changes to ensure that symbols exported
  for KVM are used only by KVM modules themselves, along with some
  related cleanups.

  In true x86/misc fashion, the other patch is completely unrelated and
  just enhances an existing pr_warn() to make it clear to users how they
  have tainted their kernel when something is mucking with MSRs.

  Summary:

   - Make MSR-induced taint easier for users to track down

   - Restrict KVM-specific exports to KVM itself"

* tag 'x86_misc_for_6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Restrict KVM-induced symbol exports to KVM modules where obvious/possible
  x86/mm: Drop unnecessary export of "ptdump_walk_pgd_level_debugfs"
  x86/mtrr: Drop unnecessary export of "mtrr_state"
  x86/bugs: Drop unnecessary export of "x86_spec_ctrl_base"
  x86/msr: Add CPU_OUT_OF_SPEC taint name to "unrecognized" pr_warn(msg)
</content>
</entry>
<entry>
<title>x86_64/bug: Implement __WARN_printf()</title>
<updated>2025-11-24T19:23:05Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2025-06-02T13:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b472b6e5bd951b208fbbe373892891398eb5ad1'/>
<id>urn:sha1:5b472b6e5bd951b208fbbe373892891398eb5ad1</id>
<content type='text'>
The basic idea is to have __WARN_printf() be a vararg function such
that the compiler can do the optimal calling convention for us. This
function body will be a #UD and then set up a va_list in the exception
from pt_regs.

But because the trap will be in a called function, the bug_entry must
be passed in. Have that be the first argument, with the format tucked
away inside the bug_entry.

The comments should clarify the real fun details.

The big downside is that all WARNs will now show:

 RIP: 0010:__WARN_trap:+0

One possible solution is to simply discard the top frame when
unwinding. A follow up patch takes care of this slightly differently
by abusing the x86 static_call implementation.

This changes (with the next patches):

	WARN_ONCE(preempt_count() != 2*PREEMPT_DISABLE_OFFSET,
		  "corrupted preempt_count: %s/%d/0x%x\n",

from:

	cmpl    $2, %ecx	#, _7
        jne     .L1472
	...

  .L1472:
        cmpb    $0, __already_done.11(%rip)
        je      .L1513
	...

  .L1513
	movb    $1, __already_done.11(%rip)
	movl    1424(%r14), %edx        # _15-&gt;pid, _15-&gt;pid
        leaq    1912(%r14), %rsi        #, _17
        movq    $.LC43, %rdi    #,
        call    __warn_printk   #
	ud2
  .pushsection __bug_table,"aw"
        2:
        .long 1b - .    # bug_entry::bug_addr
        .long .LC1 - .  # bug_entry::file
        .word 5093      # bug_entry::line
        .word 2313      # bug_entry::flags
        .org 2b + 12
  .popsection
  .pushsection .discard.annotate_insn,"M", @progbits, 8
        .long 1b - .
        .long 8         # ANNOTYPE_REACHABLE
  .popsection

into:

	cmpl    $2, %ecx        #, _7
        jne     .L1442  #,
	...

  .L1442:
        lea (2f)(%rip), %rdi
  1:
  .pushsection __bug_table,"aw"
        2:
        .long 1b - .    # bug_entry::bug_addr
        .long .LC43 - . # bug_entry::format
        .long .LC1 - .  # bug_entry::file
        .word 5093      # bug_entry::line
        .word 2323      # bug_entry::flags
        .org 2b + 16
  .popsection
        movl    1424(%r14), %edx        # _19-&gt;pid, _19-&gt;pid
        leaq    1912(%r14), %rsi        #, _13
	ud1 (%edx), %rdi

Notably, by pushing everything into the exception handler it can take
care of the ONCE thing.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://patch.msgid.link/20251110115758.213813530@infradead.org
</content>
</entry>
<entry>
<title>x86: Restrict KVM-induced symbol exports to KVM modules where obvious/possible</title>
<updated>2025-11-12T23:29:38Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2025-11-12T17:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6276c67f2bc4aeaf350a7cf889c33c38b3330ea9'/>
<id>urn:sha1:6276c67f2bc4aeaf350a7cf889c33c38b3330ea9</id>
<content type='text'>
Extend KVM's export macro framework to provide EXPORT_SYMBOL_FOR_KVM(),
and use the helper macro to export symbols for KVM throughout x86 if and
only if KVM will build one or more modules, and only for those modules.

To avoid unnecessary exports when CONFIG_KVM=m but kvm.ko will not be
built (because no vendor modules are selected), let arch code #define
EXPORT_SYMBOL_FOR_KVM to suppress/override the exports.

Note, the set of symbols to restrict to KVM was generated by manual search
and audit; any "misses" are due to human error, not some grand plan.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Acked-by: Kai Huang &lt;kai.huang@intel.com&gt;
Tested-by: Kai Huang &lt;kai.huang@intel.com&gt;
Link: https://patch.msgid.link/20251112173944.1380633-5-seanjc%40google.com
</content>
</entry>
<entry>
<title>x86/bugs: Rename MDS machinery to something more generic</title>
<updated>2025-06-16T16:45:18Z</updated>
<author>
<name>Borislav Petkov (AMD)</name>
</author>
<published>2024-09-11T03:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9af88a3d384c8b55beb5dc5483e5da0135fadbd'/>
<id>urn:sha1:f9af88a3d384c8b55beb5dc5483e5da0135fadbd</id>
<content type='text'>
It will be used by other x86 mitigations.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Pawan Gupta &lt;pawan.kumar.gupta@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86/bugs: Use SBPB in write_ibpb() if applicable</title>
<updated>2025-04-09T10:41:30Z</updated>
<author>
<name>Josh Poimboeuf</name>
</author>
<published>2025-04-08T21:47:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc9fd3f98423367c79e0bd85a9515df26dc1b3cc'/>
<id>urn:sha1:fc9fd3f98423367c79e0bd85a9515df26dc1b3cc</id>
<content type='text'>
write_ibpb() does IBPB, which (among other things) flushes branch type
predictions on AMD.  If the CPU has SRSO_NO, or if the SRSO mitigation
has been disabled, branch type flushing isn't needed, in which case the
lighter-weight SBPB can be used.

The 'x86_pred_cmd' variable already keeps track of whether IBPB or SBPB
should be used.  Use that instead of hardcoding IBPB.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/17c5dcd14b29199b75199d67ff7758de9d9a4928.1744148254.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>x86/bugs: Rename entry_ibpb() to write_ibpb()</title>
<updated>2025-04-09T10:41:29Z</updated>
<author>
<name>Josh Poimboeuf</name>
</author>
<published>2025-04-08T21:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13235d6d50bba99931c4392c0f813cfae0de3eac'/>
<id>urn:sha1:13235d6d50bba99931c4392c0f813cfae0de3eac</id>
<content type='text'>
There's nothing entry-specific about entry_ibpb().  In preparation for
calling it from elsewhere, rename it to write_ibpb().

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/1e54ace131e79b760de3fe828264e26d0896e3ac.1744148254.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP</title>
<updated>2025-03-19T10:26:58Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2025-03-12T11:48:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91d5451d97ce35cbd510277fa3b7abf9caa4e34d'/>
<id>urn:sha1:91d5451d97ce35cbd510277fa3b7abf9caa4e34d</id>
<content type='text'>
The __ref_stack_chk_guard symbol doesn't exist on UP:

  &lt;stdin&gt;:4:15: error: ‘__ref_stack_chk_guard’ undeclared here (not in a function)

Fix the #ifdef around the entry.S export.

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Link: https://lore.kernel.org/r/20250123190747.745588-8-brgerst@gmail.com
</content>
</entry>
<entry>
<title>Merge branch 'x86/asm' into x86/core, to pick up dependent commits</title>
<updated>2025-03-04T19:29:35Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2025-03-04T10:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71c2ff150f34904f693c654ee8c55c996629abb7'/>
<id>urn:sha1:71c2ff150f34904f693c654ee8c55c996629abb7</id>
<content type='text'>
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/stackprotector/64: Convert to normal per-CPU variable</title>
<updated>2025-02-18T09:15:09Z</updated>
<author>
<name>Brian Gerst</name>
</author>
<published>2025-01-23T19:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80d47defddc000271502057ebd7efa4fd6481542'/>
<id>urn:sha1:80d47defddc000271502057ebd7efa4fd6481542</id>
<content type='text'>
Older versions of GCC fixed the location of the stack protector canary
at %gs:40.  This constraint forced the percpu section to be linked at
absolute address 0 so that the canary could be the first data object in
the percpu section.  Supporting the zero-based percpu section requires
additional code to handle relocations for RIP-relative references to
percpu data, extra complexity to kallsyms, and workarounds for linker
bugs due to the use of absolute symbols.

GCC 8.1 supports redefining where the canary is located, allowing it to
become a normal percpu variable instead of at a fixed location.  This
removes the constraint that the percpu section must be zero-based.

Signed-off-by: Brian Gerst &lt;brgerst@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/20250123190747.745588-8-brgerst@gmail.com
</content>
</entry>
<entry>
<title>x86/cfi: Clean up linkage</title>
<updated>2025-02-14T09:32:05Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2025-02-07T12:15:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=582077c94052bd69a544b3f9d7619c9c6a67c34b'/>
<id>urn:sha1:582077c94052bd69a544b3f9d7619c9c6a67c34b</id>
<content type='text'>
With the introduction of kCFI the addition of ENDBR to
SYM_FUNC_START* no longer suffices to make the function indirectly
callable. This now requires the use of SYM_TYPED_FUNC_START.

As such, remove the implicit ENDBR from SYM_FUNC_START* and add some
explicit annotations to fix things up again.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Link: https://lore.kernel.org/r/20250207122546.409116003@infradead.org
</content>
</entry>
</feed>
