From nobody Mon Sep 18 13:34:52 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 4Rq5Pm3RB7z4tCZB for ; Mon, 18 Sep 2023 13:34:52 +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 4Rq5Pm0y7xz4X72 for ; Mon, 18 Sep 2023 13:34:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695044092; a=rsa-sha256; cv=none; b=bIkSQTtBQuAeiAq8Orix7UOdoxaSmkavLEYibnWc5/DBFXGI9bzD3tHEHpFkPqkewTARGt 5qS+ZOK6eKTUcd+eszTM7O2pX0qAlWmuNWo9G1JTs+b0oApMzSBcsSOgF6rCN0mMMy98Uo The2z1xaAHwsMKdU9sCYsenSxLa+R3OtZX/vNMdY2TLxYJ/lND/3ZuYCuVgz3WZpM1SLrH LUrmZisQZXMBopH/elIFaK04vdzLwUByEjQZpAK6mXt6DvlDZAi71msM4EC8o78wJBOhi3 attrswAMzmwcPmoNAHRR7XPXKGvDszAJKirzo+U4PD5G+4KBqaF8N4iOlXsZhg== 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=1695044092; 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=lc5XfvZQla7ZEHSXrDd8yxS93WQCn+8XOFyWPof625Y=; b=yf1XoUTo1LQqnZhTo3TxGlGhoiL/woQa3ucVSsIoFxeFk5QgRi/irzMR6xlRRo8fjtR8rc JuoXMAYUWr9UWPiKYZCxgTFmBoA2vvJLJmQ7ObvAGiOxikwFtyBmNoExGkiwNK3wnfpqFD BQvIi4KArflH3rkKpoGI8PgQAklkpQ4OnE3DDZJQMxj3Y0vEIOyG/WvkHNln/rMVf803Ny vX6J4WubM+6g3fQDqy8fKllJ1Pr2J1qwlNjo7XXPCJJe8IYHUEh+MZtbti9WgpHNnAhhWn 4QFB6lL+kjfWyiJOiz2jOjll4BFI8gog6hLbo7cbHtl9hnhBDU+eiLco7uMV9Q== 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 4Rq5Pl72ZlzYWW for ; Mon, 18 Sep 2023 13:34:51 +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 38IDYpLR033928 for ; Mon, 18 Sep 2023 13:34:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38IDYp5r033927 for bugs@FreeBSD.org; Mon, 18 Sep 2023 13:34:51 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 13:34:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new 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: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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 Bug ID: 273929 Summary: AArch64 machine-dependent code clobbers X0 in SIGTRAP from capsicum violations Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: theraven@FreeBSD.org X0 is used as both the first argument register and as the return value. If SIGTRAP is delivered to a process for a Capsicum violation, the mcontext_t = in the signal should contain the arguments so that software can trap and emula= te the system calls. This works on x86[-64] but on AArch64 X0 is overwritten before the system call handler is entered. When emulating `open`, for exam= ple, the signal frame always sees the path as `(char*)94`, which makes this impossible. It would be nice if this could be fixed before 14.0 or be subject to an EN afterwards, since it makes capsicum trap-and-emulate behaviour unusable currently. --=20 You are receiving this mail because: You are the assignee for the bug.=