<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/head64.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-22T08:21:54Z</updated>
<entry>
<title>x86: Clear .brk area at early boot</title>
<updated>2022-07-22T08:21:54Z</updated>
<author>
<name>Juergen Gross</name>
</author>
<published>2022-06-30T07:14:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2334bdfc2da469c9807767002a2831274b82c39a'/>
<id>urn:sha1:2334bdfc2da469c9807767002a2831274b82c39a</id>
<content type='text'>
[ Upstream commit 38fa5479b41376dc9d7f57e71c83514285a25ca0 ]

The .brk section has the same properties as .bss: it is an alloc-only
section and should be cleared before being used.

Not doing so is especially a problem for Xen PV guests, as the
hypervisor will validate page tables (check for writable page tables
and hypervisor private bits) before accepting them to be used.

Make sure .brk is initially zero by letting clear_bss() clear the brk
area, too.

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220630071441.28576-3-jgross@suse.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/xen: Use clear_bss() for Xen PV guests</title>
<updated>2022-07-22T08:21:16Z</updated>
<author>
<name>Juergen Gross</name>
</author>
<published>2022-06-30T07:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f0f7faf210c9c993604b839816124a8aaadd4b2'/>
<id>urn:sha1:9f0f7faf210c9c993604b839816124a8aaadd4b2</id>
<content type='text'>
commit 96e8fc5818686d4a1591bb6907e7fdb64ef29884 upstream.

Instead of clearing the bss area in assembly code, use the clear_bss()
function.

This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Reviewed-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Link: https://lore.kernel.org/r/20220630071441.28576-2-jgross@suse.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86/head64: Add missing __head annotation to sme_postprocess_startup()</title>
<updated>2022-02-12T10:37:09Z</updated>
<author>
<name>Marco Bonelli</name>
</author>
<published>2022-02-11T16:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f117033243488a0080f837540c27999aa31870e'/>
<id>urn:sha1:5f117033243488a0080f837540c27999aa31870e</id>
<content type='text'>
This function was previously part of __startup_64() which is marked
__head, and is currently only called from there. Mark it __head too.

Signed-off-by: Marco Bonelli &lt;marco@mebeim.net&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220211162350.11780-1-marco@mebeim.net
</content>
</entry>
<entry>
<title>Merge tag 'x86_mm_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2022-01-10T17:51:38Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-01-10T17:51:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a692ae360615026b25d64c29fc7c12c0ef63c5f'/>
<id>urn:sha1:4a692ae360615026b25d64c29fc7c12c0ef63c5f</id>
<content type='text'>
Pull x86 mm updates from Borislav Petkov:

 - Flush *all* mappings from the TLB after switching to the trampoline
   pagetable to prevent any stale entries' presence

 - Flush global mappings from the TLB, in addition to the CR3-write,
   after switching off of the trampoline_pgd during boot to clear the
   identity mappings

 - Prevent instrumentation issues resulting from the above changes

* tag 'x86_mm_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Prevent early boot triple-faults with instrumentation
  x86/mm: Include spinlock_t definition in pgtable.
  x86/mm: Flush global TLB when switching to trampoline page-table
  x86/mm/64: Flush global TLB on boot and AP bringup
  x86/realmode: Add comment for Global bit usage in trampoline_pgd
  x86/mm: Add missing &lt;asm/cpufeatures.h&gt; dependency to &lt;asm/page_64.h&gt;
</content>
</entry>
<entry>
<title>x86/mm: Prevent early boot triple-faults with instrumentation</title>
<updated>2021-12-22T10:51:20Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2021-12-17T15:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b64dfcde1ca9cb82e38e573753f0c0db8fb841c2'/>
<id>urn:sha1:b64dfcde1ca9cb82e38e573753f0c0db8fb841c2</id>
<content type='text'>
Commit in Fixes added a global TLB flush on the early boot path, after
the kernel switches off of the trampoline page table.

Compiler profiling options enabled with GCOV_PROFILE add additional
measurement code on clang which needs to be initialized prior to
use. The global flush in x86_64_start_kernel() happens before those
initializations can happen, leading to accessing invalid memory.
GCOV_PROFILE builds with gcc are still ok so this is clang-specific.

