mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
Add SECCOMP and SECCOMP_FILTER support to the Alpha architecture and fix syscall entry and ptrace issues uncovered by the seccomp-bpf selftests. The syscall entry path is reworked to consistently track syscall state using r0, r1 and r2: - r1 holds the active syscall number - r2 preserves the original syscall number for restart - r0 carries the return value, with r19 (a3) indicating success/error This allows syscall restarts to be permitted only for valid ERESTART* return codes and prevents kernel-internal restart values from leaking to userspace. The syscall tracing error marker is corrected to use the saved syscall number slot, matching the Alpha ABI. Additionally, implement minimal PTRACE_GETREGSET and PTRACE_SETREGSET support for NT_PRSTATUS, exporting struct pt_regs directly. This fixes ptrace-based seccomp tests that previously failed with -EIO. With these changes, seccomp-bpf and ptrace syscall tests pass reliably on Alpha. Tested-by: Michael Cree <[email protected]> Signed-off-by: Magnus Lindholm <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Magnus Lindholm <[email protected]>
14 lines
375 B
C
14 lines
375 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_ALPHA_SECCOMP_H
|
|
#define _ASM_ALPHA_SECCOMP_H
|
|
|
|
#include <asm/unistd.h>
|
|
#include <asm-generic/seccomp.h>
|
|
#include <uapi/linux/audit.h>
|
|
|
|
#define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ALPHA
|
|
#define SECCOMP_ARCH_NATIVE_NR NR_syscalls
|
|
#define SECCOMP_ARCH_NATIVE_NAME "alpha"
|
|
|
|
#endif /* _ASM_ALPHA_SECCOMP_H */
|