Date: Wed, 17 Nov 2021 20:22:14 GMT From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 70c9698f4037 - main - freebsd32: match ioctl type to default ABI Message-ID: <202111172022.1AHKMEYd059462@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=70c9698f4037bbae2c51d7b628433e6835450448 commit 70c9698f4037bbae2c51d7b628433e6835450448 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: match ioctl type to default ABI The command is a u_long and unsigned integers do not require special handling. The data argument isn't a special structure, just use char *. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_ioctl.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c index b3ed457f7132..4818a410586a 100644 --- a/sys/compat/freebsd32/freebsd32_ioctl.c +++ b/sys/compat/freebsd32/freebsd32_ioctl.c @@ -85,7 +85,7 @@ freebsd32_ioctl_memrange(struct thread *td, break; default: - panic("%s: unknown MEMRANGE %#x", __func__, uap->com); + panic("%s: unknown MEMRANGE %#lx", __func__, uap->com); } if ((error = fo_ioctl(fp, com, (caddr_t)&mro, td->td_ucred, td)) != 0) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index d358244c5d32..22b60cfc51bf 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -79,8 +79,8 @@ struct freebsd32_sigaltstack_args { }; struct freebsd32_ioctl_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char com_l_[PADL_(uint32_t)]; uint32_t com; char com_r_[PADR_(uint32_t)]; - char data_l_[PADL_(struct md_ioctl32 *)]; struct md_ioctl32 * data; char data_r_[PADR_(struct md_ioctl32 *)]; + char com_l_[PADL_(u_long)]; u_long com; char com_r_[PADR_(u_long)]; + char data_l_[PADL_(char *)]; char * data; char data_r_[PADR_(char *)]; }; struct freebsd32_execve_args { char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index d22304859af1..6b3178f755e9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -348,8 +348,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 54: { struct freebsd32_ioctl_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = p->com; /* uint32_t */ - uarg[2] = (intptr_t)p->data; /* struct md_ioctl32 * */ + uarg[1] = p->com; /* u_long */ + uarg[2] = (intptr_t)p->data; /* char * */ *n_args = 3; break; } @@ -3958,10 +3958,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "uint32_t"; + p = "u_long"; break; case 2: - p = "userland struct md_ioctl32 *"; + p = "userland char *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 328858071949..3fd815f62127 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -152,8 +152,8 @@ 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ const struct sigaltstack32 *ss, \ struct sigaltstack32 *oss); } -54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, uint32_t com, \ - struct md_ioctl32 *data); } +54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, u_long com, \ + char *data); } 55 AUE_REBOOT NOPROTO { int reboot(int opt); } 56 AUE_REVOKE NOPROTO { int revoke(const char *path); } 57 AUE_SYMLINK NOPROTO { int symlink(const char *path, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111172022.1AHKMEYd059462>