summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2000-11-09 08:25:48 +0000
committermarcel <marcel@FreeBSD.org>2000-11-09 08:25:48 +0000
commit1a7266b24de5311dddd975c3c4cb4da6f15f9a45 (patch)
tree455d03a734fbf59af75b8517e09aca5328c18648 /sys/kern
parent7980b37e09111f86fa7b0583f6a2e79e6434a0b0 (diff)
downloadFreeBSD-src-1a7266b24de5311dddd975c3c4cb4da6f15f9a45.zip
FreeBSD-src-1a7266b24de5311dddd975c3c4cb4da6f15f9a45.tar.gz
Make MINSIGSTKSZ machine dependent, and have the sigaltstack
syscall compare against a variable sv_minsigstksz in struct sysentvec as to properly take the size of the machine- and ABI dependent struct sigframe into account. The SVR4 and iBCS2 modules continue to have a minsigstksz of 8192 to preserve behavior. The real values (if different) are not known at this time. Other ABI modules use the real values. The native MINSIGSTKSZ is now defined as follows: Arch MINSIGSTKSZ ---- ----------- alpha 4096 i386 2048 ia64 12288 Reviewed by: mjacob Suggested by: bde
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/imgact_aout.c4
-rw-r--r--sys/kern/imgact_elf.c4
-rw-r--r--sys/kern/kern_sig.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 80ecc0c..e27a80c 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -69,7 +69,9 @@ struct sysentvec aout_sysvec = {
&szsigcode,
0,
"FreeBSD a.out",
- aout_coredump
+ aout_coredump,
+ NULL,
+ MINSIGSTKSZ
};
static int
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 069bc9a..9706d67 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -99,7 +99,9 @@ struct sysentvec elf_freebsd_sysvec = {
&szsigcode,
0,
"FreeBSD ELF",
- elf_coredump
+ elf_coredump,
+ NULL,
+ MINSIGSTKSZ
};
static Elf_Brandinfo freebsd_brand_info = {
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 00624d4..af7a32f 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -830,7 +830,7 @@ sigaltstack(p, uap)
p->p_sigstk.ss_flags = ss.ss_flags;
return (0);
}
- if (ss.ss_size < MINSIGSTKSZ)
+ if (ss.ss_size < p->p_sysent->sv_minsigstksz)
return (ENOMEM);
p->p_flag |= P_ALTSTACK;
p->p_sigstk = ss;
OpenPOWER on IntegriCloud