alpha: fix entry bugs and consolidate generic helpers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | alpha: fix saved registers in page-fault oops dumpsarch/ | +1 | 0 replies | |
| 2/14 | alpha: report syscall errors correctly to auditarch/ | +11 | 0 replies | |
| 3/14 | alpha: preserve rolled-back registers for SIGSYSarch/ arch/ arch/ | +14 | 0 replies | |
| 4/14 | alpha: fix syscall restart eligibilityarch/ arch/ | +20 | 0 replies | |
| 5/14 | alpha: distinguish skipped syscalls from invalid numbersarch/ arch/ arch/ +1 more | +19 | 0 replies | |
| 6/14 | alpha: dispatch system calls from Carch/ arch/ arch/ +6 more | +113 | 0 replies | |
| 7/14 | alpha: use generic entry helpers for interrupts and exceptionsarch/ arch/ arch/ +5 more | +154 | 0 replies | |
| 8/14 | alpha: use generic syscall exit for new tasksarch/ arch/ arch/ +1 more | +30 | 0 replies | |
| 9/14 | alpha: remove obsolete core dump register hooksarch/ arch/ arch/ | +3 | 0 replies | |
| 10/14 | alpha: use generic syscall audit classificationarch/ arch/ arch/ | +0 | 0 replies | |
| 11/14 | alpha: use generic ptrace memory writesarch/ | +0 | 0 replies | |
| 12/14 | alpha: use memparse for memory size optionsarch/ | +2 | 0 replies | |
| 13/14 | alpha: use generic getrusage for OSF resource accountingarch/ | +17 | 0 replies | |
| 14/14 | alpha: use generic CPU device registrationarch/ arch/ | +1 | 0 replies |
Reviews trailers per patch
None of the 14 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Matt Turner |
|---|---|
| Series | T-b R-b |
| 1/14 | |
| 2/14 | |
| 3/14 | |
| 4/14 | |
| 5/14 | |
| 6/14 | |
| 7/14 | |
| 8/14 | |
| 9/14 | |
| 10/14 | |
| 11/14 | |
| 12/14 | |
| 13/14 | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/14] alpha: fix entry bugs and consolidate generic helpers
With GENERIC_ENTRY upstream for Alpha, this series moves syscall dispatch and ordinary interrupt/exception entry and exit into C using generic helpers, and removes redundant fork, core-dump, audit and ptrace code. It also reuses generic memory-option parsing, OSF resource accounting and CPU registration.
The consolidation work and its regression testing uncovered bugs in saved-register oops reporting, audit return values, SIGSYS register rollback, syscall restart eligibility and arguments, and handling of skipped syscalls versus invalid syscall numbers. Patches 1-5 fix those bugs before patches 6-14 consolidate the code. The fixes remain distinct commits with their Fixes tags and existing stable Cc tags.
The fixes and consolidation changes exercise the same entry paths and need coordinated review and regression testing. They are presented together so reviewers can follow the fixes through the subsequent code changes. The fixes can still be considered for earlier application or backporting without taking the consolidation patches.
Patch 5 distinguishes the -1 abort sentinel from other invalid numbers:
explicit cancellation preserves a supplied result, whereas an invalid number permitted through entry work returns ENOSYS. It tracks supplied results explicitly, avoiding guesses from r0/a3 contents. This also preserves small successful values and seccomp results matching the entry registers. The C conversion in patch 6 retains the corrected behavior.
The OSF accounting change intentionally follows getrusage(2): RUSAGE_SELF covers the whole thread group, previously zero resource counters are reported, and CPU times use the generic microsecond conversion rather than jiffy rounding. The OSF layout and supported selectors are retained.
On stock-PAL QEMU the rebuilt ES40 image passes all 107 skip/result, 91 portable ptrace, 30 skipped-restart and 50 forced-success checks, as well as SIGSYS rollback, on one and four CPUs. The four-CPU run passes all 18 regression suites, including seccomp (99 passes, 12 expected skips). Patch 5 before the C conversion also passed its focused four-CPU run on the release base.
The complete series passed all 18 regression suites on a three-CPU EV67 ES40. The resource-accounting test now compares OSF peak RSS with native waitid() for the same child and accounts for its final voluntary context switch. Native controls reproduced both the low RSS reading and the extra context switch. The corrected run had 8,364 concurrent CHILDREN snapshots with no mismatches, and lockdep stayed enabled.
All eight focused strace injection and syscall-info tests passed. A full native strace run at 80e661285 had 1,225 passes, 303 skips and seven failures. Three passed on serial recheck. The remaining four involved CLOSE_RANGE_EXCEPT, the separately submitted PR_GET_UNALIGN fix, the Yama hint when running with CAP_SYS_PTRACE, and the getxpid syscall name on Alpha. The companion ptrace selftest remains separate from the series.
Codex assisted with code, tests and descriptions.
Magnus Lindholm (14):
alpha: fix saved registers in page-fault oops dumps
alpha: report syscall errors correctly to audit
alpha: preserve rolled-back registers for SIGSYS
alpha: fix syscall restart eligibility
alpha: distinguish skipped syscalls from invalid numbers
alpha: dispatch system calls from C
alpha: use generic entry helpers for interrupts and exceptions
alpha: use generic syscall exit for new tasks
alpha: remove obsolete core dump register hooks
alpha: use generic syscall audit classification
alpha: use generic ptrace memory writes
alpha: use memparse for memory size options
alpha: use generic getrusage for OSF resource accounting
alpha: use generic CPU device registration
arch/alpha/Kconfig | 5 +- arch/alpha/include/asm/elf.h | 7 - arch/alpha/include/asm/entry-common.h | 11 +- arch/alpha/include/asm/ptrace.h | 13 +- arch/alpha/include/asm/syscall.h | 24 +-- arch/alpha/include/asm/thread_info.h | 3 + arch/alpha/kernel/Makefile | 3 +- arch/alpha/kernel/asm-offsets.c | 1 - arch/alpha/kernel/audit.c | 62 ------- arch/alpha/kernel/entry.S | 293 ++++----------------------------- arch/alpha/kernel/irq.c | 8 +- arch/alpha/kernel/irq_alpha.c | 41 ++--- arch/alpha/kernel/osf_sys.c | 56 ++----- arch/alpha/kernel/process.c | 32 ++-- arch/alpha/kernel/proto.h | 16 +- arch/alpha/kernel/ptrace.c | 48 ++---- arch/alpha/kernel/setup.c | 41 +---- arch/alpha/kernel/signal.c | 151 ++--------------- arch/alpha/kernel/syscall.c | 85 ++++++++++ arch/alpha/kernel/syscalls/syscall.tbl | 10 +- arch/alpha/kernel/traps.c | 118 ++++++++++--- arch/alpha/mm/fault.c | 27 ++- 22 files changed, 356 insertions(+), 699 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
Signature · 1 line
2.43.0