diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2023-04-03 07:45:09 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2023-04-03 10:29:09 +0200 |
| commit | d04ac3a54895a36998e3f1da27c2ce33f7a80c5a (patch) | |
| tree | e79bc6b62402f2b9e1b4cf91bc38b2a6c404e7b1 /sys/linux/test/pkey | |
| parent | 7c00f48c0c766f7abd4601bd9848527dd1e4be77 (diff) | |
sys/linux: add syz_pkey_set syscalls
The syscall sets PKRU register which is part of protection keys (pkey).
Diffstat (limited to 'sys/linux/test/pkey')
| -rw-r--r-- | sys/linux/test/pkey | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/linux/test/pkey b/sys/linux/test/pkey new file mode 100644 index 000000000..063e878cc --- /dev/null +++ b/sys/linux/test/pkey @@ -0,0 +1,10 @@ +# requires: arch=amd64 + +r0 = pkey_alloc(0x0, 0x0) +mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0) +pkey_mprotect(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, r0) +syz_pkey_set(r0, 0x3) +pipe(&(0x7f0000000000)={0x0, 0x0}) # EFAULT +syz_pkey_set(r0, 0x0) +pipe(&(0x7f0000000000)={0x0, 0x0}) +pkey_free(r0) |
