linux: populate sv_syscallnames in each sysentvec

This allows the syscallname() function to give a usable result for Linux
ABIs.

Reported by:	jrtc27
Reviewed by:	jrtc27, markj, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37199
This commit is contained in:
Mitchell Horne 2022-10-28 18:19:39 -03:00
parent fe36346a89
commit 1da65dcb1c
4 changed files with 8 additions and 4 deletions

View File

@ -110,6 +110,7 @@ extern char _binary_linux_vdso_so_o_end;
static vm_offset_t linux_vdso_base;
extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
extern const char *linux_syscallnames[];
SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
@ -729,7 +730,7 @@ struct sysentvec elf_linux_sysvec = {
SV_SIG_WAITNDQ | SV_TIMEKEEP,
.sv_set_syscall_retval = linux_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
.sv_syscallnames = NULL,
.sv_syscallnames = linux_syscallnames,
.sv_shared_page_base = LINUX_SHAREDPAGE_LA48,
.sv_shared_page_len = PAGE_SIZE,
.sv_schedtail = linux_schedtail,

View File

@ -113,6 +113,7 @@ extern char _binary_linux32_vdso_so_o_end;
static vm_offset_t linux_vdso_base;
extern struct sysent linux32_sysent[LINUX32_SYS_MAXSYSCALL];
extern const char *linux32_syscallnames[];
SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
@ -882,7 +883,7 @@ struct sysentvec elf_linux_sysvec = {
SV_SIG_DISCIGN | SV_SIG_WAITNDQ | SV_TIMEKEEP,
.sv_set_syscall_retval = linux32_set_syscall_retval,
.sv_fetch_syscall_args = linux32_fetch_syscall_args,
.sv_syscallnames = NULL,
.sv_syscallnames = linux32_syscallnames,
.sv_shared_page_base = LINUX32_SHAREDPAGE,
.sv_shared_page_len = PAGE_SIZE,
.sv_schedtail = linux_schedtail,

View File

@ -98,6 +98,7 @@ extern char _binary_linux_vdso_so_o_end;
static vm_offset_t linux_vdso_base;
extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
extern const char *linux_syscallnames[];
SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
@ -576,7 +577,7 @@ struct sysentvec elf_linux_sysvec = {
SV_SIG_WAITNDQ | SV_TIMEKEEP,
.sv_set_syscall_retval = linux_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
.sv_syscallnames = NULL,
.sv_syscallnames = linux_syscallnames,
.sv_shared_page_base = LINUX_SHAREDPAGE,
.sv_shared_page_len = PAGE_SIZE,
.sv_schedtail = linux_schedtail,

View File

@ -96,6 +96,7 @@ extern char _binary_linux_vdso_so_o_end;
static vm_offset_t linux_vdso_base;
extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
extern const char *linux_syscallnames[];
SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
@ -782,7 +783,7 @@ struct sysentvec linux_sysvec = {
SV_SIG_DISCIGN | SV_SIG_WAITNDQ,
.sv_set_syscall_retval = linux_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
.sv_syscallnames = NULL,
.sv_syscallnames = linux_syscallnames,
.sv_schedtail = linux_schedtail,
.sv_thread_detach = linux_thread_detach,
.sv_trap = NULL,