aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/init_test.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-01-19 15:18:52 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-01-20 16:29:05 +0100
commitab3d9f17d3b73b74f89b4ea3bd951e09ab4149a8 (patch)
tree68ff87a34750915492e2d1f20060a6d2b961f8ef /sys/linux/init_test.go
parentb838eb76eef06deea9b4ec66dd328e77ca00eb0f (diff)
sys/linux: neutralize sched_setattr
Setting itself or another process as a real-time one leads to the starvation of kernel threads and, as a result, to false positive stall bug reports. We have been getting complaints about them for already quite a long time now. Neutralize the policy argument of the syscall as much as possible given the set of possible syzkaller mutations.
Diffstat (limited to 'sys/linux/init_test.go')
-rw-r--r--sys/linux/init_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/linux/init_test.go b/sys/linux/init_test.go
index ed4cf03a1..8c236af5d 100644
--- a/sys/linux/init_test.go
+++ b/sys/linux/init_test.go
@@ -145,5 +145,25 @@ ioctl$X86_IOC_RDMSR_REGS(0xa, 0xc02063a0, 0x0)
ioctl$X86_IOC_RDMSR_REGS(0xa, 0xc02063a0, 0x0)
`,
},
+ {
+ In: `sched_setattr(0x0, &(0x7f00000002c0)={0x0, 0x1, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x0)`,
+ Out: `sched_setattr(0x0, &(0x7f00000002c0)={0x0, 0x0, 0x0, 0x0, 0x3}, 0x0)`,
+ },
+ {
+ In: `sched_setattr(0x0, &(0x7f00000002c0)={0x0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x0)`,
+ Out: `sched_setattr(0x0, &(0x7f00000002c0)={0x0, 0x0, 0x0, 0x0, 0x3}, 0x0)`,
+ },
+ {
+ In: `sched_setattr(0x0, &(0x7f00000002c0)={0x0, 0x3, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x0)`,
+ Out: `sched_setattr(0x0, &(0x7f00000002c0)={0x0, 0x3, 0x0, 0x0, 0x3}, 0x0)`,
+ },
+ {
+ In: `sched_setattr(0x0, 0x123456, 0x0)`,
+ Out: `sched_setattr(0x0, 0x0, 0x0)`,
+ },
+ {
+ In: `sched_setattr(0x0, &(0x7f00000001c0)=ANY=[@ANYBLOB="1234567812345678"], 0x0)`,
+ Out: `sched_setattr(0x0, &(0x7f00000001c0)=ANY=[@ANYBLOB='\x00\x00\x00\x00\x00\x00\x00\x00'], 0x0)`,
+ },
})
}