You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(2) |
|
2
|
3
|
4
|
5
|
6
|
7
(1) |
8
|
|
9
(3) |
10
|
11
(1) |
12
|
13
|
14
|
15
(2) |
|
16
|
17
(1) |
18
(1) |
19
|
20
(1) |
21
|
22
|
|
23
|
24
|
25
(1) |
26
|
27
|
28
|
29
|
|
30
|
31
(1) |
|
|
|
|
|
|
From: Mark W. <ma...@so...> - 2020-08-01 14:17:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ecf5ba1197c3833759b40712c401f0bdc768589f commit ecf5ba1197c3833759b40712c401f0bdc768589f Author: Mark Wielaard <ma...@kl...> Date: Sun Jul 26 22:40:22 2020 +0200 epoll_ctl warns for uninitialized padding on non-amd64 64bit arches struct vki_epoll_event is packed on x86_64, but not on other 64bit arches. This means that on 64bit arches there can be padding in the epoll_event struct. Seperately the data field is only used by user space (which might not set the data field if it doesn't need to). Only check the events field on epoll_ctl. But assume both events and data are both written to by epoll_[p]wait (exclude padding). https://bugs.kde.org/show_bug.cgi?id=422623 Diff: --- NEWS | 1 + coregrind/m_syswrap/syswrap-linux.c | 35 +++++++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 77de28a294..976344cdc0 100644 --- a/NEWS +++ b/NEWS @@ -43,6 +43,7 @@ where XXXXXX is the bug number as listed below. 369029 handle linux syscalls sched_getattr and sched_setattr n-i-bz helgrind: If hg_cli__realloc fails, return NULL. +422623 epoll_ctl warns for uninitialized padding on non-amd64 64bit arches 423021 PPC: Add missing ISA 3.0 documentation link and HWCAPS test. diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 56be3032d3..dd41022108 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -2099,8 +2099,29 @@ PRE(sys_epoll_ctl) SARG1, ( ARG2<3 ? epoll_ctl_s[ARG2] : "?" ), SARG3, ARG4); PRE_REG_READ4(long, "epoll_ctl", int, epfd, int, op, int, fd, struct vki_epoll_event *, event); - if (ARG2 != VKI_EPOLL_CTL_DEL) - PRE_MEM_READ( "epoll_ctl(event)", ARG4, sizeof(struct vki_epoll_event) ); + if (ARG2 != VKI_EPOLL_CTL_DEL) { + /* Just check the events field, the data field is for user space and + unused by the kernel. */ + struct vki_epoll_event *event = (struct vki_epoll_event *) ARG4; + PRE_MEM_READ( "epoll_ctl(event)", (Addr) &event->events, + sizeof(__vki_u32) ); + } +} + +/* RES event records have been written (exclude padding). */ +static void epoll_post_helper ( ThreadId tid, SyscallArgs* arrghs, + SyscallStatus* status ) +{ + vg_assert(SUCCESS); + if (RES > 0) { + Int i; + struct vki_epoll_event **events = (struct vki_epoll_event**)(Addr)ARG2; + for (i = 0; i < RES; i++) { + /* Assume both events and data are set (data is user space only). */ + POST_FIELD_WRITE(events[i]->events); + POST_FIELD_WRITE(events[i]->data); + } + } } PRE(sys_epoll_wait) @@ -2111,13 +2132,12 @@ PRE(sys_epoll_wait) PRE_REG_READ4(long, "epoll_wait", int, epfd, struct vki_epoll_event *, events, int, maxevents, int, timeout); + /* Assume all (maxevents) events records should be (fully) writable. */ PRE_MEM_WRITE( "epoll_wait(events)", ARG2, sizeof(struct vki_epoll_event)*ARG3); } POST(sys_epoll_wait) { - vg_assert(SUCCESS); - if (RES > 0) - POST_MEM_WRITE( ARG2, sizeof(struct vki_epoll_event)*RES ) ; + epoll_post_helper (tid, arrghs, status); } PRE(sys_epoll_pwait) @@ -2130,15 +2150,14 @@ PRE(sys_epoll_pwait) int, epfd, struct vki_epoll_event *, events, int, maxevents, int, timeout, vki_sigset_t *, sigmask, vki_size_t, sigsetsize); + /* Assume all (maxevents) events records should be (fully) writable. */ PRE_MEM_WRITE( "epoll_pwait(events)", ARG2, sizeof(struct vki_epoll_event)*ARG3); if (ARG5) PRE_MEM_READ( "epoll_pwait(sigmask)", ARG5, sizeof(vki_sigset_t) ); } POST(sys_epoll_pwait) { - vg_assert(SUCCESS); - if (RES > 0) - POST_MEM_WRITE( ARG2, sizeof(struct vki_epoll_event)*RES ) ; + epoll_post_helper (tid, arrghs, status); } PRE(sys_eventfd) |
|
From: Mark W. <ma...@so...> - 2020-08-01 13:44:12
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6323fd5bfd94c3f80e2ff44f16488e0172bd9a96 commit 6323fd5bfd94c3f80e2ff44f16488e0172bd9a96 Author: Mark Wielaard <ma...@kl...> Date: Mon Jul 27 16:36:17 2020 +0200 Handle linux syscalls sched_getattr and sched_setattr The only "special" thing about these syscalls is that the given struct sched_attr determines its own size for future expansion. Original fix by "ISHIKAWA,chiaki" <ish...@yk...> https://bugs.kde.org/show_bug.cgi?id=369029 Diff: --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 2 ++ coregrind/m_syswrap/syswrap-amd64-linux.c | 5 ++-- coregrind/m_syswrap/syswrap-arm-linux.c | 2 ++ coregrind/m_syswrap/syswrap-arm64-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-linux.c | 35 ++++++++++++++++++++++++++++ coregrind/m_syswrap/syswrap-mips32-linux.c | 3 +++ coregrind/m_syswrap/syswrap-mips64-linux.c | 2 ++ coregrind/m_syswrap/syswrap-nanomips-linux.c | 2 ++ coregrind/m_syswrap/syswrap-ppc32-linux.c | 3 +++ coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++ coregrind/m_syswrap/syswrap-s390x-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-x86-linux.c | 4 ++-- include/vki/vki-linux.h | 17 ++++++++++++++ 14 files changed, 77 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 0ffcb5bf9f..77de28a294 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ To see details of a given bug, visit where XXXXXX is the bug number as listed below. 345077 linux syscall execveat support (linux 3.19) +369029 handle linux syscalls sched_getattr and sched_setattr n-i-bz helgrind: If hg_cli__realloc fails, return NULL. 423021 PPC: Add missing ISA 3.0 documentation link and HWCAPS test. diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index cdc73c1e6d..eb0b320caa 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -227,6 +227,8 @@ DECL_TEMPLATE(linux, sys_fremovexattr); // syscalls. DECL_TEMPLATE(linux, sys_sched_setparam); DECL_TEMPLATE(linux, sys_sched_getparam); +DECL_TEMPLATE(linux, sys_sched_setattr); +DECL_TEMPLATE(linux, sys_sched_getattr); DECL_TEMPLATE(linux, sys_sched_setscheduler); DECL_TEMPLATE(linux, sys_sched_getscheduler); DECL_TEMPLATE(linux, sys_sched_yield); diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 28d90135a4..d6f3eb9109 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -846,9 +846,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 311 LINX_(__NR_kcmp, sys_kcmp), // 312 LINX_(__NR_finit_module, sys_finit_module), // 313 -// LIN__(__NR_sched_setattr, sys_ni_syscall), // 314 - -// LIN__(__NR_sched_getattr, sys_ni_syscall), // 315 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 314 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 315 LINX_(__NR_renameat2, sys_renameat2), // 316 // LIN__(__NR_seccomp, sys_ni_syscall), // 317 LINXY(__NR_getrandom, sys_getrandom), // 318 diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index 579542785e..70700e53f7 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1009,6 +1009,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 376 LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 377 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 380 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 381 LINX_(__NR_renameat2, sys_renameat2), // 382 LINXY(__NR_getrandom, sys_getrandom), // 384 diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index 81e01456f8..acca024423 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -806,8 +806,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_process_vm_writev, sys_process_vm_writev), // 271 LINX_(__NR_kcmp, sys_kcmp), // 272 LINX_(__NR_finit_module, sys_finit_module), // 273 - // (__NR_sched_setattr, sys_ni_syscall), // 274 - // (__NR_sched_getattr, sys_ni_syscall), // 275 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 274 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 275 LINX_(__NR_renameat2, sys_renameat2), // 276 // (__NR_seccomp, sys_ni_syscall), // 277 LINXY(__NR_getrandom, sys_getrandom), // 278 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 5b5b7eee63..56be3032d3 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -3677,6 +3677,41 @@ POST(sys_sched_getparam) POST_MEM_WRITE( ARG2, sizeof(struct vki_sched_param) ); } +PRE(sys_sched_setattr) +{ + struct vki_sched_attr *attr; + PRINT("sched_setattr ( %ld, %#" FMT_REGWORD "x, %#" + FMT_REGWORD "x )", SARG1, ARG2, ARG3 ); + PRE_REG_READ3(long, "sched_setattr", + vki_pid_t, pid, struct sched_attr *, p, unsigned int, flags); + /* We need to be able to read at least the size field. */ + PRE_MEM_READ( "sched_setattr(attr->size)", ARG2, sizeof(vki_uint32_t) ); + attr = (struct vki_sched_attr *)(Addr)ARG2; + if (ML_(safe_to_deref)(attr,sizeof(vki_uint32_t))) + PRE_MEM_READ( "sched_setattr(attr)", (Addr)attr, attr->size); +} + +PRE(sys_sched_getattr) +{ + struct vki_sched_attr *attr; + PRINT("sched_getattr ( %ld, %#" FMT_REGWORD "x, %ld, %#" + FMT_REGWORD "x )", SARG1, ARG2, ARG3, ARG4 ); + PRE_REG_READ4(long, "sched_getattr", + vki_pid_t, pid, struct sched_attr *, p, + unsigned int, size, unsigned int, flags); + /* We need to be able to read at least the size field. */ + PRE_MEM_READ( "sched_setattr(attr->size)", ARG2, sizeof(vki_uint32_t) ); + /* And the kernel needs to be able to write to the whole struct size. */ + attr = (struct vki_sched_attr *)(Addr)ARG2; + if (ML_(safe_to_deref)(attr,sizeof(vki_uint32_t))) + PRE_MEM_WRITE( "sched_setattr(attr)", (Addr)attr, attr->size); +} +POST(sys_sched_getattr) +{ + struct vki_sched_attr *attr = (struct vki_sched_attr *)(Addr)ARG2; + POST_MEM_WRITE( (Addr)attr, attr->size ); +} + PRE(sys_sched_getscheduler) { PRINT("sys_sched_getscheduler ( %ld )", SARG1); diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index ffb428dcb5..5face576be 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1094,6 +1094,9 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_process_vm_readv, sys_process_vm_readv), // 345 LINX_ (__NR_process_vm_writev, sys_process_vm_writev), // 346 //.. + LINX_(__NR_sched_setattr, sys_sched_setattr), // 349 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 350 + //.. LINXY (__NR_getrandom, sys_getrandom), // 353 LINXY (__NR_memfd_create, sys_memfd_create), // 354 //.. diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index e5b471955c..c64911a50b 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -798,6 +798,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_clock_adjtime, sys_clock_adjtime), LINXY (__NR_process_vm_readv, sys_process_vm_readv), LINX_ (__NR_process_vm_writev, sys_process_vm_writev), + LINX_ (__NR_sched_setattr, sys_sched_setattr), + LINXY (__NR_sched_getattr, sys_sched_getattr), LINXY (__NR_getrandom, sys_getrandom), LINXY (__NR_memfd_create, sys_memfd_create), LINX_ (__NR_execveat, sys_execveat), diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index 40253fadf5..7ceecb6daf 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -804,6 +804,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_process_vm_writev, sys_process_vm_writev), LINX_ (__NR_kcmp, sys_kcmp), LINX_ (__NR_renameat2, sys_renameat2), + LINX_ (__NR_sched_setattr, sys_sched_setattr), + LINXY (__NR_sched_getattr, sys_sched_getattr), LINXY (__NR_getrandom, sys_getrandom), LINXY (__NR_memfd_create, sys_memfd_create), LINXY (__NR_statx, sys_statx), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index eed12a1bc6..c19cb9e0ee 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1016,6 +1016,9 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351 LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 355 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 356 + LINXY(__NR_getrandom, sys_getrandom), // 359 LINXY(__NR_memfd_create, sys_memfd_create), // 360 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index d58200b491..b6422a7655 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -998,6 +998,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351 LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 355 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 356 LINX_(__NR_renameat2, sys_renameat2), // 357 LINXY(__NR_getrandom, sys_getrandom), // 359 diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index a0a330aa20..3427fee16d 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -825,8 +825,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_kcmp, sys_kcmp), // 343 // ?????(__NR_finit_module, ), // 344 -// ?????(__NR_sched_setattr, ), // 345 -// ?????(__NR_sched_getattr, ), // 346 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 345 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 346 LINX_(__NR_renameat2, sys_renameat2), // 347 // ?????(__NR_seccomp, ), // 348 LINXY(__NR_getrandom, sys_getrandom), // 349 diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 332ed0bf27..b59d96f375 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1580,8 +1580,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_kcmp, sys_kcmp), // 349 // LIN__(__NR_finit_module, sys_ni_syscall), // 350 -// LIN__(__NR_sched_setattr, sys_ni_syscall), // 351 -// LIN__(__NR_sched_getattr, sys_ni_syscall), // 352 + LINX_(__NR_sched_setattr, sys_sched_setattr), // 351 + LINXY(__NR_sched_getattr, sys_sched_getattr), // 352 LINX_(__NR_renameat2, sys_renameat2), // 353 // LIN__(__NR_seccomp, sys_ni_syscall), // 354 diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 75b5831650..ef93b92585 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -410,6 +410,23 @@ struct vki_sched_param { int sched_priority; }; +struct vki_sched_attr { + vki_uint32_t size; + vki_uint32_t sched_policy; + vki_uint64_t sched_flags; + + /* SCHED_NORMAL, SCHED_BATCH */ + vki_int32_t sched_nice; + + /* SCHED_FIFO, SCHED_RR */ + vki_uint32_t sched_priority; + + /* SCHED_DEADLINE */ + vki_uint64_t sched_runtime; + vki_uint64_t sched_deadline; + vki_uint64_t sched_period; +}; + #define VKI_TASK_COMM_LEN 16 //---------------------------------------------------------------------- |