From nobody Wed Nov 17 20:22:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8EB8D18542B7; Wed, 17 Nov 2021 20:22:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ942Z6Hz4qfp; Wed, 17 Nov 2021 20:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A98222736B; Wed, 17 Nov 2021 20:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AHKMEiV059463; Wed, 17 Nov 2021 20:22:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMEYd059462; Wed, 17 Nov 2021 20:22:14 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:14 GMT Message-Id: <202111172022.1AHKMEYd059462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 70c9698f4037 - main - freebsd32: match ioctl type to default ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70c9698f4037bbae2c51d7b628433e6835450448 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=70c9698f4037bbae2c51d7b628433e6835450448 commit 70c9698f4037bbae2c51d7b628433e6835450448 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis 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, \