The second issue this fixes is with KASAN: for a similar reason,
kasan_early_init() needs to have happened before KASAN-instrumented
functions are called.

Therefore, reorder the flush to happen after the KASAN early init
and prevent the compilers from adding profiling instrumentation to
native_write_cr4().

Fixes: f154f290855b ("x86/mm/64: Flush global TLB on boot and AP bringup")
Reported-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Tested-by: Carel Si &lt;beibei.si@intel.com&gt;
Tested-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Link: https://lore.kernel.org/r/20211209144141.GC25654@xsang-OptiPlex-9020
</content>
</entry>
<entry>
<title>x86/mm/64: Flush global TLB on boot and AP bringup</title>
<updated>2021-12-06T08:38:48Z</updated>
<author>
<name>Joerg Roedel</name>
</author>
<published>2021-12-02T15:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f154f290855b070cc94dd44ad253c0ef8a9337bb'/>
<id>urn:sha1:f154f290855b070cc94dd44ad253c0ef8a9337bb</id>
<content type='text'>
The AP bringup code uses the trampoline_pgd page-table which
establishes global mappings in the user range of the address space.
Flush the global TLB entries after the indentity mappings are removed so
no stale entries remain in the TLB.

Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20211202153226.22946-3-joro@8bytes.org
</content>
</entry>
<entry>
<title>x86/head64: Carve out the guest encryption postprocessing into a helper</title>
<updated>2021-11-15T20:05:14Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2021-11-10T22:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ed0a99b12aa2dd09afe7ba485145529b89f26e6'/>
<id>urn:sha1:5ed0a99b12aa2dd09afe7ba485145529b89f26e6</id>
<content type='text'>
Carve it out so that it is abstracted out of the main boot path. All
other encrypted guest-relevant processing should be placed in there.

No functional changes.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lkml.kernel.org/r/20211110220731.2396491-7-brijesh.singh@amd.com
</content>
</entry>
<entry>
<title>treewide: Replace the use of mem_encrypt_active() with cc_platform_has()</title>
<updated>2021-10-04T09:47:24Z</updated>
<author>
<name>Tom Lendacky</name>
</author>
<published>2021-09-08T22:58:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9d1d2bb75b2d5d4b426769c5aae0ce8cef3558f'/>
<id>urn:sha1:e9d1d2bb75b2d5d4b426769c5aae0ce8cef3558f</id>
<content type='text'>
Replace uses of mem_encrypt_active() with calls to cc_platform_has() with
the CC_ATTR_MEM_ENCRYPT attribute.

Remove the implementation of mem_encrypt_active() across all arches.

For s390, since the default implementation of the cc_platform_has()
matches the s390 implementation of mem_encrypt_active(), cc_platform_has()
does not need to be implemented in s390 (the config option
ARCH_HAS_CC_PLATFORM is not set).

Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lkml.kernel.org/r/20210928191009.32551-9-bp@alien8.de
</content>
</entry>
<entry>
<title>x86/sev-es: Rename sev-es.{ch} to sev.{ch}</title>
<updated>2021-05-10T05:40:27Z</updated>
<author>
<name>Brijesh Singh</name>
</author>
<published>2021-04-27T11:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e759959fe3b8313c81d6200be44cb8a644d845ea'/>
<id>urn:sha1:e759959fe3b8313c81d6200be44cb8a644d845ea</id>
<content type='text'>
SEV-SNP builds upon the SEV-ES functionality while adding new hardware
protection. Version 2 of the GHCB specification adds new NAE events that
are SEV-SNP specific. Rename the sev-es.{ch} to sev.{ch} so that all
SEV* functionality can be consolidated in one place.

Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Link: https://lkml.kernel.org/r/20210427111636.1207-2-brijesh.singh@amd.com
</content>
</entry>
<entry>
<title>x86: Fix various typos in comments</title>
<updated>2021-03-18T14:31:53Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2021-03-18T14:28:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9f6e12fb0b7fcded0bac34b8293ec46f80dfc33'/>
<id>urn:sha1:d9f6e12fb0b7fcded0bac34b8293ec46f80dfc33</id>
<content type='text'>
Fix ~144 single-word typos in arch/x86/ code comments.

Doing this in a single commit should reduce the churn.

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: linux-kernel@vger.kernel.org
</content>
</entry>
</feed>
