From nobody Mon Sep 18 17:37:14 2023 X-Original-To: bugs@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 4RqBnQ2rYYz4tWXy for ; Mon, 18 Sep 2023 17:37:14 +0000 (UTC) (envelope-from bugzilla-noreply@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 4RqBnQ0bRVz3YRb for ; Mon, 18 Sep 2023 17:37:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695058634; a=rsa-sha256; cv=none; b=MytbVFqXE8L+DRQ5U1sjnCNka7tDg7uCgQ/ZTrTBhP+L0S763COEKRSyX9EeDoICaLwBY6 J4L1k4f61efX0l5Th5otqJ2AVl/RhUCwVO8VGasqwMhjkDY8Rkc9UBd5uqu8kwr+9zoH4d cqywlrGmciV/d/mYKSbXh8lIm1Q875dlY5CapQWuV8OW1eXLL+ZxSFwzjN/Lk3cSN7WWKJ njb3Et2Xrz7WxomzSclkSC/n+yr39irboX87pQAsmAgnNiM6xJv5Wnc+pPofE6qhsStQ8L rDz3dN6ICd8cao11dgdhWIxWuDKFF/uzbemwrk0GeEz+f+6zRnB6KV9lfhL7Tg== 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=1695058634; 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: in-reply-to:in-reply-to:references:references; bh=tg6y+qEYwVDzCv2QH8B7uvPR8owKGkJLI2R0PmGsdaY=; b=DpuJKpkJyesG/XC0ls05LxvDxheYwy0nJhoQKxsINrM4XDE+LSFOEhkjbVUqo/Awpdk5Lo 6tUFXp9oruRWgqCx/ZOqplv5C+mNZoeggXyscbpILggd5U5Q61uZQkMhEnf0IGsb+aRAJv t5x3g4AKT7ODtTS3ch31AIJmDTUxtmBID53qGAONQERfWDA3Qf2LP2Drz3rEhRW/BL1cIZ 1ryilNN/wBA5wsbNwhwbR2q6UjRYCgJQAv8IaOOGplkqe5xcVMwuRrVv0UKTfj7I5vtqKD 6JQYnyravLlErIMjidmNnENbE/ZcZ5GDyy6dg95P4JKykiCe1Cstlqt2/jnoNA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4RqBnP6jmyzg6D for ; Mon, 18 Sep 2023 17:37:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 38IHbDeB084028 for ; Mon, 18 Sep 2023 17:37:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38IHbDh9084026 for bugs@FreeBSD.org; Mon, 18 Sep 2023 17:37:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 273929] AArch64 machine-dependent code clobbers X0 in SIGTRAP from capsicum violations Date: Mon, 18 Sep 2023 17:37:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273929 --- Comment #2 from David Chisnall --- (In reply to Kyle Evans from comment #1) I don't have a *minimal* reproducer, but I've been porting the Verona sandb= ox code to AArch64: https://github.com/microsoft/verona-sandbox/pull/2 This works fine on FreeBSD/amd64, but on AArch64 the argument is clobbered.= I believe x86-64 clobbers the system call register, which is why we put prese= rve that in si_syscall in the signal. AArch64 puts the syscall number in x8, w= hich is not clobbered. I could work around this if the original x0 register were either provided in the siginfo or if it were provided in another caller-save register. The ECAPMODE value needs to be provided after sigreturn, I presume it's not possible to insert it there?=20=20 Copying x0 over x9 in the syscall enter routine would be fine, I think. --=20 You are receiving this mail because: You are the assignee for the bug.=