mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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.
This commit is contained in:
parent
4ba861fa77
commit
6fa534bad8
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue