Re: 379706875d ("x86/mm: simplify init_trampoline() and .."): BUG: kernel reboot-without-warning in boot stage
From: Mike Rapoport
Date: Mon May 25 2020 - 06:42:54 EST
On Mon, May 25, 2020 at 08:21:58AM +0800, kernel test robot wrote:
> Greetings,
>
> 0day kernel testing robot got the below dmesg and the first bad commit is
>
> https://github.com/0day-ci/linux/commits/Mike-Rapoport/mm-consolidate-definitions-of-page-table-accessors/20200513-025551
>
> commit 379706875d28bf7fc90b067355981de242b7bff1
> Author: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> AuthorDate: Tue May 12 21:44:17 2020 +0300
> Commit: 0day robot <lkp@xxxxxxxxx>
> CommitDate: Wed May 13 02:55:59 2020 +0800
>
> x86/mm: simplify init_trampoline() and surrounding logic
>
> There are three cases for the trampoline initialization:
> * 32-bit does nothing
> * 64-bit with kaslr disabled simply copies a PGD entry from the direct map
> to the trampoline PGD
> * 64-bit with kaslr enabled maps the real mode trampoline at PUD level
>
> These cases are currently differentiated by a bunch of ifdefs inside
> asm/include/pgtable.h and the case of 64-bits with kaslr on uses
> pgd_index() helper.
>
> Replacing the ifdefs with a static function in arch/x86/mm/init.c gives
> clearer code and allows moving pgd_index() to the generic implementation in
> include/linux/pgtable.h
>
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
>
> 7cc33e59db m68k/mm: move {cache,nocahe}_page() definitions close to their user
> 379706875d x86/mm: simplify init_trampoline() and surrounding logic
> 6498f3f0af mm: consolidate pgd_index() and pgd_offset{_k}() definitions
> +----------------------------------------------------------------------------+------------+------------+------------+
> | | 7cc33e59db | 379706875d | 6498f3f0af |
> +----------------------------------------------------------------------------+------------+------------+------------+
> | boot_successes | 0 | 0 | 0 |
> | boot_failures | 50 | 17 | 21 |
The patch below fixes this. Its generated vs v5.7-rc6-mmots-2020-05-22-22-39.