Index: arch/amd64/conf/files.amd64 =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/conf/files.amd64,v retrieving revision 1.107 diff -p -u -r1.107 files.amd64 --- arch/amd64/conf/files.amd64 31 Oct 2018 06:26:25 -0000 1.107 +++ arch/amd64/conf/files.amd64 27 Nov 2018 05:24:47 -0000 @@ -28,8 +28,7 @@ defflag opt_spectre.h SPECTRE_V2_GCC_MIT # defflag USER_LDT -defflag KASLR -defflag eisa.h EISA +defflag eisa.h EISA # Start code file arch/amd64/amd64/locore.S machdep Index: arch/i386/conf/files.i386 =================================================================== RCS file: /cvsroot/src/sys/arch/i386/conf/files.i386,v retrieving revision 1.396 diff -p -u -r1.396 files.i386 --- arch/i386/conf/files.i386 25 Aug 2018 07:48:56 -0000 1.396 +++ arch/i386/conf/files.i386 27 Nov 2018 05:24:47 -0000 @@ -18,8 +18,6 @@ defparam CPURESET_DELAY # Obsolete Xbox support obsolete defflag XBOX -defflag KASLR - # User-settable LDT (used by WINE) defflag USER_LDT Index: kern/files.kern =================================================================== RCS file: /cvsroot/src/sys/kern/files.kern,v retrieving revision 1.25 diff -p -u -r1.25 files.kern --- kern/files.kern 15 Nov 2018 09:38:57 -0000 1.25 +++ kern/files.kern 27 Nov 2018 05:24:47 -0000 @@ -6,6 +6,7 @@ define kern: machdep, uvm defflag opt_kern.h KERN defflag opt_script.h SETUIDSCRIPTS FDSCRIPTS +defflag KASLR file compat/common/compat_util.c kern file compat/common/compat_mod.c compat_netbsd | compat_netbsd32 file conf/debugsyms.c kern Index: kern/init_sysctl.c =================================================================== RCS file: /cvsroot/src/sys/kern/init_sysctl.c,v retrieving revision 1.219 diff -p -u -r1.219 init_sysctl.c --- kern/init_sysctl.c 24 Nov 2018 17:26:27 -0000 1.219 +++ kern/init_sysctl.c 27 Nov 2018 05:24:47 -0000 @@ -36,6 +36,7 @@ __KERNEL_RCSID(0, "$NetBSD: init_sysctl. #include "opt_compat_netbsd.h" #include "opt_modular.h" #include "opt_gprof.h" +#include "opt_kaslr.h" #include "pty.h" #include @@ -85,7 +86,11 @@ int kern_has_sysvmsg = 0; int kern_has_sysvshm = 0; int kern_has_sysvsem = 0; +#ifdef KASLR int kern_expose_address = 0; +#else +int kern_expose_address = 1; +#endif static const u_int sysctl_lwpprflagmap[] = { LPR_DETACHED, L_DETACHED,