From nobody Tue Sep 19 00:11:35 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 4RqMXR3Mbjz4sylM for ; Tue, 19 Sep 2023 00:11:35 +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 4RqMXR2C3wz3X9b for ; Tue, 19 Sep 2023 00:11:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695082295; a=rsa-sha256; cv=none; b=F92ByBpdiuccwuvFCET6oR6fxos7SYRs5/N5xIsp7AotOPqNyHoqZQGPGK0RXBUVmysOOi AkjlwUF4lWqkjKA1KZrsyOlI6uUHk4MRDbHQRT43lophS3Xz5v2gAtfgLlkNl+kuVS+Hat 4GJvRV6NrhscFMimfRWMN+0iYR+nAfCHKL8Q0koYwo2/zGE6LawLS83rj34IC58tRU1SHq lS2PQVHRBicBy+LlZc7CYnvrq49DhzwivhlvVBZFo1di9mtItFkxHLjI2Agb8Z3/aNgf68 niMDNQjXqrCK5c2nizTvB5t7LP7AV/vDkw206pQKv+E6lwriPEmaoZ1FFFyFiA== 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=1695082295; 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=tDCvm2uLqGBKtjPtVb+pjQ0z3GHvKGncwaGQpYUcL+g=; b=U4TDY9uXqNXBvfbb8K6ohZ3vR+olu6zYhglUz1CvvY5XcS3zZaoEawNwdMCWyol/dp9etS BlJf77pGSMPhAolvmM/ooOJZa1L/Cx61UR7DxTG2HOyxJwIZcWUag1uwi/Exb2zkM9jXj+ H3GMoT20QzCPcjBL0be8ZtME+mKDeZPJEs6loVQgH9r4vvjBaAVlfnxc6UsC/Vxv9tZfB1 y+J7N+PSPYolZTGnTCok3iVlHY+jTeqU3ds3kjZHyAcGXu1prmwc31KSKpkvQCliIcrpnz lf1XVB0HRnynEMCmHUMMdSIRv8iPE/9McZnIpf/Q3i0F9YLRtk4KETYmC9GfmQ== 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 4RqMXR1C7PzrtK for ; Tue, 19 Sep 2023 00:11:35 +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 38J0BZHM085904 for ; Tue, 19 Sep 2023 00:11:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38J0BZk2085903 for bugs@FreeBSD.org; Tue, 19 Sep 2023 00:11:35 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: Tue, 19 Sep 2023 00:11:35 +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: kevans@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 #3 from Kyle Evans --- (In reply to David Chisnall from comment #2) > I don't have a *minimal* reproducer, but I've been porting the Verona san= dbox code to AArch64: Right, sorry, I meant that I've attached what I believe to be a minimal reproducer of your report. > 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. Th= e ECAPMODE value needs to be provided after sigreturn, I presume it's not p= ossible to insert it there?=20=20 > > Copying x0 over x9 in the syscall enter routine would be fine, I think. I can't see any reason off-hand that cpu_fetch_syscall_args() couldn't stas= h a copy of x0 off in x9 to be used in set_mcontext(). I can't imagine a situation where the error (be it ENOSYS, ECAPMODE) really matters that much, but if it did we could presumably also fence off x10 as = flag indicating whether x0 has been set to the return value or not and preserve = that in the mcontext. --=20 You are receiving this mail because: You are the assignee for the bug.=