aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux32/linux32_sysvec.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-06-12 21:03:23 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-06-12 21:03:23 +0000
commit2d88da2f06f296d84749996a2a76d755aa4c5c92 (patch)
tree872990de896132a2a54456a26e6891e28d6350c6 /sys/amd64/linux32/linux32_sysvec.c
parent7127f6f455d58788344aef3aa1b07e67b4abce76 (diff)
downloadsrc-2d88da2f06f296d84749996a2a76d755aa4c5c92.tar.gz
src-2d88da2f06f296d84749996a2a76d755aa4c5c92.zip
Move struct syscall_args syscall arguments parameters container into
struct thread. For all architectures, the syscall trap handlers have to allocate the structure on the stack. The structure takes 88 bytes on 64bit arches which is not negligible. Also, it cannot be easily found by other code, which e.g. caused duplication of some members of the structure to struct thread already. The change removes td_dbg_sc_code and td_dbg_sc_nargs which were directly copied from syscall_args. The structure is put into the copied on fork part of the struct thread to make the syscall arguments information correct in the child after fork. This move will also allow several more uses shortly. Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks X-Differential revision: https://reviews.freebsd.org/D11080
Notes
Notes: svn path=/head/; revision=319873
Diffstat (limited to 'sys/amd64/linux32/linux32_sysvec.c')
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index c264f3ab0e3c..ea849ba3d847 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -725,13 +725,15 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
}
static int
-linux32_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
+linux32_fetch_syscall_args(struct thread *td)
{
struct proc *p;
struct trapframe *frame;
+ struct syscall_args *sa;
p = td->td_proc;
frame = td->td_frame;
+ sa = &td->td_sa;
sa->args[0] = frame->tf_rbx;
sa->args[1] = frame->tf_rcx;