From nobody Thu Feb 10 21:34:00 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 BBD8919C572F; Thu, 10 Feb 2022 21:34:01 +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 4Jvqkd3H8fz4m8y; Thu, 10 Feb 2022 21:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644528841; 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=cGKF96hNa3kMoDL53dcXHZRw00Pvt0npqZZFd+myuCQ=; b=a1DwVJT/jQm/ho79Y7c3Iz08VTd3ej2wjJv15NwOTqX6CC4fnPsws4p5t1XDp9LLlu/yOb dV0muP1YzZL7lCX6Lczu/ah7Rze0AP1x/4CyxHzqd10La83o6xb0ZqU624QjzQBR4/73K+ 88LqRYfX7uDRJSBOFymPj/tNjwoZQy9TZ5Rf1v/tE8r62ARASHpoCWuhNPW0tpWpWmslpi aS/3OdyiAEvkBSHWMCIA7CeStx42NTXxwTS+HjuygxBL+ggY0dEUFUPOgHLHRfLCXX2wMg MXKcLnNEZbaryIl/VfjmNx7ozY3T19Qgg/weE7gDYiBFN5vDMInAyUv34BgnNg== 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 0018E27F15; Thu, 10 Feb 2022 21:34:00 +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 21ALY08D083770; Thu, 10 Feb 2022 21:34:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21ALY0YI083769; Thu, 10 Feb 2022 21:34:00 GMT (envelope-from git) Date: Thu, 10 Feb 2022 21:34:00 GMT Message-Id: <202202102134.21ALY0YI083769@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: 690601f0b4c3 - main - amd64: 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: 690601f0b4c381b09295eecd08dfe5041d17445a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644528841; 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=cGKF96hNa3kMoDL53dcXHZRw00Pvt0npqZZFd+myuCQ=; b=Fkj8gI2y11BH0AvBJcTax9M0MehkKog0Rt3q/ebKvEkxxzLGiVSt0MivS+3y5dEH7Xt1Lj PfUg5S2LxnQv2MUGr/3ShWZUOp1GEjGsnvVTbDRULbVMOJzIW49uJGAAZPM4ObuWs3u6uQ smoTMa3/5HWHTYlAGX+/tPmnMo0X8eCBg73IqbqcuNOY0VNY48JGrVJ7wK9Mgk1EYF/vTQ HViZlnw9AZbTYV6sfg7KYpQxpAB9t3I/xdJ9BG/qBWDuXT5i2bEfOu1MFfaohDuPMAEfYm CyhpIp58y3ieuwTadtYE921KVW6OEd5KccHasCHVtOmON7lm4AEUCTLjFSItRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644528841; a=rsa-sha256; cv=none; b=jLE4JMcBPrlipBvFalscakp4/o5djp3HpieWkrp6ijk+BOKDpyDkZBah/GbwmvEaNbHUGt XrJcxyTL/HZIzQis1X9eTZkLEDXu3tqxx9VqbIzkTGoPLjHZbTGa2F/vMNlM2gXpimJY7q L7Snfhjthhkdpo67szUNn9oPvPKMExHfNUSMGl9yxTQTvnbFV3vX80hwn72U4Gp1Cj7Qzg BNXqvmTnbsJtiL202Lbl+MP7Y03OLtDnClGK6JnMo0IMtNR23q+3mEBFVsfYLmZt0iakRV gJFfUX+gLBhWEHeQymi88yLPpqN8GzQQFDWdSal6qLnWVCzssISUn7rDjbxVBQ== 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=690601f0b4c381b09295eecd08dfe5041d17445a commit 690601f0b4c381b09295eecd08dfe5041d17445a Author: Warner Losh AuthorDate: 2022-02-10 21:27:01 +0000 Commit: Warner Losh CommitDate: 2022-02-10 21:32:20 +0000 amd64: 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. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D34212 --- sys/amd64/amd64/exec_machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/amd64/amd64/exec_machdep.c b/sys/amd64/amd64/exec_machdep.c index 233f222b49f1..f66203d1812e 100644 --- a/sys/amd64/amd64/exec_machdep.c +++ b/sys/amd64/amd64/exec_machdep.c @@ -95,6 +95,10 @@ __FBSDID("$FreeBSD$"); #include #include +_Static_assert(sizeof(mcontext_t) == 800, "mcontext_t size incorrect"); +_Static_assert(sizeof(ucontext_t) == 880, "ucontext_t size incorrect"); +_Static_assert(sizeof(siginfo_t) == 80, "siginfo_t size incorrect"); + /* * Send an interrupt to process. *