LKML Archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] x86/boot changes for v6.10
@ 2024-05-13  6:51 Ingo Molnar
  2024-05-14  1:02 ` Linus Torvalds
  2024-05-14  2:51 ` pr-tracker-bot
  0 siblings, 2 replies; 5+ messages in thread
From: Ingo Molnar @ 2024-05-13  6:51 UTC (permalink / raw
  To: Linus Torvalds
  Cc: linux-kernel, the arch/x86 maintainers, Ard Biesheuvel,
	H. Peter Anvin

Linus,

Please pull the latest x86/boot Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-boot-2024-05-13

   # HEAD: a0025f587c685e5ff842fb0194036f2ca0b6eaf4 x86/boot/64: Clear most of CR4 in startup_64(), except PAE, MCE and LA57

x86/boot changes for v6.10:

 - Move the kernel cmdline setup earlier in the boot process (again),
   to address a split_lock_detect= boot parameter bug.

 - Ignore relocations in .notes sections

 - Simplify boot stack setup

 - Re-introduce a bootloader quirk wrt. CR4 handling

 - Miscellaneous cleanups & fixes

 Thanks,

	Ingo

------------------>
Ard Biesheuvel (1):
      x86/boot/64: Clear most of CR4 in startup_64(), except PAE, MCE and LA57

Brian Gerst (1):
      x86/boot: Simplify boot stack setup

Guixiong Wei (1):
      x86/boot: Ignore relocations in .notes sections in walk_relocs() too

Ingo Molnar (1):
      x86/build: Clean up arch/x86/tools/relocs.c a bit

Julian Stecklina (1):
      x86/boot: Move kernel cmdline setup earlier in the boot process (again)

Xin Li (Intel) (1):
      x86: Rename __{start,end}_init_task to __{start,end}_init_stack


 arch/x86/boot/compressed/head_64.S |   5 +
 arch/x86/include/asm/processor.h   |   6 +-
 arch/x86/kernel/head_32.S          |  11 +-
 arch/x86/kernel/head_64.S          |   2 +-
 arch/x86/kernel/setup.c            |  32 ++--
 arch/x86/kernel/vmlinux.lds.S      |   3 +
 arch/x86/tools/relocs.c            | 371 +++++++++++++++++++------------------
 arch/x86/xen/xen-head.S            |   2 +-
 include/asm-generic/vmlinux.lds.h  |   6 +-
 9 files changed, 219 insertions(+), 219 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] x86/boot changes for v6.10
  2024-05-13  6:51 [GIT PULL] x86/boot changes for v6.10 Ingo Molnar
@ 2024-05-14  1:02 ` Linus Torvalds
  2024-05-14  7:27   ` Ard Biesheuvel
  2024-05-14  2:51 ` pr-tracker-bot
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2024-05-14  1:02 UTC (permalink / raw
  To: Ingo Molnar
  Cc: linux-kernel, the arch/x86 maintainers, Ard Biesheuvel,
	H. Peter Anvin

On Sun, 12 May 2024 at 23:51, Ingo Molnar <mingo@kernel.org> wrote:
>
>  - Re-introduce a bootloader quirk wrt. CR4 handling

I've pulled this, but shouldn't the compressed boot also just stop
setting the G flag that it didn't understand?

For example, arch/x86/kernel/head64.c seems to do this:

        pmd_entry = __PAGE_KERNEL_LARGE_EXEC & ~_PAGE_GLOBAL;

but arch/x86/boot/compressed/ident_map_64.c does the somewhat suspect

        mapping_info.page_flag = __PAGE_KERNEL_LARGE_EXEC | sme_me_mask;

without masking off _PAGE_GLOBAL.

The hibernation code does

        pgprot_t pmd_text_prot = __pgprot(__PAGE_KERNEL_LARGE_EXEC);
        pgprot_val(pmd_text_prot) &= __default_kernel_pte_mask;

and again there are several situations where __default_kernel_pte_mask
does not have _PAGE_GLOBAL.

So again, the boot/compressed code seems a bit at an odds with other
code paths. The cr4 games seem to work around the fact that this code
is just buggy.

Hmm?

          Linus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] x86/boot changes for v6.10
  2024-05-13  6:51 [GIT PULL] x86/boot changes for v6.10 Ingo Molnar
  2024-05-14  1:02 ` Linus Torvalds
@ 2024-05-14  2:51 ` pr-tracker-bot
  1 sibling, 0 replies; 5+ messages in thread
From: pr-tracker-bot @ 2024-05-14  2:51 UTC (permalink / raw
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, the arch/x86 maintainers,
	Ard Biesheuvel, H. Peter Anvin

The pull request you sent on Mon, 13 May 2024 08:51:28 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-boot-2024-05-13

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9d8e0d52a2a4c4ab87da01cb17f15f1ec6cee826

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] x86/boot changes for v6.10
  2024-05-14  1:02 ` Linus Torvalds
@ 2024-05-14  7:27   ` Ard Biesheuvel
  2024-05-15  8:09     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2024-05-14  7:27 UTC (permalink / raw
  To: Linus Torvalds
  Cc: Ingo Molnar, linux-kernel, the arch/x86 maintainers,
	H. Peter Anvin

On Tue, 14 May 2024 at 03:03, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Sun, 12 May 2024 at 23:51, Ingo Molnar <mingo@kernel.org> wrote:
> >
> >  - Re-introduce a bootloader quirk wrt. CR4 handling
>
> I've pulled this, but shouldn't the compressed boot also just stop
> setting the G flag that it didn't understand?
>

I agree. But not setting CR4 to a known value is what caused the
regression, and that could cause other problems down the road, so
fixing it was arguably more important.

More than happy to send another patch to clear the G bit from the page
table entries created by the decompressor, but at this point, it
shouldn't make a difference.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] x86/boot changes for v6.10
  2024-05-14  7:27   ` Ard Biesheuvel
@ 2024-05-15  8:09     ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2024-05-15  8:09 UTC (permalink / raw
  To: Ard Biesheuvel
  Cc: Linus Torvalds, linux-kernel, the arch/x86 maintainers,
	H. Peter Anvin


* Ard Biesheuvel <ardb@kernel.org> wrote:

> On Tue, 14 May 2024 at 03:03, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > On Sun, 12 May 2024 at 23:51, Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > >  - Re-introduce a bootloader quirk wrt. CR4 handling
> >
> > I've pulled this, but shouldn't the compressed boot also just stop
> > setting the G flag that it didn't understand?
> >
> 
> I agree. But not setting CR4 to a known value is what caused the
> regression, and that could cause other problems down the road, so
> fixing it was arguably more important.
> 
> More than happy to send another patch to clear the G bit from the page
> table entries created by the decompressor, but at this point, it
> shouldn't make a difference.

Please - we shouldn't be creating page table entries with random G bits set 
in them. The boot code should at least pretend to maintain the illusion 
that it knows what it's doing. ;-)

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-15  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-13  6:51 [GIT PULL] x86/boot changes for v6.10 Ingo Molnar
2024-05-14  1:02 ` Linus Torvalds
2024-05-14  7:27   ` Ard Biesheuvel
2024-05-15  8:09     ` Ingo Molnar
2024-05-14  2:51 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).