Module Name:    src
Committed By:   maxv
Date:           Tue Nov 14 13:58:08 UTC 2017

Modified Files:
        src/sys/arch/amd64/stand/prekern: locore.S redef.h

Log Message:
Remove XXX: set FRAMESIZE to the kernel value. Verily I don't understand
why we are doing that in the non-kaslr kernels, but let's just reproduce
the behavior.

jump_kernel is changed to use callq, so that the stack alignment is
preserved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/locore.S
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/stand/prekern/redef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/stand/prekern/locore.S
diff -u src/sys/arch/amd64/stand/prekern/locore.S:1.4 src/sys/arch/amd64/stand/prekern/locore.S:1.5
--- src/sys/arch/amd64/stand/prekern/locore.S:1.4	Fri Nov 10 08:05:38 2017
+++ src/sys/arch/amd64/stand/prekern/locore.S	Tue Nov 14 13:58:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.4 2017/11/10 08:05:38 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.5 2017/11/14 13:58:07 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2007, 2008, 2016, 2017 The NetBSD Foundation, Inc.
@@ -623,6 +623,6 @@ END(rdseed)
 
 ENTRY(jump_kernel)
 	movq	_C_LABEL(stkva),%rsp
-	movq	$exec_kernel,%rax
-	jmpq	*%rax
+	xorq	%rbp,%rbp
+	callq	exec_kernel
 END(jump_kernel)

Index: src/sys/arch/amd64/stand/prekern/redef.h
diff -u src/sys/arch/amd64/stand/prekern/redef.h:1.1 src/sys/arch/amd64/stand/prekern/redef.h:1.2
--- src/sys/arch/amd64/stand/prekern/redef.h:1.1	Tue Oct 10 09:29:14 2017
+++ src/sys/arch/amd64/stand/prekern/redef.h	Tue Nov 14 13:58:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: redef.h,v 1.1 2017/10/10 09:29:14 maxv Exp $	*/
+/*	$NetBSD: redef.h,v 1.2 2017/11/14 13:58:07 maxv Exp $	*/
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -43,5 +43,4 @@
  * -------------------------------------------------------------------------- */
 
 #define PDE_SIZE 8
-#define FRAMESIZE 8 /* XXX */
-
+#define FRAMESIZE 240

Reply via email to