Skip to content

0.27.2: the riscv64 action record is 32 bytes; an ended program's record is read only where it was written - #60

Merged
Sunrisepeak merged 1 commit into
mainfrom
riscv-sigaction-record
Nov 23, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
riscv-sigaction-record

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Measured under qemu-user 8.2.2 with the specification's conformance suite on riscv64-linux-musl (openkal-platform 0.32.1).

  • The riscv64 record of a signal's action is 32 bytes. The kernel's record is 24 bytes; qemu's user-mode translator lays it out with a restorer before the mask (its generic TARGET_SA_RESTORER), writes 32 bytes for the returned action and reads the mask at the fourth word. The 8 bytes after a 24-byte record were overwritten: the started image's reset of the signals' actions returned to its first signal on every query and the start never ended. The record carries a fourth word, the size musl gives it.
  • An ended program's record is read only where it was written. qemu 8.2 takes waitid without its fifth argument. The peak is preset to a value the kernel never writes; an unwritten record makes the processor time and the page faults come from the uncollected program's entry (as for a running program, through one helper), and the peak unavailable instead of zero.
  • tests/arch/runs.cpp: a queried action leaves the word after its record intact (fails without the change under qemu), a started program ends with its status, an ended program's peak is stated only from a written record.

Result: the conformance suite on riscv64 under qemu, 411 held, 0 did not hold (with openkal-musl 0.30.3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant