<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/arch/x86/boot/compressed/misc.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/arch/x86/boot/compressed/misc.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/arch/x86/boot/compressed/misc.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-10-11T16:47:23Z</updated>
<entry>
<title>x86/boot/64: Round memory hole size up to next PMD page</title>
<updated>2019-10-11T16:47:23Z</updated>
<author>
<name>Steve Wahl</name>
<email>steve.wahl@hpe.com</email>
</author>
<published>2019-09-24T21:04:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1869dbe87cb94dc9a218ae1d9301dea3678bd4ff'/>
<id>urn:sha1:1869dbe87cb94dc9a218ae1d9301dea3678bd4ff</id>
<content type='text'>
The kernel image map is created using PMD pages, which can include
some extra space beyond what's actually needed.  Round the size of the
memory hole we search for up to the next PMD boundary, to be certain
all of the space to be mapped is usable RAM and includes no reserved
areas.

Signed-off-by: Steve Wahl &lt;steve.wahl@hpe.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Acked-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Cc: dimitri.sivanich@hpe.com
Cc: Feng Tang &lt;feng.tang@intel.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jordan Borgner &lt;mail@jordan-borgner.de&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: mike.travis@hpe.com
Cc: russ.anderson@hpe.com
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: x86-ml &lt;x86@kernel.org&gt;
Cc: Zhenzhong Duan &lt;zhenzhong.duan@oracle.com&gt;
Link: https://lkml.kernel.org/r/df4f49f05c0c27f108234eb93db5c613d09ea62e.1569358539.git.steve.wahl@hpe.com
</content>
</entry>
<entry>
<title>x86, boot: Remove multiple copy of static function sanitize_boot_params()</title>
<updated>2019-07-18T19:41:57Z</updated>
<author>
<name>Zhenzhong Duan</name>
<email>zhenzhong.duan@oracle.com</email>
</author>
<published>2019-07-16T13:18:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8c5477e8046ca139bac250386c08453da37ec1ae'/>
<id>urn:sha1:8c5477e8046ca139bac250386c08453da37ec1ae</id>
<content type='text'>
Kernel build warns:
 'sanitize_boot_params' defined but not used [-Wunused-function]

at below files:
  arch/x86/boot/compressed/cmdline.c
  arch/x86/boot/compressed/error.c
  arch/x86/boot/compressed/early_serial_console.c
  arch/x86/boot/compressed/acpi.c

That's becausethey each include misc.h which includes a definition of
sanitize_boot_params() via bootparam_utils.h.

Remove the inclusion from misc.h and have the c file including
bootparam_utils.h directly.

Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@oracle.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lkml.kernel.org/r/1563283092-1189-1-git-send-email-zhenzhong.duan@oracle.com

</content>
</entry>
<entry>
<title>x86/boot: Call get_rsdp_addr() after console_init()</title>
<updated>2019-06-06T18:29:27Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2019-05-17T13:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5b51ae969e3d8ab0134ee3c98a769ad6d2cc2e24'/>
<id>urn:sha1:5b51ae969e3d8ab0134ee3c98a769ad6d2cc2e24</id>
<content type='text'>
... so that early debugging output from the RSDP parsing code can be
visible and collected.

Suggested-by: Dave Young &lt;dyoung@redhat.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Chao Fan &lt;fanc.fnst@cn.fujitsu.com&gt;
Cc: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.com&gt;
Cc: Kairui Song &lt;kasong@redhat.com&gt;
Cc: kexec@lists.infradead.org
Cc: x86@kernel.org
</content>
</entry>
<entry>
<title>Revert "x86/boot: Disable RSDP parsing temporarily"</title>
<updated>2019-06-06T18:29:06Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2019-04-30T18:38:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8e44c7840479edacc4a03d396c8d214576c8d411'/>
<id>urn:sha1:8e44c7840479edacc4a03d396c8d214576c8d411</id>
<content type='text'>
TODO:

- ask dyoung and Dirk van der Merwe &lt;dirk.vandermerwe@netronome.com&gt; to
test again.

This reverts commit 36f0c423552dacaca152324b8e9bda42a6d88865.

Now that the required fixes are in place, reenable early RSDP parsing.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Chao Fan &lt;fanc.fnst@cn.fujitsu.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: indou.takao@jp.fujitsu.com
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: kasong@redhat.com
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
Cc: msys.mizuma@gmail.com
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: x86-ml &lt;x86@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/boot: Disable RSDP parsing temporarily</title>
<updated>2019-04-22T09:36:43Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2019-04-19T13:40:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=36f0c423552dacaca152324b8e9bda42a6d88865'/>
<id>urn:sha1:36f0c423552dacaca152324b8e9bda42a6d88865</id>
<content type='text'>
The original intention to move RDSP parsing very early, before KASLR
does its ranges selection, was to accommodate movable memory regions
machines (CONFIG_MEMORY_HOTREMOVE) to still be able to do memory
hotplug.

