From nobody Sat Mar 21 22:37:48 2026 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 4fdZ8202Gwz6W8Ly for ; Sat, 21 Mar 2026 22:37:54 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fdZ814Sdfz3Vmh for ; Sat, 21 Mar 2026 22:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774132673; 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=gzX3YuHCgYJaukR9ap3G4ulatzm+A4GXPzfJrN97n+Y=; b=vQMW79aAaRYBblmr2OIk+UvvbyQFQWRt9Rzc1CcAEKqStVVbWumJv1ChLJMUcIvrBrJnQl tdiendqKvKogPGfWyd4anSFqyPvlpHQAA7IZIOlJ0Tkd+oRqQp4XJlGFPjKRKPCIc1s58r 5bKtyVqvuWYsPQmXBwdVtcoiYYS7kr2lkhLNLRUoE0d7SVmwKfcuFIJxNxkEJm3dIrAPz6 TRZb7bjlrXqloBA86xsdAJR9/ZbgyUy/gbYQExpWWOcD48Vp2/f81WklnK7WpPwzt0l/hJ o+KC/n/cWXpH/zQEieke/uWDwtN/ukNRp+oFHOE/q2WzZ98JLU6APrTXMgfEVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774132673; a=rsa-sha256; cv=none; b=IZ+c77SeMTQwq7bNaGNzDTNfno8SLzW/lo9RDVEw0eNWukh3OVJ+sBpCpgOZo3YWAQ55m1 UB+3PvV61sLwo0xulNzvi3D4/t+rGJJh8ofvGEZbnDlnYoJNnxwS+6hn6S2eq4OB9H3Ric XqvzLFc91tSga4Ucs5nOEf90LilI+L+JkdexreF/xq7hBs90TwUUO6OZbZrsgiMeZsxhYR AvXxNQ/jfE7hejT48eUxjG7f1Jo+vh6HBwBNv1ggbT0VFlw+51iXkWkqdPr0gGaL118u/y GpPuwWTG6tKH8KHgB/OHCrJ0VJcEhpNn1BU1xduVoASvZr/mvKuFkFcS3fVKwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774132673; 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=gzX3YuHCgYJaukR9ap3G4ulatzm+A4GXPzfJrN97n+Y=; b=NXjR5u7Bgu1J8/YPixfnxT5f1mT6+SaRBLLLocqqvNc8Fthj6gNQNkptvGHZ9hQv+xE1y5 4akhc8lW3LGIM1eXbPrYEYD2405mtALgydKvNKhoUNDN/5UO3FT//7WkRJOXnyF6I3Ee3/ QeMd3xctkVEGmFcwOjhArz2D/sKHiNT3kC5cziuHynD5MefZ2FrfF5DkPndwQBbqjDmYos 6vO1nBDBmq3jHci0ttjnY+4c7PNmcUJ8RMB6n91hUKiDTcXULDhTaKbf7bchQv5u7j3TS6 5DOt+vT55QaM6RWYPiDkWNddH1HedWJ/N99lgRVsgjqzy4iBLADKcrG1dvlvRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fdZ813fB3zYKQ for ; Sat, 21 Mar 2026 22:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27145 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 21 Mar 2026 22:37:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1ba29614c4ce - main - amd64: revert back struct trapframe to the pre-FRED definition 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ba29614c4ce5e261ade0bd7def94079b7b9647a Auto-Submitted: auto-generated Date: Sat, 21 Mar 2026 22:37:48 +0000 Message-Id: <69bf1dbc.27145.5b461258@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1ba29614c4ce5e261ade0bd7def94079b7b9647a commit 1ba29614c4ce5e261ade0bd7def94079b7b9647a Author: Konstantin Belousov AuthorDate: 2026-03-21 22:26:48 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-21 22:37:27 +0000 amd64: revert back struct trapframe to the pre-FRED definition Trying to use the grown struct trapframe for IDT case broke in cases where code supposed that hardware consumed sizeof(struct trapframe) of the stack space when delivering interrupt or exception. In particular, this was broken for #NM/#DB/#MC. Naive attempt of using IDT-trapframe size for stack consumption caused later problems with larger C type. Instead of pretending that IDT event delivery pushed two never-accessed doubleword to the stack, keep it honest and provide separate type for the FRED interrupt frame, i.e. struct trapframe_fred. Convert between trapframe_fred and trapframe can be done by trivial pointer arithmetic. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/include/frame.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/x86/include/frame.h b/sys/x86/include/frame.h index a6444d55cfaf..b8e090ff95d0 100644 --- a/sys/x86/include/frame.h +++ b/sys/x86/include/frame.h @@ -152,6 +152,10 @@ struct trapframe { uint16_t tf_ss; uint16_t tf_fred_evinfo1; uint32_t tf_fred_evinfo2; +}; + +struct trapframe_fred { + struct trapframe tf_idt; /* two long words added by FRED */ uint64_t tf_fred_evdata; uint64_t tf_fred_zero1;