Skip to content

fix(syscall): synchronize Landlock global state - #186

Merged
kernalix7 merged 3 commits into
mainfrom
fix/landlock-spinlock-state
Aug 15, 2026
Merged

fix(syscall): synchronize Landlock global state#186
kernalix7 merged 3 commits into
mainfrom
fix/landlock-spinlock-state

Conversation

@kernalix7

Copy link
Copy Markdown
Owner

Summary

Replace unsynchronized mutable Landlock registries with one spinlock-protected state object, eliminating parallel host-test data races and undefined behavior.

Changes

  • move rulesets and thread restrictions into SpinLock<LandlockState>
  • keep create, add, restrict, check, close, and query operations within one guarded state snapshot
  • serialize stateful Landlock tests and reset shared state between cases
  • add a scoped multithreaded create/add/restrict/check regression test

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace -- -D warnings
  • cargo build --workspace
  • focused Landlock suite repeated 20 times under default parallelism: 860/860 passed
  • strict-provenance/preemptive Miri: 43/43 Landlock tests passed
  • bash scripts/run-tests.sh: 4,620 passed, 0 skipped
  • bash scripts/run-qemu-test.sh: x86_64, aarch64, and riscv64 passed

Checklist

  • Formatting, Clippy, and workspace build pass
  • Public APIs remain documented and unchanged
  • No new unsafe blocks or external dependencies
  • No new files require license headers
  • Documentation changes are not required for this internal synchronization fix
  • No hardcoded paths, credentials, or personal information

@kernalix7
kernalix7 merged commit e303625 into main Aug 15, 2026
3 checks passed
@kernalix7
kernalix7 deleted the fix/landlock-spinlock-state branch August 15, 2026 07:28
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