git: d060b420e0f6 - main - freebsd32: struct siginfo32 -> struct __siginfo32
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Mar 2024 23:15:55 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d060b420e0f6d8f6535dfcda6f580dad3f5613d3 commit d060b420e0f6d8f6535dfcda6f580dad3f5613d3 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-03-18 21:37:39 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-03-19 23:13:26 +0000 freebsd32: struct siginfo32 -> struct __siginfo32 In the next commit I will update syscalls.master to use struct __siginfo (which actually exists) so this update will be needed to make generated files (from make sysent) align. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44380 --- sys/amd64/ia32/ia32_signal.c | 4 ++-- sys/arm64/arm64/freebsd32_machdep.c | 5 +++-- sys/arm64/include/frame.h | 2 +- sys/compat/freebsd32/freebsd32_misc.c | 14 +++++++------- sys/compat/freebsd32/freebsd32_signal.h | 2 +- sys/compat/ia32/ia32_signal.h | 4 ++-- sys/compat/ia32/ia32_sysvec.c | 2 +- sys/powerpc/powerpc/exec_machdep.c | 6 +++--- sys/sys/ptrace.h | 2 +- sys/sys/signal.h | 2 +- 10 files changed, 22 insertions(+), 21 deletions(-) diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c index d7af857524c7..dea12c5346a3 100644 --- a/sys/amd64/ia32/ia32_signal.c +++ b/sys/amd64/ia32/ia32_signal.c @@ -439,7 +439,7 @@ static void freebsd4_ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { struct ia32_freebsd4_sigframe sf, *sfp; - struct siginfo32 siginfo; + struct __siginfo32 siginfo; struct proc *p; struct thread *td; struct sigacts *psp; @@ -550,7 +550,7 @@ void ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { struct ia32_sigframe sf, *sfp; - struct siginfo32 siginfo; + struct __siginfo32 siginfo; struct proc *p; struct thread *td; struct sigacts *psp; diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index fc979e193d1a..d0218dc1dc80 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -49,7 +49,8 @@ _Static_assert(sizeof(mcontext32_t) == 208, "mcontext32_t size incorrect"); _Static_assert(sizeof(ucontext32_t) == 260, "ucontext32_t size incorrect"); -_Static_assert(sizeof(struct siginfo32) == 64, "struct siginfo32 size incorrect"); +_Static_assert(sizeof(struct __siginfo32) == 64, + "struct __siginfo32 size incorrect"); extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); @@ -351,7 +352,7 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct trapframe *tf; struct sigframe32 *fp, frame; struct sigacts *psp; - struct siginfo32 siginfo; + struct __siginfo32 siginfo; struct sysentvec *sysent; int onstack; int sig; diff --git a/sys/arm64/include/frame.h b/sys/arm64/include/frame.h index a958ff240023..5593532ac287 100644 --- a/sys/arm64/include/frame.h +++ b/sys/arm64/include/frame.h @@ -70,7 +70,7 @@ struct frame { #ifdef COMPAT_FREEBSD32 struct sigframe32 { - struct siginfo32 sf_si; + struct __siginfo32 sf_si; ucontext32_t sf_uc; mcontext32_vfp_t sf_vfp; }; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index d96a85f922f9..6c703f14e408 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -247,7 +247,7 @@ freebsd32_wait6(struct thread *td, struct freebsd32_wait6_args *uap) { struct __wrusage32 wru32; struct __wrusage wru, *wrup; - struct siginfo32 si32; + struct __siginfo32 si32; struct __siginfo si, *sip; int error, status; @@ -1026,7 +1026,7 @@ freebsd32_ptrace(struct thread *td, struct freebsd32_ptrace_args *uap) */ data = sizeof(r.pl); if (uap->data < offsetof(struct ptrace_lwpinfo32, pl_siginfo) + - sizeof(struct siginfo32)) + sizeof(struct __siginfo32)) data = offsetof(struct ptrace_lwpinfo, pl_siginfo); break; case PT_GETREGS: @@ -3271,7 +3271,7 @@ freebsd32_thr_suspend(struct thread *td, struct freebsd32_thr_suspend_args *uap) } void -siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst) +siginfo_to_siginfo32(const siginfo_t *src, struct __siginfo32 *dst) { bzero(dst, sizeof(*dst)); dst->si_signo = src->si_signo; @@ -3320,7 +3320,7 @@ freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *ua struct timespec *timeout; sigset_t set; ksiginfo_t ksi; - struct siginfo32 si32; + struct __siginfo32 si32; int error; if (uap->timeout) { @@ -3343,7 +3343,7 @@ freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *ua if (uap->info) { siginfo_to_siginfo32(&ksi.ksi_info, &si32); - error = copyout(&si32, uap->info, sizeof(struct siginfo32)); + error = copyout(&si32, uap->info, sizeof(struct __siginfo32)); } if (error == 0) @@ -3358,7 +3358,7 @@ int freebsd32_sigwaitinfo(struct thread *td, struct freebsd32_sigwaitinfo_args *uap) { ksiginfo_t ksi; - struct siginfo32 si32; + struct __siginfo32 si32; sigset_t set; int error; @@ -3372,7 +3372,7 @@ freebsd32_sigwaitinfo(struct thread *td, struct freebsd32_sigwaitinfo_args *uap) if (uap->info) { siginfo_to_siginfo32(&ksi.ksi_info, &si32); - error = copyout(&si32, uap->info, sizeof(struct siginfo32)); + error = copyout(&si32, uap->info, sizeof(struct __siginfo32)); } if (error == 0) td->td_retval[0] = ksi.ksi_signo; diff --git a/sys/compat/freebsd32/freebsd32_signal.h b/sys/compat/freebsd32/freebsd32_signal.h index 910206c77328..379387dc3a8b 100644 --- a/sys/compat/freebsd32/freebsd32_signal.h +++ b/sys/compat/freebsd32/freebsd32_signal.h @@ -61,6 +61,6 @@ struct sigevent32 { struct sigevent; int convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig); -void siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst); +void siginfo_to_siginfo32(const siginfo_t *src, struct __siginfo32 *dst); #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ diff --git a/sys/compat/ia32/ia32_signal.h b/sys/compat/ia32/ia32_signal.h index bb16555eeee5..fbb50c4ef1f2 100644 --- a/sys/compat/ia32/ia32_signal.h +++ b/sys/compat/ia32/ia32_signal.h @@ -154,7 +154,7 @@ struct ia32_freebsd4_sigframe { uint32_t sf_addr; /* undocumented 4th arg */ uint32_t sf_ah; /* action/handler pointer */ struct ia32_freebsd4_ucontext sf_uc; /* = *sf_ucontext */ - struct siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ + struct __siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ }; struct ia32_sigframe { @@ -165,7 +165,7 @@ struct ia32_sigframe { uint32_t sf_ah; /* action/handler pointer */ /* Beware, hole due to ucontext being 16 byte aligned! */ struct ia32_ucontext sf_uc; /* = *sf_ucontext */ - struct siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ + struct __siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ }; struct ia32_osiginfo { diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index 974bed85480c..5174438bc40a 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -76,7 +76,7 @@ CTASSERT(sizeof(struct ia32_mcontext) == 640); CTASSERT(sizeof(struct ia32_ucontext) == 704); CTASSERT(sizeof(struct ia32_sigframe) == 800); -CTASSERT(sizeof(struct siginfo32) == 64); +CTASSERT(sizeof(struct __siginfo32) == 64); #ifdef COMPAT_FREEBSD4 CTASSERT(sizeof(struct ia32_freebsd4_mcontext) == 260); CTASSERT(sizeof(struct ia32_freebsd4_ucontext) == 324); diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 94e561ddd33a..9ab323a0e300 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -117,7 +117,7 @@ typedef struct __ucontext32 { struct sigframe32 { ucontext32_t sf_uc; - struct siginfo32 sf_si; + struct __siginfo32 sf_si; }; static int grab_mcontext32(struct thread *td, mcontext32_t *, int flags); @@ -138,7 +138,7 @@ _Static_assert(sizeof(siginfo_t) == 80, "siginfo_t size incorrect"); #ifdef COMPAT_FREEBSD32 _Static_assert(sizeof(mcontext32_t) == 1224, "mcontext32_t size incorrect"); _Static_assert(sizeof(ucontext32_t) == 1280, "ucontext32_t size incorrect"); -_Static_assert(sizeof(struct siginfo32) == 64, "struct siginfo32 size incorrect"); +_Static_assert(sizeof(struct __siginfo32) == 64, "struct __siginfo32 size incorrect"); #endif /* COMPAT_FREEBSD32 */ #else /* powerpc */ _Static_assert(sizeof(mcontext_t) == 1224, "mcontext_t size incorrect"); @@ -155,7 +155,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct thread *td; struct proc *p; #ifdef COMPAT_FREEBSD32 - struct siginfo32 siginfo32; + struct __siginfo32 siginfo32; struct sigframe32 sf32; #endif size_t sfpsize; diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h index 29569a1f0996..3a7b87bfc85f 100644 --- a/sys/sys/ptrace.h +++ b/sys/sys/ptrace.h @@ -150,7 +150,7 @@ struct ptrace_lwpinfo32 { int pl_flags; /* LWP flags. */ sigset_t pl_sigmask; /* LWP signal mask */ sigset_t pl_siglist; /* LWP pending signal */ - struct siginfo32 pl_siginfo; /* siginfo for signal */ + struct __siginfo32 pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ pid_t pl_child_pid; /* New child pid */ u_int pl_syscall_code; diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 6112b69886f3..068a7e7bc6da 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -274,7 +274,7 @@ typedef struct __siginfo { #define si_syscall _reason._capsicum._syscall #if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) -struct siginfo32 { +struct __siginfo32 { int si_signo; /* signal number */ int si_errno; /* errno association */ int si_code; /* signal code */