landlock_create_ruleset on x64
create a new Landlock ruleset
sys_landlock_create_ruleset(const struct landlock_ruleset_attr *attr, size_t size, __u32 flags)
| number | 444 (0x1bc) |
|---|---|
| abi | common |
| kconfig | CONFIG_SECURITY_LANDLOCK |
| family | landlock see the whole family on x64 |
| entry point | sys_landlock_create_ruleset |
| since | Linux 5.13 |
| man page | landlock_create_ruleset(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 444, the syscall number |
rdi | const struct landlock_ruleset_attr *attr |
rsi | size_t size |
rdx | __u32 flags |
rax | the return value |
Then run syscall to enter the kernel.
The syscall instruction clobbers rcx (the return address lands in rcx) and r11 (the flags land in r11).
Since Linux 5.14 the kernel reads the syscall number from eax and ignores the upper 32 bits of rax. Older kernels fail with ENOSYS when those bits are not zero, and mov eax, N clears them, so it works on both.
Same syscall on other architectures
- x86 444
- arm64 444
- arm 444
- riscv64 444
- ia32 444
- x32 1073742268
- loongarch64 444
- ppc64 444
- ppc 444
- s390x 444
- mips64 5444
- mipsn32 6444
- mipso32 4444
- alpha 554
- arc 444
- csky 444
- hexagon 444
- ia64 1468, removed in 6.7
- m68k 444
- microblaze 444
- nds32 444, removed in 5.18
- nios2 444
- openrisc 444
- parisc 444
- sh 444
- sparc 444
- sparc64 444
- xtensa 444
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/landlock_create_ruleset