From nobody Wed Dec 8 18:47:25 2021 X-Original-To: dev-commits-src-main@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 E0B8318C83FE; Wed, 8 Dec 2021 18:47:25 +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 4J8R3x4crqz3Fv1; Wed, 8 Dec 2021 18:47:25 +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 7A4761817F; Wed, 8 Dec 2021 18:47:25 +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 1B8IlPdN010686; Wed, 8 Dec 2021 18:47:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B8IlPDS010685; Wed, 8 Dec 2021 18:47:25 GMT (envelope-from git) Date: Wed, 8 Dec 2021 18:47:25 GMT Message-Id: <202112081847.1B8IlPDS010685@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: 547566526f6e - main - Make struct syscall_args machine independent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 547566526f6ebdb7b78b6ab78d396b7ef2ec2a3b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638989245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPVtxjDJh0HMLKjTqUcSyWOD88UlWoipusUPw2LlZAo=; b=qv+qA+Srfm12xmIoq377cD8v9C26R/qjgss445DICkxijsgHXhvnmjs8Y09Tx+rtKF4+bG /MNEY3Z7r86SheryeRCYxsO00a+74uClxb0AFFNYlByjhalVs5dDjFblWzQhGOvYHuvajs kpO+QLjhDux0tBYwJNCZhn8mF4s3ckjLfoqQo6dn2uO19oEWNAOpF4f32AICkRxGZfgaOj 3RVmW12BSIi7k8JKoCL5Zn5EGL0qxWO95lXTOe4gDBJgwE/LOP8ub0j/i04cOHN6CrTNBR jwFSDKIPr5QgLMw3440AxRFxGAcqO79cA3asNXpr6c4o2EGDWwkSMqwZcken1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638989245; a=rsa-sha256; cv=none; b=kRYmdpQ7O6ZhNa7KAPm0cPnVDmfJIdiw3yjnxObrtqjDmXkpQ6pDHiwf7QoJ2O4WX1mkqy JmM/nAIY/CWYcwjwI2B7RAOhZ+/etRaDpuqYYe/i8hPrTzBji0ghn71qwsTF4hIYsYD1HZ A/Uf/KufStDQ6ovTeXVQvTrI9FhTeJYSfDVbXa+x0AmR2pYUyHESoKRhz3iYKYg1bVzvrG 3p7TxGC0NiGLMbBufNXPfk5PBuh0iGyu8ZUWt3MPkp4cI0i6ruHI0c+NEtoVEQbufr+jep 2SwOf1ZEmc6Qp8KdG4SoVeuMTzrAx86tmZGxu+qyhGSwXlLYwlFPa9OIFWscyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=547566526f6ebdb7b78b6ab78d396b7ef2ec2a3b commit 547566526f6ebdb7b78b6ab78d396b7ef2ec2a3b Author: Brooks Davis AuthorDate: 2021-12-08 18:45:15 +0000 Commit: Brooks Davis CommitDate: 2021-12-08 18:45:33 +0000 Make struct syscall_args machine independent After a round of cleanups in late 2020, all definitions are functionally identical. This removes a rotted __aligned(8) on arm. It was added in b7112ead32bc50ef9744099bdbb1cfbd6e906b2a and was intended to align the args member so that 64-bit types (off_t, etc) could be safely read on armeb compiled with clang. With the removal of armev, this is no longer needed (armv7 requires that 32-bit aligned reads of 64-bit values be supported and we enable such support on armv6). As further evidence this is unnecessary, cleanups to struct syscall_args have resulted in args being 32-bit aligned on 32-bit systems. The sole effect is to bloat the struct by 4 bytes. Reviewed by: kib, jhb, imp Differential Revision: https://reviews.freebsd.org/D33308 --- sys/amd64/include/proc.h | 7 ------- sys/arm/include/proc.h | 16 ---------------- sys/arm64/include/proc.h | 8 -------- sys/i386/include/proc.h | 7 ------- sys/mips/include/proc.h | 8 -------- sys/powerpc/include/proc.h | 8 -------- sys/riscv/include/proc.h | 8 -------- sys/sys/proc.h | 9 ++++++++- 8 files changed, 8 insertions(+), 63 deletions(-) diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h index 6b0d0e66d0ee..763f2a293e90 100644 --- a/sys/amd64/include/proc.h +++ b/sys/amd64/include/proc.h @@ -91,13 +91,6 @@ struct mdproc { #define KINFO_PROC_SIZE 1088 #define KINFO_PROC32_SIZE 768 -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[8]; -}; - #ifdef _KERNEL /* Get the current kernel thread stack usage. */ diff --git a/sys/arm/include/proc.h b/sys/arm/include/proc.h index 5b3b9286363d..76b05b335420 100644 --- a/sys/arm/include/proc.h +++ b/sys/arm/include/proc.h @@ -56,22 +56,6 @@ struct mdproc { #define KINFO_PROC_SIZE 816 -#define MAXARGS 8 -/* - * This holds the syscall state for a single system call. - * As some syscall arguments may be 64-bit aligned we need to ensure the - * args value is 64-bit aligned. The ABI will then ensure any 64-bit - * arguments are already correctly aligned, even if they were passed in - * via registers, we just need to make sure we copy them to an aligned - * buffer. - */ -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[MAXARGS]; -} __aligned(8); - #ifdef _KERNEL #include diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h index 95485483084a..190d26145e6b 100644 --- a/sys/arm64/include/proc.h +++ b/sys/arm64/include/proc.h @@ -47,14 +47,6 @@ struct mdproc { #define KINFO_PROC_SIZE 1088 #define KINFO_PROC32_SIZE 816 -#define MAXARGS 8 -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[MAXARGS]; -}; - #ifdef _KERNEL #include diff --git a/sys/i386/include/proc.h b/sys/i386/include/proc.h index 26149a6640cd..7affe60edab9 100644 --- a/sys/i386/include/proc.h +++ b/sys/i386/include/proc.h @@ -62,13 +62,6 @@ struct mdproc { #define KINFO_PROC_SIZE 768 -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[8]; -}; - #ifdef _KERNEL #include diff --git a/sys/mips/include/proc.h b/sys/mips/include/proc.h index 5c8bc9d934e0..e4df9e81b7bc 100644 --- a/sys/mips/include/proc.h +++ b/sys/mips/include/proc.h @@ -81,14 +81,6 @@ struct mdproc { size_t md_tls_tcb_offset; /* TCB offset */ }; -#define MAXARGS 8 -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[MAXARGS]; -}; - #ifdef __mips_n64 #define KINFO_PROC_SIZE 1088 #define KINFO_PROC32_SIZE 816 diff --git a/sys/powerpc/include/proc.h b/sys/powerpc/include/proc.h index 1dd52895bb9e..2c6a00536b8a 100644 --- a/sys/powerpc/include/proc.h +++ b/sys/powerpc/include/proc.h @@ -59,14 +59,6 @@ struct mdproc { #define KINFO_PROC_SIZE 816 #endif -#define MAXARGS 8 -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[MAXARGS]; -}; - #ifdef _KERNEL #include diff --git a/sys/riscv/include/proc.h b/sys/riscv/include/proc.h index e4ca08574bee..648c529f4322 100644 --- a/sys/riscv/include/proc.h +++ b/sys/riscv/include/proc.h @@ -45,14 +45,6 @@ struct mdproc { #define KINFO_PROC_SIZE 1088 -#define MAXARGS 8 -struct syscall_args { - u_int code; - u_int original_code; - struct sysent *callp; - register_t args[MAXARGS]; -}; - #ifdef _KERNEL #include diff --git a/sys/sys/proc.h b/sys/sys/proc.h index de19bfc9cc3b..f448c8a9d104 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -193,7 +193,6 @@ struct racct; struct sbuf; struct sleepqueue; struct socket; -struct syscall_args; struct td_sched; struct thread; struct trapframe; @@ -202,6 +201,14 @@ struct vm_map; struct vm_map_entry; struct epoch_tracker; +#define MAXARGS 8 +struct syscall_args { + u_int code; + u_int original_code; + struct sysent *callp; + register_t args[MAXARGS]; +}; + /* * XXX: Does this belong in resource.h or resourcevar.h instead? * Resource usage extension. The times in rusage structs in the kernel are