diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2018-04-13 20:30:49 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2018-04-13 20:30:49 +0000 |
| commit | d86c1f0dc1b17d94a533b4d3e9228dff9cb3fb31 (patch) | |
| tree | 8ce470882fe1e1e9f05a895ac15e4d6aa42c5da4 /sys/kern | |
| parent | 1315f9b59f83b4ed83fccfd5a0e696267ede902f (diff) | |
Notes
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/imgact_aout.c | 14 | ||||
| -rw-r--r-- | sys/kern/subr_witness.c | 9 |
2 files changed, 17 insertions, 6 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index fd3a72328749..fe893241a4e0 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -67,7 +67,12 @@ __FBSDID("$FreeBSD$"); static int exec_aout_imgact(struct image_params *imgp); static int aout_fixup(register_t **stack_base, struct image_params *imgp); +#define AOUT32_USRSTACK 0xbfc00000 + #if defined(__i386__) + +#define AOUT32_PS_STRINGS (AOUT32_USRSTACK - sizeof(struct ps_strings)) + struct sysentvec aout_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -85,9 +90,9 @@ struct sysentvec aout_sysvec = { .sv_minsigstksz = MINSIGSTKSZ, .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, - .sv_maxuser = VM_MAXUSER_ADDRESS, - .sv_usrstack = USRSTACK, - .sv_psstrings = PS_STRINGS, + .sv_maxuser = AOUT32_USRSTACK, + .sv_usrstack = AOUT32_USRSTACK, + .sv_psstrings = AOUT32_PS_STRINGS, .sv_stackprot = VM_PROT_ALL, .sv_copyout_strings = exec_copyout_strings, .sv_setregs = exec_setregs, @@ -104,10 +109,9 @@ struct sysentvec aout_sysvec = { #elif defined(__amd64__) -#define AOUT32_USRSTACK 0xbfc00000 #define AOUT32_PS_STRINGS \ (AOUT32_USRSTACK - sizeof(struct freebsd32_ps_strings)) -#define AOUT32_MINUSER FREEBSD32_MINUSER +#define AOUT32_MINUSER FREEBSD32_MINUSER extern const char *freebsd32_syscallnames[]; extern u_long ia32_maxssiz; diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index c9139fbf38e3..4ab692ee2cb5 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -480,7 +480,9 @@ static int w_max_used_index = 0; static unsigned int w_generation = 0; static const char w_notrunning[] = "Witness not running\n"; static const char w_stillcold[] = "Witness is still cold\n"; - +#ifdef __i386__ +static const char w_notallowed[] = "The sysctl is disabled on the arch\n"; +#endif static struct witness_order_list_entry order_lists[] = { /* @@ -2779,6 +2781,11 @@ sysctl_debug_witness_fullgraph(SYSCTL_HANDLER_ARGS) struct sbuf *sb; int error; +#ifdef __i386__ + error = SYSCTL_OUT(req, w_notallowed, sizeof(w_notallowed)); + return (error); +#endif + if (witness_watch < 1) { error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); return (error); |