However, that broke kexec'ing a kernel on EFI machines because depending
on where the EFI systab was mapped, on at least one machine it isn't
present in the kexec mapping of the second kernel, leading to a triple
fault in the early code.

Fixing this properly requires significantly involved surgery and we
cannot allow ourselves to do that, that close to the merge window.

So disable the RSDP parsing code temporarily until it is fixed properly
in the next release cycle.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Chao Fan &lt;fanc.fnst@cn.fujitsu.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: indou.takao@jp.fujitsu.com
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: kasong@redhat.com
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
Cc: msys.mizuma@gmail.com
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: x86-ml &lt;x86@kernel.org&gt;
Link: https://lkml.kernel.org/r/20190419141952.GE10324@zn.tnic
</content>
</entry>
<entry>
<title>x86/boot: Early parse RSDP and save it in boot_params</title>
<updated>2019-02-01T10:52:55Z</updated>
<author>
<name>Chao Fan</name>
<email>fanc.fnst@cn.fujitsu.com</email>
</author>
<published>2019-01-23T11:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce'/>
<id>urn:sha1:3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce</id>
<content type='text'>
The RSDP is needed by KASLR so parse it early and save it in
boot_params.acpi_rsdp_addr, before KASLR setup runs.

RSDP is needed by other kernel facilities so have the parsing code
built-in instead of a long "depends on" line in Kconfig.

 [ bp:
    - Trim commit message and comments
    - Add CONFIG_ACPI dependency in the Makefile
    - Move -&gt;acpi_rsdp_addr assignment with the rest of boot_params massaging in extract_kernel().
 ]

Signed-off-by: Chao Fan &lt;fanc.fnst@cn.fujitsu.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: bhe@redhat.com
Cc: Cao jin &lt;caoj.fnst@cn.fujitsu.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: indou.takao@jp.fujitsu.com
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: kasong@redhat.com
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Cc: msys.mizuma@gmail.com
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: x86-ml &lt;x86@kernel.org&gt;
Link: https://lkml.kernel.org/r/20190123110850.12433-6-fanc.fnst@cn.fujitsu.com
</content>
</entry>
<entry>
<title>Merge tag 'v4.16-rc7' into x86/mm, to fix up conflict</title>
<updated>2018-03-27T06:43:39Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2018-03-27T06:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=0bc91d4ba77156ae9217d25ed7c434540f950d05'/>
<id>urn:sha1:0bc91d4ba77156ae9217d25ed7c434540f950d05</id>
<content type='text'>
 Conflicts:
	arch/x86/mm/init_64.c

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/boot/64: Verify alignment of the LOAD segment</title>
<updated>2018-03-20T07:03:03Z</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2018-03-19T21:08:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c55b8550fa57ba4f5e507be406ff9fc2845713e8'/>
<id>urn:sha1:c55b8550fa57ba4f5e507be406ff9fc2845713e8</id>
<content type='text'>
Since the x86-64 kernel must be aligned to 2MB, refuse to boot the
kernel if the alignment of the LOAD segment isn't a multiple of 2MB.

Signed-off-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/CAMe9rOrR7xSJgUfiCoZLuqWUwymRxXPoGBW38%2BpN%3D9g%2ByKNhZw@mail.gmail.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/boot/compressed/64: Find a place for 32-bit trampoline</title>
<updated>2018-03-12T08:37:23Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2018-02-26T18:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3548e131ec6a82208f36e68d31947b0fe244c7a7'/>
<id>urn:sha1:3548e131ec6a82208f36e68d31947b0fe244c7a7</id>
<content type='text'>
If a bootloader enables 64-bit mode with 4-level paging, we might need to
switch over to 5-level paging. The switching requires the disabling of
paging, which works fine if kernel itself is loaded below 4G.

But if the bootloader puts the kernel above 4G (not sure if anybody does
this), we would lose control as soon as paging is disabled, because the
code becomes unreachable to the CPU.

To handle the situation, we need a trampoline in lower memory that would
take care of switching on 5-level paging.

This patch finds a spot in low memory for a trampoline.

The heuristic is based on code in reserve_bios_regions().

We find the end of low memory based on BIOS and EBDA start addresses.
The trampoline is put just before end of low memory. It's mimic approach
taken to allocate memory for realtime trampoline.

Tested-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20180226180451.86788-3-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/mm: Allow to boot without LA57 if CONFIG_X86_5LEVEL=y</title>
<updated>2018-02-16T09:48:49Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2018-02-14T18:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6657fca06e3ffab8d0b3f9d8b397f5ee498952d7'/>
<id>urn:sha1:6657fca06e3ffab8d0b3f9d8b397f5ee498952d7</id>
<content type='text'>
All pieces of the puzzle are in place and we can now allow to boot with
CONFIG_X86_5LEVEL=y on a machine without LA57 support.

Kernel will detect that LA57 is missing and fold p4d at runtime.

Update the documentation and the Kconfig option description to reflect the
change.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20180214182542.69302-10-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
