linux(4): Add AT_MINSIGSTKSZ to arm64 port

MFC after:	2 weeks
This commit is contained in:
Dmitry Chagin 2022-05-15 21:12:03 +03:00
parent c56480a832
commit 390c9ea029
4 changed files with 8 additions and 4 deletions

View File

@ -81,7 +81,7 @@ typedef struct {
#define l_fd_set fd_set #define l_fd_set fd_set
/* Miscellaneous */ /* Miscellaneous */
#define LINUX_AT_COUNT 20 #define LINUX_AT_COUNT 21
struct l___sysctl_args struct l___sysctl_args
{ {
@ -163,9 +163,6 @@ struct l_newstat {
#define LINUX_SIG_UNBLOCK 1 #define LINUX_SIG_UNBLOCK 1
#define LINUX_SIG_SETMASK 2 #define LINUX_SIG_SETMASK 2
/* sigaltstack */
#define LINUX_MINSIGSTKSZ 5664 /* sigframe */
typedef void (*l_handler_t)(l_int); typedef void (*l_handler_t)(l_int);
typedef struct { typedef struct {

View File

@ -81,4 +81,6 @@ struct l_sigframe {
ucontext_t uc; ucontext_t uc;
}; };
#define LINUX_MINSIGSTKSZ roundup(sizeof(struct l_sigframe), 16)
#endif /* _ARM64_LINUX_SIGFRAME_H_ */ #endif /* _ARM64_LINUX_SIGFRAME_H_ */

View File

@ -197,6 +197,7 @@ linux_copyout_auxargs(struct image_params *imgp, uintptr_t base)
issetugid = p->p_flag & P_SUGID ? 1 : 0; issetugid = p->p_flag & P_SUGID ? 1 : 0;
AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base); AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base);
AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ);
AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, *imgp->sysent->sv_hwcap); AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, *imgp->sysent->sv_hwcap);
AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz);
AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz);

View File

@ -95,6 +95,10 @@
#define LINUX_AT_RANDOM_LEN 16 /* size of random bytes */ #define LINUX_AT_RANDOM_LEN 16 /* size of random bytes */
#ifndef LINUX_AT_MINSIGSTKSZ
#define LINUX_AT_MINSIGSTKSZ 51 /* min stack size required by the kernel */
#endif
/* Linux sets the i387 to extended precision. */ /* Linux sets the i387 to extended precision. */
#if defined(__i386__) || defined(__amd64__) #if defined(__i386__) || defined(__amd64__)
#define __LINUX_NPXCW__ 0x37f #define __LINUX_NPXCW__ 0x37f