From ab3d9f17d3b73b74f89b4ea3bd951e09ab4149a8 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 19 Jan 2022 15:18:52 +0000 Subject: 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. --- sys/linux/init_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sys/linux/init_test.go') 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)`, + }, }) } -- cgit mrf-deployment