linux(4): Export the AT_MINSIGSTKSZ depending on the process osreldata

AT_MINSIGSTKSZ has appeared in the 5.13.0 Linux kernel first time.

Differential Revision:	https://reviews.freebsd.org/D39648
MFC after:		1 month
This commit is contained in:
Dmitry Chagin 2023-04-22 22:17:52 +03:00
parent 70eab81d6f
commit b7a6bcdd13
2 changed files with 3 additions and 1 deletions

View file

@ -533,7 +533,8 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base)
AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp));
if (args->execfd != -1)
AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd);
AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ);
if (p->p_osrel >= LINUX_KERNVER_5013000 || p->p_osrel == 0)
AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ);
AUXARGS_ENTRY(pos, AT_NULL, 0);
free(imgp->auxargs, M_TEMP);

View file

@ -62,6 +62,7 @@ int linux_kernver(struct thread *td);
#define LINUX_KERNVER_2006030 LINUX_KERNVER(2,6,30)
#define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39)
#define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0)
#define LINUX_KERNVER_5013000 LINUX_KERNVER(5,13,0)
#define linux_use54(t) (linux_kernver(t) >= LINUX_KERNVER_5004000)