Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2023 17:37:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273929] AArch64 machine-dependent code clobbers X0 in SIGTRAP from capsicum violations
Message-ID:  <bug-273929-227-l6LImaw0LS@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273929-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273929-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273929

--- Comment #2 from David Chisnall <theraven@FreeBSD.org> ---
(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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273929-227-l6LImaw0LS>