From nobody Thu Feb 10 21:34:02 2022 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 B5EA719C573F; Thu, 10 Feb 2022 21:34:02 +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 4Jvqkf3s64z4m6h; Thu, 10 Feb 2022 21:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644528842; 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=NeWkqQeTyf4AZ5IdWL5RVgOa0Hi4ddHytsQ9p1EsyV4=; b=U+fXPoB5yhNyLMHzGVIFLYsuMhpQReCM7J3ZCt5d8x3GclOt+AmiLHC0fjB8pgeeLQcunC RL38BgwHYBOvID4Yc8V2cV6YFgGvNeX12g7npf4e6ZCEdeTXjMy7rloquTv4F+LUtL2k2Q iPRAwJyKPtGOIpEKhE39/BzubMxljLPWZ7xFfs8at0s1fdz5DUtWPuooAE8tW1T09vc4Vw OLsT8bGs+TXG0crcoAI6bdoGj56a1tHGSsBg7+7fHN9RX6y94ZJkQJ5Dp41n0H2uKTpr2Z q8udAOAYkv+uo4XphDiILt7tmpSxXJABRz5WmmYdLy9Px/eHb1RkpECUGh4z0g== 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 2EDC327F16; Thu, 10 Feb 2022 21:34:02 +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 21ALY25F083794; Thu, 10 Feb 2022 21:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21ALY240083793; Thu, 10 Feb 2022 21:34:02 GMT (envelope-from git) Date: Thu, 10 Feb 2022 21:34:02 GMT Message-Id: <202202102134.21ALY240083793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6e48e160ae93 - main - powerpc: Add static asssert for context size 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e48e160ae935a3fde656c975c3f38aaae54707c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644528842; 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=NeWkqQeTyf4AZ5IdWL5RVgOa0Hi4ddHytsQ9p1EsyV4=; b=PaPOZwWSqLuTgjD6uIgHcrvbmVkGdP9cyOtATvtpr7vfmkdmMHOVl//i4AesyfKKscmciT FdPHj8KNOkFmpbIVXTaJLkyfoSvaH2JNaXnkmOJoB41Ap45V4AlvroUlvElI/g8IrXsBXj BE5Cq1MkQKp1IvhbNkvgf8KafbFwFjGB2pp8RRjsj8VG+ZxcgoWjJJk/MIasf+b33mfJzW RkLz1iPubPagxUZaoU6uH/nRwR6v+50zVzVTfzHUhO/UReg5/t2xUQY0LixU1jsGlwyEPJ Nh/dOb1/bHygOqrc8cs2vM7Ihn3RcEXlwNGtNPvrRIoaHFZdomIa04FAktmUlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644528842; a=rsa-sha256; cv=none; b=Fw1LKJOi1vS8IN3tPcgNzG75T/y02zGZkw7JNc3pfFkKOBcMIMvBttmajj99fg4kUb76DO pTNdfurndx0ye+yeZ8Z3qcZUxc3lb0bAMT04duheR63zxJ5Z1nomXl7bsvjAWJEnPea+y6 Jgf+MzsZNatSGeK2l4lccmlcIlAOOCzzGOlDe+ay8AzL3je1SbpC8kCQdFXrJbu0IvxaIl DcXoL4zRJerLfTCthXUuEC4Jj7lVQnRzMKELKfnTg1Tt8j/Rr2bIYbGMeaPiTMoRXxsP4D D8goLOGgv03VezNtGYE2W0gHNQ2LbXwlXV1ZkXY433eXgZbRoE17c9NoVKkeBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6e48e160ae935a3fde656c975c3f38aaae54707c commit 6e48e160ae935a3fde656c975c3f38aaae54707c Author: Warner Losh AuthorDate: 2022-02-10 21:27:08 +0000 Commit: Warner Losh CommitDate: 2022-02-10 21:32:20 +0000 powerpc: Add static asssert for context size Add a static assert for the siginfo_t, mcontext_t and ucontext_t sizes. These are de-facto ABI options and cannot change size ever. For powerpc64, also add asserts for {u,m}mcontext32_t and siginfo32. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D34213 --- sys/powerpc/powerpc/exec_machdep.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 66bc951fc545..572ddfa44d1f 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -130,6 +130,21 @@ static void cleanup_power_extras(struct thread *); extern struct sysentvec elf64_freebsd_sysvec_v2; #endif +#ifdef __powerpc64__ +_Static_assert(sizeof(mcontext_t) == 1392, "mcontext_t size incorrect"); +_Static_assert(sizeof(ucontext_t) == 1472, "ucontext_t size incorrect"); +_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"); +#endif /* COMPAT_FREEBSD32 */ +#else /* powerpc */ +_Static_assert(sizeof(mcontext_t) == 1224, "mcontext_t size incorrect"); +_Static_assert(sizeof(ucontext_t) == 1280, "ucontext_t size incorrect"); +_Static_assert(sizeof(siginfo_t) == 64, "siginfo_t size incorrect"); +#endif + void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) {