From b51bfc30acbab30f3e1cb989a37809d139e8af66 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 10 Jul 2019 04:09:15 +0000 Subject: [PATCH] powerpc: Clamp 32-bit binaries to 32-bit MAXUSER sv_maxuser specifies the maximum addressable space for user space. Presently this is all 64-bits worth, which is impossible for a 32-bit process. This bug has existed since the initial import of powerpc64 in 2010. MFC after: 2 weeks --- sys/powerpc/powerpc/elf32_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index 11c14671d0b1..45291a6d06cf 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -97,7 +97,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_minuser = VM_MIN_ADDRESS, .sv_stackprot = VM_PROT_ALL, #ifdef __powerpc64__ - .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS32, .sv_usrstack = FREEBSD32_USRSTACK, .sv_psstrings = FREEBSD32_PS_STRINGS, .sv_copyout_strings = freebsd32_copyout_strings,