From 6fa534bad8e4d732aa024c459b6ddcd50ce38fb4 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Sun, 15 Aug 2004 11:52:45 +0000 Subject: [PATCH] Use sv_psstrings from the current process's sysentvec structure instead of PS_STRINGS. This is a no-op at present, but it will be needed when running 32-bit Linux binaries on amd64 to ensure PS_STRINGS is in addressable memory. --- sys/compat/linux/linux_util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 72fe4373955..48014537712 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -53,11 +53,12 @@ static __inline caddr_t stackgap_init(void); static __inline void *stackgap_alloc(caddr_t *, size_t); #define szsigcode (*(curthread->td_proc->p_sysent->sv_szsigcode)) +#define psstrings (curthread->td_proc->p_sysent->sv_psstrings) static __inline caddr_t stackgap_init() { - return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE); + return (caddr_t)(psstrings - szsigcode - SPARE_USRSPACE); } static __inline void * @@ -68,7 +69,7 @@ stackgap_alloc(sgp, sz) void *p = (void *) *sgp; sz = ALIGN(sz); - if (*sgp + sz > (caddr_t)(PS_STRINGS - szsigcode)) + if (*sgp + sz > (caddr_t)(psstrings - szsigcode)) return NULL; *sgp += sz; return p;