x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 May 2021 21:07:53 +0000 (14:07 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 5 May 2021 06:52:31 +0000 (08:52 +0200)
commit025768a966a3dde8455de46d1f121a51bacb6a77
tree8fee6e17e18a85c21cce221ff67b6bda1b356482
parent5e321ded302da4d8c5d5dd953423d9b748ab3775
x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant

We used to generate this constant with static jumps, which certainly
works, but generates some quite unreadable and horrid code, and extra
jumps.

It's actually much simpler to just use our alternative_asm()
infrastructure to generate a simple alternative constant, making the
generated code much more obvious (and straight-line rather than "jump
around to load the right constant").

Acked-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
arch/x86/include/asm/page_64.h
arch/x86/include/asm/page_64_types.h