sys/arm64: fix COMPAT_FREEBSD32 __syscall()

It seems like _QUAD_LOWWORD was incorrectly expanded into 1,
which is correct for big endian but not little endian.  This
means we always grab the padding word for the syscall number,
which is usually 0, causing SIGSYS to be delivered to the caller.
Reintroduce _QUAD_LOWWORD to fix the syscall.

PR:		290411
MFC after:	1 week
Discussed with:	jrtc27
Reviewed by:	cognet, emaste
Approved by:	markj (mentor)
Fixes:		8c9c3144cc
Differential Revision:	https://reviews.freebsd.org/D53250
This commit is contained in:
Robert Clausecker
2025-10-21 23:35:24 +02:00
parent 2b2a4f02e0
commit 1ca09538d9
+1 -1
View File
@@ -210,7 +210,7 @@ freebsd32_fetch_syscall_args(struct thread *td)
sa->code = *ap++;
nap--;
} else if (sa->code == SYS___syscall) {
sa->code = ap[1];
sa->code = ap[_QUAD_LOWWORD];
nap -= 2;
ap += 2;
}