result in a boot failure during CR3
loading.
Signed-off-by: Hou Wenlong
Reviewed-by: Juergen Gross
---
v1 -> v2: Add the "Reviewed-by" tag from Juergen
v1:
https://lore.kernel.org/lkml/8c5448eeebbba998a7fff9ed9b2f7e7f3e437967.1697792461.git.houwenlong@antgroup.com
---
arch/x86
On Mon, Oct 23, 2023 at 08:02:02PM +0800, Andy Shevchenko wrote:
> On Mon, Oct 23, 2023 at 12:10 PM Hou Wenlong
> wrote:
> >
> > In a 32-bit SMP kernel, the stack canary is a percpu variable accessed
> > as %fs:__stack_chk_guard. However, the ABI for PVH entry does
startup_64() and startup_xen() both use "fixed_percpu_data" to set up GS
base. So for consitency, use it too in PVH entry and remove the
temporary variable "canary".
Signed-off-by: Hou Wenlong
---
arch/x86/platform/pvh/head.S | 4 +---
1 file changed, 1 insertion(+), 3 dele
safety, the percpu should be set up explicitly
%before calling xen_prepare_pvh(), which accesses the stack canary.
Signed-off-by: Hou Wenlong
---
arch/x86/platform/pvh/head.S | 4
1 file changed, 4 insertions(+)
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
index
Clean up the stack canary setup in the PVH entry. For a 64-bit kernel,
use fixed_percpu_data to set up GSBASE. For a 32-bit kernel, set up the
%fs register explicitly.
Hou Wenlong (2):
x86/xen/pvh: Set up percpu for stack canary in 32-bit kernel entry
x86/xen/pvh: Use fixed_percpu_data to set
result in a boot failure during CR3
loading.
Signed-off-by: Hou Wenlong
---
arch/x86/platform/pvh/head.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
index c4365a05ab83..085adb1b2313 100644
--- a/arch/x86/platform/pvh/head.S
+++ b
On Wed, Jun 07, 2023 at 08:49:15PM +0800, Dave Hansen wrote:
> On 5/15/23 01:19, Hou Wenlong wrote:
> > This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
> > fixmap area to be movable and relocated with the kernel image in the
> > x86/PIE patchset [0]. Th
On Mon, May 15, 2023 at 04:19:31PM +0800, Hou Wenlong wrote:
> This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
> fixmap area to be movable and relocated with the kernel image in the
> x86/PIE patchset [0]. This enables the kernel image to be relocated in
>
If the vsyscall page is moved out of the fixmap area, then FIXADDR_TOP
would be below the vsyscall page. Therefore, it should be pinned up to
VSYSCALL_ADDR if vsyscall is enabled.
Suggested-by: Lai Jiangshan
Signed-off-by: Hou Wenlong
---
arch/x86/xen/mmu_pv.c | 12 +---
1 file changed
the vsyscall page.
Suggested-by: Lai Jiangshan
Signed-off-by: Hou Wenlong
---
arch/x86/entry/vsyscall/vsyscall_64.c | 3 +--
arch/x86/include/asm/paravirt.h | 7 +++
arch/x86/include/asm/paravirt_types.h | 4
arch/x86/include/asm/vsyscall.h | 13 +
arch/x86/kernel
.git.houwenlong@antgroup.com
Hou Wenlong (4):
x86/vsyscall: Don't use set_fixmap() to map vsyscall page
x86/xen: Pin up to VSYSCALL_ADDR when vsyscall page is out of fixmap
area
x86/fixmap: Move vsyscall page out of fixmap area
x86/fixmap: Unify FIXADDR_TOP
arch/x86/entry/vsyscall
On Thu, May 04, 2023 at 12:31:59PM +0200, Juergen Gross wrote:
> On 28.04.23 11:50, Hou Wenlong wrote:
> >From: Brian Gerst
> >
> >From: Brian Gerst
> >
> >If the compiler supports it, use a standard per-cpu variable for the
> >stack protector instead of
.
PVH booting assumes that no relocation happened. Since the kernel
compile address is still in top 2G, so it is allowed to use R_X86_64_32S
for symbol references in pvh_start_xen().
Signed-off-by: Hou Wenlong
Cc: Thomas Garnier
Cc: Lai Jiangshan
Cc: Kees Cook
---
arch/x86/platform/pvh/head.S
Signed-off-by: Hou Wenlong
Cc: Thomas Garnier
Cc: Kees Cook
---
arch/x86/entry/vsyscall/vsyscall_64.c | 3 +--
arch/x86/include/asm/paravirt.h | 7 +++
arch/x86/include/asm/paravirt_types.h | 4
arch/x86/include/asm/vsyscall.h | 13 +
arch/x86/kernel/paravirt.c
startup_64() and startup_xen() both use fixed_percpu_data to set up GS
base. So for consitency, use it too in PVH entry.
Signed-off-by: Hou Wenlong
Cc: Thomas Garnier
Cc: Lai Jiangshan
Cc: Kees Cook
---
arch/x86/platform/pvh/head.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions
-by: Lai Jiangshan
Signed-off-by: Hou Wenlong
Cc: Thomas Garnier
Cc: Kees Cook
---
arch/x86/entry/calling.h | 17
arch/x86/include/asm/nospec-branch.h | 10 +-
arch/x86/include/asm/percpu.h| 29 +---
arch/x86/kernel/head_64.S
If vsyscall page is moved out of fixmap area, then FIXADDR_TOP would be
below vsyscall page. So it should pin up to VSYSCALL_ADDR if vsyscall is
enabled.
Suggested-by: Lai Jiangshan
Signed-off-by: Hou Wenlong
Cc: Thomas Garnier
Cc: Kees Cook
---
arch/x86/xen/mmu_pv.c | 12 +---
1
From: Brian Gerst
From: Brian Gerst
If the compiler supports it, use a standard per-cpu variable for the
stack protector instead of the old fixed location. Keep the fixed
location code for compatibility with older compilers.
[Hou Wenlong: Disable it on Clang, adapt new code change and adapt
18 matches
Mail list logo