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
(22) |
2
(19) |
3
(8) |
4
(34) |
5
(14) |
6
(14) |
|
7
(12) |
8
(15) |
9
(15) |
10
(10) |
11
(10) |
12
(28) |
13
(11) |
|
14
(22) |
15
(29) |
16
(20) |
17
(15) |
18
(39) |
19
(11) |
20
(12) |
|
21
(8) |
22
(9) |
23
(8) |
24
(10) |
25
(9) |
26
(7) |
27
(7) |
|
28
(6) |
29
(6) |
30
(11) |
|
|
|
|
|
From: Paul M. <pa...@sa...> - 2004-11-15 22:33:32
|
Nicholas Nethercote writes: > Converted more syscalls, including futex() which I'm not too sure about. What aren't you sure about? It has a couple of functions, of which the main one is to go to sleep if *ptr == val. The other functions do things like waking up tasks that are sleeping on *ptr. This is used for implementing semaphores and mutexes in userspace. The idea is that to get a mutex (or down a semaphore) you do some atomic operation on a word of memory associated with the mutex. If the result indicates that some other thread has the mutex, you do a futex call to go to sleep until the other thread unlocks the mutex. The purpose of the *ptr == val check is to avoid the race where the other thread unlocks the mutex just as you are going to sleep. In that case the value in the word of memory will have changed, and so the futex call will just return without going to sleep. When the other thread unlocks the mutex, it checks whether some other thread is sleeping on the mutex and if so, does a futex call to wake up one of the threads that are sleeping. There are various refinements that are used in NPTL. I'll ask Rusty Russell, who invented futexes, if he has any documentation on futexes. Paul. |
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 20:42:13
|
CVS commit by nethercote:
add a bunch of tests
M +3 -3 coregrind/vg_syscalls.c 1.213
M +32 -28 memcheck/tests/scalar.c 1.44
M +321 -0 memcheck/tests/scalar.stderr.exp 1.37
--- valgrind/coregrind/vg_syscalls.c #1.212:1.213
@@ -5702,6 +5702,6 @@ PREx(sys_utimes, 0)
{
PRINT("sys_utimes ( %p, %p )", arg1,arg2);
- PRE_MEM_RASCIIZ( "utimes(filename)", arg1 );
PRE_REG_READ2(long, "utimes", char *, filename, struct timeval *, tvp);
+ PRE_MEM_RASCIIZ( "utimes(filename)", arg1 );
if (arg2 != (UWord)NULL)
PRE_MEM_READ( "utimes(tvp)", arg2, sizeof(struct vki_timeval) );
@@ -5996,8 +5996,8 @@ POSTx(sys_sigpending)
PREx(sys_rt_sigpending, NBRunInLWP)
{
- PRINT( "sys_sigpending ( %p )", arg1 );
+ PRINT( "sys_rt_sigpending ( %p )", arg1 );
PRE_REG_READ2(long, "rt_sigpending",
vki_sigset_t *, set, vki_size_t, sigsetsize);
- PRE_MEM_WRITE( "sigpending(set)", arg1, sizeof(vki_sigset_t));
+ PRE_MEM_WRITE( "rt_sigpending(set)", arg1, sizeof(vki_sigset_t));
}
--- valgrind/memcheck/tests/scalar.c #1.43:1.44
@@ -485,6 +485,6 @@ int main(void)
// __NR_swapoff 115
- //GO(__NR_swapoff, ".s .m");
- //SY(__NR_swapoff);
+ GO(__NR_swapoff, "n/a");
+ //SY(__NR_swapoff); // (Not yet handled by Valgrind)
// __NR_sysinfo 116
@@ -577,6 +577,6 @@ int main(void)
// __NR_bdflush 134
- //GO(__NR_bdflush, ".s .m");
- //SY(__NR_bdflush);
+ GO(__NR_bdflush, "n/a");
+ //SY(__NR_bdflush); // (Not yet handled by Valgrind)
// __NR_sysfs 135
@@ -745,10 +745,10 @@ int main(void)
// __NR_rt_sigpending 176
- //GO(__NR_rt_sigpending, ".s .m");
- //SY(__NR_rt_sigpending);
+ GO(__NR_rt_sigpending, "2s 1m");
+ SY(__NR_rt_sigpending, x0, x0+1);
// __NR_rt_sigtimedwait 177
- //GO(__NR_rt_sigtimedwait, ".s .m");
- //SY(__NR_rt_sigtimedwait);
+ GO(__NR_rt_sigtimedwait, "4s 3m");
+ SY(__NR_rt_sigtimedwait, x0+1, x0+1, x0+1, x0);
// __NR_rt_sigqueueinfo 178
@@ -761,10 +761,10 @@ int main(void)
// __NR_pread64 180
- //GO(__NR_pread64, ".s .m");
- //SY(__NR_pread64);
+ GO(__NR_pread64, "5s 1m");
+ SY(__NR_pread64, x0, x0, x0+1, x0, x0);
// __NR_pwrite64 181
- //GO(__NR_pwrite64, ".s .m");
- //SY(__NR_pwrite64);
+ GO(__NR_pwrite64, "5s 1m");
+ SY(__NR_pwrite64, x0, x0, x0+1, x0, x0);
// __NR_chown 182
@@ -773,6 +773,6 @@ int main(void)
// __NR_getcwd 183
- //GO(__NR_getcwd, ".s .m");
- //SY(__NR_getcwd);
+ GO(__NR_getcwd, "2s 1m");
+ SY(__NR_getcwd, x0, x0+1);
// __NR_capget 184
@@ -789,6 +789,6 @@ int main(void)
// __NR_sendfile 187
- //GO(__NR_sendfile, ".s .m");
- //SY(__NR_sendfile);
+ GO(__NR_sendfile, "4s 1m");
+ SY(__NR_sendfile, x0, x0, x0+1, x0);
// __NR_getpmsg 188
@@ -913,10 +913,10 @@ int main(void)
// __NR_mincore 218
- //GO(__NR_mincore, ".s .m");
- //SY(__NR_mincore);
+ GO(__NR_mincore, "3s 1m");
+ SY(__NR_mincore, x0, x0+40960, x0);
// __NR_madvise 219
- //GO(__NR_madvise, ".s .m");
- //SY(__NR_madvise);
+ GO(__NR_madvise, "3s 0m");
+ SY(__NR_madvise, x0, x0, x0);
// __NR_getdents64 220
@@ -997,10 +997,14 @@ int main(void)
// __NR_sendfile64 239
- //GO(__NR_sendfile64, ".s .m");
- //SY(__NR_sendfile64);
+ GO(__NR_sendfile64, "4s 1m");
+ SY(__NR_sendfile64, x0, x0, x0+1, x0);
// __NR_futex 240
- //GO(__NR_futex, ".s .m");
- //SY(__NR_futex);
+ #ifndef FUTEX_WAIT
+ #define FUTEX_WAIT 0
+ #endif
+ // XXX: again, glibc not doing 6th arg means we have only 5s errors
+ GO(__NR_futex, "5s 2m");
+ SY(__NR_futex, x0+FUTEX_WAIT, x0, x0, x0+1, x0, x0);
// __NR_sched_setaffinity 241
@@ -1069,6 +1073,6 @@ int main(void)
// __NR_remap_file_pages 257
- //GO(__NR_remap_file_pages, ".s .m");
- //SY(__NR_remap_file_pages);
+ GO(__NR_remap_file_pages, "n/a");
+ //SY(__NR_remap_file_pages); // (Not yet handled by Valgrind)
// __NR_set_tid_address 258
@@ -1125,6 +1129,6 @@ int main(void)
// __NR_utimes 271
- //GO(__NR_utimes, ".s .m");
- //SY(__NR_utimes);
+ GO(__NR_utimes, "2s 2m");
+ SY(__NR_utimes, x0, x0+1);
// __NR_fadvise64_64 272
--- valgrind/memcheck/tests/scalar.stderr.exp #1.36:1.37
@@ -1470,4 +1470,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+115: __NR_swapoff n/a
+-----------------------------------------------------
+-----------------------------------------------------
116: __NR_sysinfo 1s 1m
-----------------------------------------------------
@@ -1720,4 +1723,7 @@
by 0x........: ...
-----------------------------------------------------
+134: __NR_bdflush n/a
+-----------------------------------------------------
+-----------------------------------------------------
136: __NR_personality 1s 0m
-----------------------------------------------------
@@ -2359,4 +2365,132 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+176: __NR_rt_sigpending 2s 1m
+-----------------------------------------------------
+
+Syscall param rt_sigpending(set) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigpending(sigsetsize) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigpending(set) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+177:__NR_rt_sigtimedwait 4s 3m
+-----------------------------------------------------
+
+Syscall param rt_sigtimedwait(set) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigtimedwait(info) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigtimedwait(timeout) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigtimedwait(sigsetsize) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigtimedwait(set) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param rt_sigtimedwait(info) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param rt_sigtimedwait(timeout) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+180: __NR_pread64 5s 1m
+-----------------------------------------------------
+
+Syscall param pread64(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pread64(buf) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pread64(count) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pread64(offset_low32) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pread64(offset_high32) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pread64(buf) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+181: __NR_pwrite64 5s 1m
+-----------------------------------------------------
+
+Syscall param pwrite64(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pwrite64(buf) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pwrite64(count) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pwrite64(offset_low32) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pwrite64(offset_high32) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param pwrite64(buf) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
182: __NR_chown 3s 1m
-----------------------------------------------------
@@ -2383,4 +2517,23 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+183: __NR_getcwd 2s 1m
+-----------------------------------------------------
+
+Syscall param getcwd(buf) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param getcwd(size) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param getcwd(buf) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
184: __NR_capget 2s 2m
-----------------------------------------------------
@@ -2433,4 +2586,33 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+187: __NR_sendfile 4s 1m
+-----------------------------------------------------
+
+Syscall param sendfile(out_fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile(in_fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile(offset) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile(count) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile(offset) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
190: __NR_vfork 0s 0m
-----------------------------------------------------
@@ -2879,4 +3061,46 @@
-----------------------------------------------------
-----------------------------------------------------
+218: __NR_mincore 3s 1m
+-----------------------------------------------------
+
+Syscall param mincore(start) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mincore(length) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mincore(vec) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mincore(vec) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+219: __NR_madvise 3s 0m
+-----------------------------------------------------
+
+Syscall param madvise(start) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param madvise(length) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param madvise(advice) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
220: __NR_getdents64 3s 1m
-----------------------------------------------------
@@ -3338,4 +3562,73 @@
-----------------------------------------------------
-----------------------------------------------------
+239: __NR_sendfile64 4s 1m
+-----------------------------------------------------
+
+Syscall param sendfile64(out_fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile64(in_fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile64(offset) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile64(count) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sendfile64(offset) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+240: __NR_futex 5s 2m
+-----------------------------------------------------
+
+Syscall param futex(futex) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param futex(op) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param futex(val) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param futex(utime) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param futex(uaddr2) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param futex(futex) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param futex(timeout) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
241:__NR_sched_setaffinity 3s 1m
-----------------------------------------------------
@@ -3490,4 +3783,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+257:__NR_remap_file_pages n/a
+-----------------------------------------------------
+-----------------------------------------------------
258:__NR_set_tid_address 1s 0m
-----------------------------------------------------
@@ -3555,4 +3851,29 @@
-----------------------------------------------------
-----------------------------------------------------
+271: __NR_utimes 2s 2m
+-----------------------------------------------------
+
+Syscall param utimes(filename) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param utimes(tvp) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param utimes(filename) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param utimes(tvp) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
272: __NR_fadvise64_64 n/a
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 20:23:20
|
CVS commit by nethercote:
Converted more syscalls, including futex() which I'm not too sure about.
M +89 -73 vg_syscalls.c 1.212
--- valgrind/coregrind/vg_syscalls.c #1.211:1.212
@@ -1219,5 +1219,5 @@ PREx(sys_umount, 0)
PREx(sys_modify_ldt, Special)
{
- PRINT("modify_ldt ( %d, %p, %d )", arg1,arg2,arg3);
+ PRINT("sys_modify_ldt ( %d, %p, %d )", arg1,arg2,arg3);
PRE_REG_READ3(int, "modify_ldt", int, func, void *, ptr,
unsigned long, bytecount);
@@ -1612,5 +1612,5 @@ POSTx(sys_syslog)
PREx(sys_personality, 0)
{
- PRINT("personality ( %llu )", (ULong)arg1);
+ PRINT("sys_personality ( %llu )", (ULong)arg1);
PRE_REG_READ1(long, "personality", vki_u_long, persona);
}
@@ -1623,8 +1623,9 @@ PREx(sys_chroot, 0)
}
-PRE(madvise)
+PREx(sys_madvise, MayBlock)
{
- /* int madvise(void *start, size_t length, int advice ); */
- PRINT("madvise ( %p, %llu, %d )", arg1,(ULong)arg2,arg3);
+ PRINT("sys_madvise ( %p, %llu, %d )", arg1,(ULong)arg2,arg3);
+ PRE_REG_READ3(long, "madvise",
+ unsigned long, start, vki_size_t, length, int, advice);
}
@@ -1762,28 +1763,30 @@ PREx(sys_setfsuid16, 0)
}
-PRE(sendfile)
+PREx(sys_sendfile, MayBlock)
{
- /* ssize_t sendfile(int out_fd, int in_fd, off_t *offset,
- size_t count) */
- PRINT("sendfile ( %d, %d, %p, %llu )",arg1,arg2,arg3,(ULong)arg4);
+ PRINT("sys_sendfile ( %d, %d, %p, %llu )", arg1,arg2,arg3,(ULong)arg4);
+ PRE_REG_READ4(ssize_t, "sendfile",
+ int, out_fd, int, in_fd, vki_off_t *, offset,
+ vki_size_t, count);
if (arg3 != (UWord)NULL)
PRE_MEM_WRITE( "sendfile(offset)", arg3, sizeof(vki_off_t) );
}
-POST(sendfile)
+POSTx(sys_sendfile)
{
POST_MEM_WRITE( arg3, sizeof( vki_off_t ) );
}
-PRE(sendfile64)
+PREx(sys_sendfile64, MayBlock)
{
- /* ssize_t sendfile64(int out_df, int in_fd, loff_t *offset,
- size_t count); */
PRINT("sendfile64 ( %d, %d, %p, %llu )",arg1,arg2,arg3,(ULong)arg4);
+ PRE_REG_READ4(ssize_t, "sendfile64",
+ int, out_fd, int, in_fd, vki_loff_t *, offset,
+ vki_size_t, count);
if (arg3 != (UWord)NULL)
PRE_MEM_WRITE( "sendfile64(offset)", arg3, sizeof(vki_loff_t) );
}
-POST(sendfile64)
+POSTx(sys_sendfile64)
{
if (arg3 != (UWord)NULL ) {
@@ -1792,9 +1795,12 @@ POST(sendfile64)
}
-PRE(pwrite64)
+// XXX: only for 32-bit archs
+PREx(sys_pwrite64, MayBlock)
{
- // ssize_t pwrite64(int fd, const void *buf, size_t nbytes, loff_t offset);
- PRINT("pwrite64 ( %d, %p, %llu, %lld )",
+ PRINT("sys_pwrite64 ( %d, %p, %llu, %lld )",
arg1, arg2, (ULong)arg3, LOHI64(arg4,arg5));
+ PRE_REG_READ5(ssize_t, "pwrite64",
+ unsigned int, fd, const char *, buf, vki_size_t, count,
+ vki_u32, offset_low32, vki_u32, offset_high32);
PRE_MEM_READ( "pwrite64(buf)", arg2, arg3 );
}
@@ -1838,13 +1844,16 @@ PREx(sys_getsid, 0)
}
-PRE(pread64)
+// XXX: only for 32-bit archs
+PREx(sys_pread64, MayBlock)
{
- /* ssize_t pread64(int fd, void *buf, size_t count, loff_t offset); */
- PRINT("pread ( %d, %p, %llu, %lld )",
+ PRINT("sys_pread64 ( %d, %p, %llu, %lld )",
arg1, arg2, (ULong)arg3, LOHI64(arg4,arg5));
- PRE_MEM_WRITE( "pread(buf)", arg2, arg3 );
+ PRE_REG_READ5(ssize_t, "pread64",
+ unsigned int, fd, char *, buf, vki_size_t, count,
+ vki_u32, offset_low32, vki_u32, offset_high32);
+ PRE_MEM_WRITE( "pread64(buf)", arg2, arg3 );
}
-POST(pread64)
+POSTx(sys_pread64)
{
if (res > 0) {
@@ -1878,5 +1887,5 @@ PREx(sys_init_module, MayBlock)
PREx(sys_ioperm, 0)
{
- PRINT("ioperm ( %d, %d, %d )", arg1, arg2, arg3 );
+ PRINT("sys_ioperm ( %d, %d, %d )", arg1, arg2, arg3 );
PRE_REG_READ3(long, "ioperm",
unsigned long, from, unsigned long, num, int, turn_on);
@@ -1885,5 +1894,5 @@ PREx(sys_ioperm, 0)
PREx(sys_capget, 0)
{
- PRINT("capget ( %p, %p )", arg1, arg2 );
+ PRINT("sys_capget ( %p, %p )", arg1, arg2 );
PRE_REG_READ2(long, "capget",
vki_cap_user_header_t, header, vki_cap_user_data_t, data);
@@ -2219,5 +2228,5 @@ PREx(sys_fchown, 0)
PREx(sys_fchmod, 0)
{
- PRINT("fchmod ( %d, %d )", arg1,arg2);
+ PRINT("sys_fchmod ( %d, %d )", arg1,arg2);
PRE_REG_READ2(long, "fchmod", unsigned int, fildes, vki_mode_t, mode);
}
@@ -2380,5 +2389,5 @@ POSTx(sys_getdents)
PREx(sys_getdents64, MayBlock)
{
- PRINT("getdents64 ( %d, %p, %d )",arg1,arg2,arg3);
+ PRINT("sys_getdents64 ( %d, %p, %d )",arg1,arg2,arg3);
PRE_REG_READ3(long, "getdents64",
unsigned int, fd, struct linux_dirent64 *, dirp,
@@ -2409,5 +2418,5 @@ POSTx(sys_getgroups16)
PREx(sys_getgroups, 0)
{
- PRINT("getgroups ( %d, %p )", arg1, arg2);
+ PRINT("sys_getgroups ( %d, %p )", arg1, arg2);
PRE_REG_READ2(long, "getgroups", int, size, vki_gid_t *, list);
if (arg1 > 0)
@@ -2421,14 +2430,14 @@ POSTx(sys_getgroups)
}
-PRE(getcwd)
+PREx(sys_getcwd, 0)
{
- // Note that this prototype is the kernel one, with a different return
- // type to the glibc one!
- /* long getcwd(char *buf, size_t size); */
- PRINT("getcwd ( %p, %llu )",arg1,(ULong)arg2);
+ // Note that the kernel version of getcwd() behaves quite differently to
+ // the glibc one.
+ PRINT("sys_getcwd ( %p, %llu )", arg1,(ULong)arg2);
+ PRE_REG_READ2(long, "getcwd", char *, buf, unsigned long, size);
PRE_MEM_WRITE( "getcwd(buf)", arg1, arg2 );
}
-POST(getcwd)
+POSTx(sys_getcwd)
{
if (res != (Addr)NULL)
@@ -4439,5 +4448,5 @@ PREx(sys_lseek, 0)
PREx(sys_llseek, 0)
{
- PRINT("llseek ( %d, 0x%x, 0x%x, %p, %d )", arg1,arg2,arg3,arg4,arg5);
+ PRINT("sys_llseek ( %d, 0x%x, 0x%x, %p, %d )", arg1,arg2,arg3,arg4,arg5);
PRE_REG_READ5(long, "llseek",
unsigned int, fd, unsigned long, offset_high,
@@ -4470,5 +4479,5 @@ POSTx(sys_newlstat)
PREx(sys_lstat64, 0)
{
- PRINT("lstat64 ( %p(%s), %p )",arg1,arg1,arg2);
+ PRINT("sys_lstat64 ( %p(%s), %p )",arg1,arg1,arg2);
PRE_REG_READ2(long, "lstat64", char *, file_name, struct stat64 *, buf);
PRE_MEM_RASCIIZ( "lstat64(file_name)", arg1 );
@@ -4606,12 +4615,14 @@ POSTx(sys_munmap)
}
-PRE(mincore)
+PREx(sys_mincore, 0)
{
- /* int mincore(void *start, size_t length, unsigned char *vec); */
- PRINT("mincore ( %p, %llu, %p )", arg1,(ULong)arg2,arg3);
+ PRINT("sys_mincore ( %p, %llu, %p )", arg1,(ULong)arg2,arg3);
+ PRE_REG_READ3(long, "mincore",
+ unsigned long, start, vki_size_t, length,
+ unsigned char *, vec);
PRE_MEM_WRITE( "mincore(vec)", arg3, (arg2 + 4096 - 1) / 4096);
}
-POST(mincore)
+POSTx(sys_mincore)
{
POST_MEM_WRITE( arg3, (arg2 + 4096 - 1) / 4096 );
@@ -4620,5 +4631,5 @@ POST(mincore)
PREx(sys_nanosleep, MayBlock|PostOnFail)
{
- PRINT("nanosleep ( %p, %p )", arg1,arg2);
+ PRINT("sys_nanosleep ( %p, %p )", arg1,arg2);
PRE_REG_READ2(long, "nanosleep",
struct timespec *, req, struct timespec *, rem);
@@ -5688,17 +5699,19 @@ POSTx(sys_adjtimex)
}
-PRE(utimes)
+PREx(sys_utimes, 0)
{
- /* int utimes(const char *filename, struct timeval *tvp); */
- PRINT("utimes ( %p, %p )", arg1,arg2);
+ PRINT("sys_utimes ( %p, %p )", arg1,arg2);
PRE_MEM_RASCIIZ( "utimes(filename)", arg1 );
+ PRE_REG_READ2(long, "utimes", char *, filename, struct timeval *, tvp);
if (arg2 != (UWord)NULL)
PRE_MEM_READ( "utimes(tvp)", arg2, sizeof(struct vki_timeval) );
}
-PRE(futex)
+PREx(sys_futex, MayBlock)
{
- /* int futex(void *futex, int op, int val, const struct timespec *timeout); */
- PRINT("futex ( %p, %d, %d, %p, %p )", arg1,arg2,arg3,arg4,arg5);
+ PRINT("sys_futex ( %p, %d, %d, %p, %p )", arg1,arg2,arg3,arg4,arg5);
+ PRE_REG_READ6(long, "futex",
+ vki_u32 *, futex, int, op, int, val,
+ struct timespec *, utime, vki_u32 *, uaddr2, int, val3);
PRE_MEM_READ( "futex(futex)", arg1, sizeof(int) );
if (arg2 == VKI_FUTEX_WAIT && arg4 != (UWord)NULL)
@@ -5708,5 +5721,5 @@ PRE(futex)
}
-POST(futex)
+POSTx(sys_futex)
{
POST_MEM_WRITE( arg1, sizeof(int) );
@@ -5790,16 +5803,20 @@ PREx(sys_rt_sigsuspend, MayBlock)
}
-PRE(rt_sigtimedwait)
+PREx(sys_rt_sigtimedwait, MayBlock)
{
- /* int sigtimedwait(const sigset_t *set, siginfo_t *info,
- const struct timespec timeout); */
- PRINT("sigtimedwait ( %p, %p, timeout )", arg1, arg2);
+ PRINT("sys_rt_sigtimedwait ( %p, %p, %p, %lld )",
+ arg1,arg2,arg3,(ULong)arg4);
+ PRE_REG_READ4(long, "rt_sigtimedwait",
+ const vki_sigset_t *, set, vki_siginfo_t *, info,
+ const struct timespec *, timeout, vki_size_t, sigsetsize);
if (arg1 != (UWord)NULL)
- PRE_MEM_READ( "sigtimedwait(set)", arg1, sizeof(vki_sigset_t));
+ PRE_MEM_READ( "rt_sigtimedwait(set)", arg1, sizeof(vki_sigset_t));
if (arg2 != (UWord)NULL)
- PRE_MEM_WRITE( "sigtimedwait(info)", arg2, sizeof(vki_siginfo_t) );
+ PRE_MEM_WRITE( "rt_sigtimedwait(info)", arg2, sizeof(vki_siginfo_t) );
+ PRE_MEM_READ( "rt_sigtimedwait(timeout)",
+ arg4, sizeof(struct vki_timespec) );
}
-POST(rt_sigtimedwait)
+POSTx(sys_rt_sigtimedwait)
{
if (arg2 != (UWord)NULL)
@@ -6604,17 +6621,17 @@ static const struct sys_info sys_info[]
SYSXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 175 * ?
SYSXY(__NR_rt_sigpending, sys_rt_sigpending), // 176 * ?
- SYSBA(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, MayBlock), // 177 *
+ SYSXY(__NR_rt_sigtimedwait, sys_rt_sigtimedwait), // 177 * ?
SYSBA(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, 0), // 178 *
SYSX_(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 179 () ()
- SYSBA(__NR_pread64, sys_pread64, MayBlock), // 180 *
+ SYSXY(__NR_pread64, sys_pread64), // 180 * (Unix98?)
- SYSB_(__NR_pwrite64, sys_pwrite64, MayBlock), // 181 *
+ SYSX_(__NR_pwrite64, sys_pwrite64), // 181 * (Unix98?)
SYSX_(__NR_chown, sys_chown16), // 182 * P
- SYSBA(__NR_getcwd, sys_getcwd, 0), // 183 *
+ SYSXY(__NR_getcwd, sys_getcwd), // 183 * P
SYSXY(__NR_capget, sys_capget), // 184 * L?
SYSX_(__NR_capset, sys_capset), // 185 * L?
SYSBA(__NR_sigaltstack, sys_sigaltstack, SIG_SIM), // 186
- SYSBA(__NR_sendfile, sys_sendfile, MayBlock), // 187 *
+ SYSXY(__NR_sendfile, sys_sendfile), // 187 * L
SYSBA(__NR_getpmsg, sys_ni_syscall, MayBlock), // 188 ...
SYSB_(__NR_putpmsg, sys_ni_syscall, MayBlock), // 189 ...
@@ -6654,6 +6671,6 @@ static const struct sys_info sys_info[]
SYSX_(__NR_setfsgid32, sys_setfsgid), // 216 * L
// (__NR_pivot_root, sys_pivot_root), // 217 * L
- SYSBA(__NR_mincore, sys_mincore, 0), // 218 *
- SYSB_(__NR_madvise, sys_madvise, MayBlock), // 219 *
+ SYSXY(__NR_mincore, sys_mincore), // 218 * non-P?
+ SYSX_(__NR_madvise, sys_madvise), // 219 * P
SYSXY(__NR_getdents64, sys_getdents64), // 220 * (SVr4,SVID?)
@@ -6682,7 +6699,7 @@ static const struct sys_info sys_info[]
SYSX_(__NR_fremovexattr, sys_fremovexattr), // 237 * L?
// (__NR_tkill, sys_tkill), // 238 * L
- SYSBA(__NR_sendfile64, sys_sendfile64, MayBlock), // 239 *
+ SYSXY(__NR_sendfile64, sys_sendfile64), // 239 * L
- SYSBA(__NR_futex, sys_futex, MayBlock), // 240 *
+ SYSXY(__NR_futex, sys_futex), // 240 * L
SYSX_(__NR_sched_setaffinity,sys_sched_setaffinity), // 241 * L?
SYSXY(__NR_sched_getaffinity,sys_sched_getaffinity), // 242 * L?
@@ -6722,6 +6739,5 @@ static const struct sys_info sys_info[]
// (__NR_tgkill, sys_tgkill), // 270 * ()
- SYSB_(__NR_utimes, sys_utimes, 0), // 271 *
-
+ SYSX_(__NR_utimes, sys_utimes), // 271 * (4.3BSD)
// (__NR_fadvise64_64, sys_fadvise64_64), // 272 * ()
SYSX_(__NR_vserver, sys_ni_syscall), // 273 * P -- unimplemented
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 19:23:50
|
CVS commit by nethercote:
Converted rt_sigpending. This allowed PREALIAS/POSTALIAS to be removed too.
M +14 -14 vg_syscalls.c 1.211
--- valgrind/coregrind/vg_syscalls.c #1.210:1.211
@@ -1087,14 +1087,4 @@ static Bool fd_allowed(Int fd, const Cha
static void after_##x(ThreadId tid, ThreadState *tst)
-#define PREALIAS(new, old) \
- PRE(new) __attribute__((alias(STR(before___NR_##old))))
-#define POSTALIAS(new, old) \
- POST(new) __attribute__((alias(STR(after___NR_##old))))
-
-#define PREALIASx(new, old) \
- PRE(new) __attribute__((alias(STR(before_##old))))
-#define POSTALIASx(new, old) \
- POST(new) __attribute__((alias(STR(after_##old))))
-
#define SYSNO PLATFORM_SYSCALL_NUM(tst->arch) // in PRE(x)
#define res PLATFORM_SYSCALL_RET(tst->arch) // in POST(x)
@@ -5984,9 +5974,19 @@ PREx(sys_sigpending, NBRunInLWP)
POSTx(sys_sigpending)
{
- POST_MEM_WRITE( arg1, sizeof( vki_old_sigset_t ) ) ;
+ POST_MEM_WRITE( arg1, sizeof(vki_old_sigset_t) ) ;
}
-PREALIASx(rt_sigpending, sys_sigpending);
-POSTALIASx(rt_sigpending, sys_sigpending);
+PREx(sys_rt_sigpending, NBRunInLWP)
+{
+ PRINT( "sys_sigpending ( %p )", arg1 );
+ PRE_REG_READ2(long, "rt_sigpending",
+ vki_sigset_t *, set, vki_size_t, sigsetsize);
+ PRE_MEM_WRITE( "sigpending(set)", arg1, sizeof(vki_sigset_t));
+}
+
+POSTx(sys_rt_sigpending)
+{
+ POST_MEM_WRITE( arg1, sizeof(vki_sigset_t) ) ;
+}
PRE(io_setup)
@@ -6603,5 +6603,5 @@ static const struct sys_info sys_info[]
SYSXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 175 * ?
- SYSBA(__NR_rt_sigpending, sys_rt_sigpending, NBRunInLWP), // 176 *
+ SYSXY(__NR_rt_sigpending, sys_rt_sigpending), // 176 * ?
SYSBA(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, MayBlock), // 177 *
SYSBA(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, 0), // 178 *
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 19:09:05
|
CVS commit by nethercote: Forgot to add the expected stderr output. M +6 -0 sigprocmask.stderr.exp 1.2 --- valgrind/memcheck/tests/sigprocmask.stderr.exp #1.1:1.2 @@ -0,0 +1,6 @@ +before +11111111 89abcdef 22222222 33333333 0 44444444 +after1 +11111111 89abcdef 22222222 33333333 0 44444444 +after2 +11111111 89abcdef 22222222 33333333 89abccef 44444444 |
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 19:07:16
|
CVS commit by nethercote:
Fixed bug #93328, by using the right sized types in sigprocmask(), and
converting them as necessary.
Fixed some compiler warnings by renaming two variables, too.
(partly) MERGED FROM HEAD
M +45 -10 coregrind/vg_syscalls.c 1.131.2.2
M +2 -0 include/vg_kerneliface.h 1.23.2.2
--- valgrind/coregrind/vg_syscalls.c #1.131.2.1:1.131.2.2
@@ -120,5 +120,5 @@ static void do_atfork_child(ThreadId tid
/* return true if address range entirely contained within client
address space */
-static Bool valid_client_addr(Addr start, UInt size, ThreadId tid, const Char *syscall)
+static Bool valid_client_addr(Addr start, UInt size, ThreadId tid, const Char *syscallname)
{
Addr end = start+size;
@@ -139,9 +139,9 @@ static Bool valid_client_addr(Addr start
if (0)
VG_(printf)("%s: test=%p-%p client=%p-%p ret=%d\n",
- syscall, start, end, cl_base, VG_(client_end), ret);
+ syscallname, start, end, cl_base, VG_(client_end), ret);
- if (!ret && syscall != NULL) {
+ if (!ret && syscallname != NULL) {
VG_(message)(Vg_UserMsg, "Warning: client syscall %s tried to modify addresses %p-%p",
- syscall, start, end);
+ syscallname, start, end);
if (VG_(clo_verbosity) > 1) {
@@ -972,10 +972,10 @@ static Addr do_brk(Addr newbrk)
/* Return true if we're allowed to use or create this fd */
-static Bool fd_allowed(Int fd, const Char *syscall, ThreadId tid, Bool soft)
+static Bool fd_allowed(Int fd, const Char *syscallname, ThreadId tid, Bool soft)
{
if (fd < 0 || fd >= VG_(fd_hard_limit) || fd == VG_(clo_log_fd)) {
VG_(message)(Vg_UserMsg,
"Warning: invalid file descriptor %d in syscall %s()",
- fd, syscall);
+ fd, syscallname);
if (fd == VG_(clo_log_fd))
VG_(message)(Vg_UserMsg,
@@ -5491,4 +5491,42 @@ PRE(sigprocmask)
arg3, sizeof(vki_ksigset_t));
+ if (SIGNAL_SIMULATION) {
+ // Nb: We must convert the smaller vki_old_ksigset_t params into bigger
+ // vki_ksigset_t params.
+ vki_old_ksigset_t* set = (vki_old_ksigset_t*)arg2;
+ vki_old_ksigset_t* oldset = (vki_old_ksigset_t*)arg3;
+ vki_ksigset_t bigger_set;
+ vki_ksigset_t bigger_oldset;
+
+ VG_(memset)(&bigger_set, 0, sizeof(vki_ksigset_t));
+ bigger_set.ws[0] = *(vki_old_ksigset_t*)set;
+
+ VG_(do__NR_sigprocmask) ( tid,
+ arg1 /*how*/,
+ &bigger_set,
+ &bigger_oldset );
+
+ *oldset = bigger_oldset.ws[0];
+ }
+}
+
+POST(sigprocmask)
+{
+ if (res == 0 && arg3 != (UInt)NULL)
+ VG_TRACK( post_mem_write, arg3, sizeof(vki_old_ksigset_t));
+}
+
+PRE(rt_sigprocmask)
+{
+ /* int rt_sigprocmask(int how, k_sigset_t *set,
+ k_sigset_t *oldset, size_t sigsetsize); */
+ MAYBE_PRINTF("rt_sigprocmask ( %d, %p, %p )\n",arg1,arg2,arg3);
+ if (arg2 != (UInt)NULL)
+ SYSCALL_TRACK( pre_mem_read, tid, "rt_sigprocmask(set)",
+ arg2, sizeof(vki_ksigset_t));
+ if (arg3 != (UInt)NULL)
+ SYSCALL_TRACK( pre_mem_write, tid, "rt_sigprocmask(oldset)",
+ arg3, sizeof(vki_ksigset_t));
+
if (SIGNAL_SIMULATION)
VG_(do__NR_sigprocmask) ( tid,
@@ -5498,5 +5536,5 @@ PRE(sigprocmask)
}
-POST(sigprocmask)
+POST(rt_sigprocmask)
{
if (res == 0 && arg3 != (UInt)NULL)
@@ -5504,7 +5542,4 @@ POST(sigprocmask)
}
-PREALIAS(rt_sigprocmask, sigprocmask);
-POSTALIAS(rt_sigprocmask, sigprocmask);
-
PRE(sigpending)
{
--- valgrind/include/vg_kerneliface.h #1.23.2.1:1.23.2.2
@@ -63,4 +63,6 @@
#define VKI_KNSIG_WORDS (VKI_KNSIG / VKI_KNSIG_BPW)
+typedef unsigned long vki_old_ksigset_t;
+
typedef
struct {
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 19:03:31
|
CVS commit by nethercote:
Converted sigprocmask and rt_sigprocmask.
While doing so, fixed bug #93328, by using the right sized types in
sigprocmask(), and converting them as necessary. Added a regression test for
it too.
(partly) MERGE TO STABLE
A memcheck/tests/sigprocmask.c 1.1 [POSSIBLY UNSAFE: printf] [no copyright]
A memcheck/tests/sigprocmask.stderr.exp 1.1
A memcheck/tests/sigprocmask.vgtest 1.1
M +50 -13 coregrind/vg_syscalls.c 1.210
M +1 -0 memcheck/tests/.cvsignore 1.29
M +4 -3 memcheck/tests/Makefile.am 1.63
M +7 -4 memcheck/tests/scalar.c 1.43
M +69 -0 memcheck/tests/scalar.stderr.exp 1.36
--- valgrind/coregrind/vg_syscalls.c #1.209:1.210
@@ -5912,15 +5912,55 @@ POSTx(sys_rt_sigaction)
}
-PRE(sigprocmask)
+PREx(sys_sigprocmask, SIG_SIM)
{
- /* int sigprocmask(int how, k_sigset_t *set,
- k_sigset_t *oldset); */
- PRINT("sigprocmask ( %d, %p, %p )",arg1,arg2,arg3);
+ PRINT("sys_sigprocmask ( %d, %p, %p )",arg1,arg2,arg3);
+ PRE_REG_READ3(long, "sigprocmask",
+ int, how, vki_old_sigset_t *, set, vki_old_sigset_t *, oldset);
if (arg2 != (UWord)NULL)
- PRE_MEM_READ( "sigprocmask(set)", arg2, sizeof(vki_sigset_t));
+ PRE_MEM_READ( "sigprocmask(set)", arg2, sizeof(vki_old_sigset_t));
if (arg3 != (UWord)NULL)
- PRE_MEM_WRITE( "sigprocmask(oldset)", arg3, sizeof(vki_sigset_t));
+ PRE_MEM_WRITE( "sigprocmask(oldset)", arg3, sizeof(vki_old_sigset_t));
+
+ if (SIGNAL_SIMULATION) {
+ // Nb: We must convert the smaller vki_old_sigset_t params into bigger
+ // vki_sigset_t params.
+ vki_old_sigset_t* set = (vki_old_sigset_t*)arg2;
+ vki_old_sigset_t* oldset = (vki_old_sigset_t*)arg3;
+ vki_sigset_t bigger_set;
+ vki_sigset_t bigger_oldset;
+
+ VG_(memset)(&bigger_set, 0, sizeof(vki_sigset_t));
+ bigger_set.sig[0] = *(vki_old_sigset_t*)set;
- if (SIGNAL_SIMULATION)
+ VG_(do_sys_sigprocmask) ( tid,
+ arg1 /*how*/,
+ &bigger_set,
+ &bigger_oldset );
+
+ *oldset = bigger_oldset.sig[0];
+ }
+}
+
+POSTx(sys_sigprocmask)
+{
+ if (res == 0 && arg3 != (UWord)NULL)
+ POST_MEM_WRITE( arg3, sizeof(vki_old_sigset_t));
+}
+
+PREx(sys_rt_sigprocmask, SIG_SIM)
+{
+ PRINT("sys_rt_sigprocmask ( %d, %p, %p, %llu )",arg1,arg2,arg3,(ULong)arg4);
+ PRE_REG_READ4(long, "rt_sigprocmask",
+ int, how, vki_sigset_t *, set, vki_sigset_t *, oldset,
+ vki_size_t, sigsetsize);
+ if (arg2 != (UWord)NULL)
+ PRE_MEM_READ( "rt_sigprocmask(set)", arg2, sizeof(vki_sigset_t));
+ if (arg3 != (UWord)NULL)
+ PRE_MEM_WRITE( "rt_sigprocmask(oldset)", arg3, sizeof(vki_sigset_t));
+
+ // Like the kernel, we fail if the sigsetsize is not exactly what we expect.
+ if (sizeof(vki_sigset_t) != arg4)
+ set_result( -VKI_EMFILE );
+ else if (SIGNAL_SIMULATION)
VG_(do_sys_sigprocmask) ( tid,
arg1 /*how*/,
@@ -5929,5 +5969,5 @@ PRE(sigprocmask)
}
-POST(sigprocmask)
+POSTx(sys_rt_sigprocmask)
{
if (res == 0 && arg3 != (UWord)NULL)
@@ -5935,7 +5975,4 @@ POST(sigprocmask)
}
-PREALIAS(rt_sigprocmask, sigprocmask);
-POSTALIAS(rt_sigprocmask, sigprocmask);
-
PREx(sys_sigpending, NBRunInLWP)
{
@@ -6504,5 +6541,5 @@ static const struct sys_info sys_info[]
SYSXY(__NR_mprotect, sys_mprotect), // 125 * P
- SYSBA(__NR_sigprocmask, sys_sigprocmask, SIG_SIM), // 126 *
+ SYSXY(__NR_sigprocmask, sys_sigprocmask), // 126 * P
// Nb: create_module() was removed 2.4-->2.6
SYSX_(__NR_create_module, sys_ni_syscall), // 127 * P -- unimplemented
@@ -6565,5 +6602,5 @@ static const struct sys_info sys_info[]
SYSXY(__NR_rt_sigaction, sys_rt_sigaction), // 174 (x86) ()
- SYSBA(__NR_rt_sigprocmask, sys_rt_sigprocmask, SIG_SIM), // 175 *
+ SYSXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 175 * ?
SYSBA(__NR_rt_sigpending, sys_rt_sigpending, NBRunInLWP), // 176 *
SYSBA(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, MayBlock), // 177 *
--- valgrind/memcheck/tests/.cvsignore #1.28:1.29
@@ -56,4 +56,5 @@
sigaltstack
signal2
+sigprocmask
str_tester
supp1
--- valgrind/memcheck/tests/Makefile.am #1.62:1.63
@@ -60,6 +60,6 @@
scalar_vfork.stderr.exp scalar_vfork.vgtest \
sigaltstack.stderr.exp sigaltstack.vgtest \
- signal2.stderr.exp \
- signal2.stdout.exp signal2.vgtest \
+ signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
+ sigprocmask.stderr.exp sigprocmask.vgtest \
str_tester.stderr.exp str_tester.vgtest \
supp1.stderr.exp supp1.vgtest \
@@ -89,5 +89,5 @@
realloc1 realloc2 realloc3 \
scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork \
- sigaltstack signal2 \
+ sigaltstack signal2 sigprocmask \
str_tester supp1 supp2 suppfree \
trivialleak weirdioctl \
@@ -147,4 +147,5 @@
scalar_vfork_SOURCES = scalar_vfork.c
signal2_SOURCES = signal2.c
+sigprocmask_SOURCES = sigprocmask.c
supp1_SOURCES = supp.c
supp2_SOURCES = supp.c
--- valgrind/memcheck/tests/scalar.c #1.42:1.43
@@ -1,2 +1,3 @@
+#include "../memcheck.h"
#include "scalar.h"
@@ -542,6 +543,8 @@ int main(void)
// __NR_sigprocmask 126
- //GO(__NR_sigprocmask, ".s .m");
- //SY(__NR_sigprocmask);
+ {
+ GO(__NR_sigprocmask, "3s 2m");
+ SY(__NR_sigprocmask, x0, x0+&px[1], x0+&px[1]);
+ }
// __NR_create_module 127
@@ -738,6 +741,6 @@ int main(void)
// __NR_rt_sigprocmask 175
- //GO(__NR_rt_sigprocmask, ".s .m");
- //SY(__NR_rt_sigprocmask);
+ GO(__NR_rt_sigprocmask, "4s 2m");
+ SY(__NR_rt_sigprocmask, x0, x0+1, x0+1, x0);
// __NR_rt_sigpending 176
--- valgrind/memcheck/tests/scalar.stderr.exp #1.35:1.36
@@ -1602,4 +1602,38 @@
by 0x........: ...
-----------------------------------------------------
+126: __NR_sigprocmask 3s 2m
+-----------------------------------------------------
+
+Syscall param sigprocmask(how) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sigprocmask(set) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sigprocmask(oldset) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sigprocmask(set) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is 0 bytes after a block of size 4 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (scalar.c:7)
+
+Syscall param sigprocmask(oldset) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is 0 bytes after a block of size 4 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (scalar.c:7)
+-----------------------------------------------------
127: __NR_create_module ni
-----------------------------------------------------
@@ -2290,4 +2324,39 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+175: __NR_rt_sigprocmask 4s 2m
+-----------------------------------------------------
+
+Syscall param rt_sigprocmask(how) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigprocmask(set) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigprocmask(oldset) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigprocmask(sigsetsize) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param rt_sigprocmask(set) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param rt_sigprocmask(oldset) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
182: __NR_chown 3s 1m
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 17:19:27
|
CVS commit by nethercote:
convert a couple more
M +15 -11 coregrind/vg_syscalls.c 1.209
M +5 -5 memcheck/tests/scalar.c 1.42
M +42 -0 memcheck/tests/scalar.stderr.exp 1.35
--- valgrind/coregrind/vg_syscalls.c #1.208:1.209
@@ -1664,12 +1664,12 @@ PREx(sys_setfsuid, 0)
}
-PRE(_sysctl)
+PREx(sys_sysctl, 0)
{
- /* int _sysctl(struct __sysctl_args *args); */
- PRINT("_sysctl ( %p )", arg1 );
- PRE_MEM_WRITE( "_sysctl(args)", arg1, sizeof(struct __vki_sysctl_args) );
+ PRINT("sys_sysctl ( %p )", arg1 );
+ PRE_REG_READ1(long, "sysctl", struct __sysctl_args *, args);
+ PRE_MEM_WRITE( "sysctl(args)", arg1, sizeof(struct __vki_sysctl_args) );
}
-POST(_sysctl)
+POSTx(sys_sysctl)
{
POST_MEM_WRITE( arg1, sizeof(struct __vki_sysctl_args) );
@@ -5660,9 +5659,14 @@ PREx(sys_writev, MayBlock)
}
-PRE(prctl)
+PREx(sys_prctl, MayBlock)
{
- /* int prctl(int option, unsigned long arg2, unsigned long arg3,
- unsigned long arg4, unsigned long arg5); */
PRINT( "prctl ( %d, %d, %d, %d, %d )", arg1, arg2, arg3, arg4, arg5 );
+ // XXX: too simplistic, often not all args are used
+ // Nb: can't use "arg2".."arg5" here because that's our own macro...
+ PRE_REG_READ5(long, "prctl",
+ int, option, unsigned long, parg2, unsigned long, parg3,
+ unsigned long, parg4, unsigned long, parg5);
+ // XXX: totally wrong... we need to look at the 'option' arg, and do
+ // PRE_MEM_READs/PRE_MEM_WRITEs as necessary...
}
@@ -6529,5 +6533,5 @@ static const struct sys_info sys_info[]
SYSX_(__NR_getsid, sys_getsid), // 147 * P
SYSX_(__NR_fdatasync, sys_fdatasync), // 148 * P
- SYSBA(__NR__sysctl, sys_sysctl, 0), // 149 *
+ SYSXY(__NR__sysctl, sys_sysctl), // 149 * L
SYSX_(__NR_mlock, sys_mlock), // 150 * P
@@ -6557,5 +6561,5 @@ static const struct sys_info sys_info[]
SYSX_(__NR_setresgid, sys_setresgid16), // 170 ## (non-standard)
SYSXY(__NR_getresgid, sys_getresgid16), // 171 ## L
- SYSB_(__NR_prctl, sys_prctl, MayBlock), // 172 *
+ SYSX_(__NR_prctl, sys_prctl), // 172 * L
// (__NR_rt_sigreturn, sys_rt_sigreturn), // 173 (x86) ()
SYSXY(__NR_rt_sigaction, sys_rt_sigaction), // 174 (x86) ()
--- valgrind/memcheck/tests/scalar.c #1.41:1.42
@@ -634,6 +634,6 @@ int main(void)
// __NR__sysctl 149
- //GO(__NR__sysctl, ".s .m");
- //SY(__NR__sysctl);
+ GO(__NR__sysctl, "1s 1m");
+ SY(__NR__sysctl, x0);
// __NR_mlock 150
@@ -726,6 +726,6 @@ int main(void)
// __NR_prctl 172
- //GO(__NR_prctl, ".s .m");
- //SY(__NR_prctl);
+ GO(__NR_prctl, "5s 0m");
+ SY(__NR_prctl);
// __NR_rt_sigreturn 173
--- valgrind/memcheck/tests/scalar.stderr.exp #1.34:1.35
@@ -1918,4 +1918,18 @@
by 0x........: ...
-----------------------------------------------------
+149: __NR__sysctl 1s 1m
+-----------------------------------------------------
+
+Syscall param sysctl(args) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sysctl(args) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
150: __NR_mlock 2s 0m
-----------------------------------------------------
@@ -2210,4 +2224,32 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+172: __NR_prctl 5s 0m
+-----------------------------------------------------
+
+Syscall param prctl(option) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param prctl(parg2) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param prctl(parg3) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param prctl(parg4) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param prctl(parg5) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
173: __NR_rt_sigreturn n/a
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 17:04:16
|
CVS commit by nethercote:
Convert more syscalls. Avoid obvious seg faults due to NULL vectors in readv()
and writev().
M +35 -25 coregrind/vg_syscalls.c 1.208
M +6 -6 memcheck/tests/scalar.c 1.41
M +82 -0 memcheck/tests/scalar.stderr.exp 1.34
--- valgrind/coregrind/vg_syscalls.c #1.207:1.208
@@ -4448,14 +4448,15 @@ PREx(sys_lseek, 0)
}
-PRE(_llseek)
+PREx(sys_llseek, 0)
{
- /* int _llseek(unsigned int fd, unsigned long offset_high,
- unsigned long offset_low,
- loff_t * result, unsigned int whence); */
PRINT("llseek ( %d, 0x%x, 0x%x, %p, %d )", arg1,arg2,arg3,arg4,arg5);
+ PRE_REG_READ5(long, "llseek",
+ unsigned int, fd, unsigned long, offset_high,
+ unsigned long, offset_low, vki_loff_t *, result,
+ unsigned int, whence);
PRE_MEM_WRITE( "llseek(result)", arg4, sizeof(vki_loff_t));
}
-POST(_llseek)
+POSTx(sys_llseek)
{
if (res == 0)
@@ -4841,14 +4842,18 @@ POSTx(sys_readlink)
}
-PRE(readv)
+PREx(sys_readv, MayBlock)
{
- /* int readv(int fd, const struct iovec * vector, size_t count); */
Int i;
struct vki_iovec * vec;
- PRINT("readv ( %d, %p, %llu )",arg1,arg2,(ULong)arg3);
+ PRINT("sys_readv ( %d, %p, %llu )",arg1,arg2,(ULong)arg3);
+ PRE_REG_READ3(ssize_t, "readv",
+ unsigned long, fd, const struct iovec *, vector,
+ unsigned long, count);
if (!fd_allowed(arg1, "readv", tid, False)) {
set_result( -VKI_EBADF );
} else {
PRE_MEM_READ( "readv(vector)", arg2, arg3 * sizeof(struct vki_iovec) );
+
+ if (arg2 != (UWord)NULL) {
/* ToDo: don't do any of the following if the vector is invalid */
vec = (struct vki_iovec *)arg2;
@@ -4857,7 +4862,8 @@ PRE(readv)
(Addr)vec[i].iov_base, vec[i].iov_len );
}
+ }
}
-POST(readv)
+POSTx(sys_readv)
{
if (res > 0) {
@@ -5631,10 +5637,12 @@ POSTx(sys_wait4)
}
-PRE(writev)
+PREx(sys_writev, MayBlock)
{
- /* int writev(int fd, const struct iovec * vector, size_t count); */
Int i;
struct vki_iovec * vec;
- PRINT("writev ( %d, %p, %llu )",arg1,arg2,(ULong)arg3);
+ PRINT("sys_writev ( %d, %p, %llu )",arg1,arg2,(ULong)arg3);
+ PRE_REG_READ3(ssize_t, "writev",
+ unsigned long, fd, const struct iovec *, vector,
+ unsigned long, count);
if (!fd_allowed(arg1, "writev", tid, False)) {
set_result( -VKI_EBADF );
@@ -5642,4 +5650,5 @@ PRE(writev)
PRE_MEM_READ( "writev(vector)",
arg2, arg3 * sizeof(struct vki_iovec) );
+ if (arg2 != (UWord)NULL) {
/* ToDo: don't do any of the following if the vector is invalid */
vec = (struct vki_iovec *)arg2;
@@ -5648,4 +5657,5 @@ PRE(writev)
(Addr)vec[i].iov_base, vec[i].iov_len );
}
+ }
}
@@ -6509,5 +6519,5 @@ static const struct sys_info sys_info[]
SYSX_(__NR_setfsgid, sys_setfsgid16), // 139 ## L
- SYSBA(__NR__llseek, sys_llseek, 0), // 140 *
+ SYSXY(__NR__llseek, sys_llseek), // 140 * L
SYSXY(__NR_getdents, sys_getdents), // 141 * (SVr4,SVID)
SYSX_(__NR__newselect, sys_select), // 142 * (4.4BSD...)
@@ -6515,6 +6525,6 @@ static const struct sys_info sys_info[]
SYSX_(__NR_msync, sys_msync), // 144 * P
- SYSBA(__NR_readv, sys_readv, MayBlock), // 145 *
- SYSB_(__NR_writev, sys_writev, MayBlock), // 146 *
+ SYSXY(__NR_readv, sys_readv), // 145 * P
+ SYSX_(__NR_writev, sys_writev), // 146 * P
SYSX_(__NR_getsid, sys_getsid), // 147 * P
SYSX_(__NR_fdatasync, sys_fdatasync), // 148 * P
--- valgrind/memcheck/tests/scalar.c #1.40:1.41
@@ -598,6 +598,6 @@ int main(void)
// __NR__llseek 140
- //GO(__NR__llseek, ".s .m");
- //SY(__NR__llseek);
+ GO(__NR__llseek, "5s 1m");
+ SY(__NR__llseek, x0, x0, x0, x0, x0);
// __NR_getdents 141
@@ -618,10 +618,10 @@ int main(void)
// __NR_readv 145
- //GO(__NR_readv, ".s .m");
- //SY(__NR_readv);
+ GO(__NR_readv, "3s 1m");
+ SY(__NR_readv, x0, x0, x0+1);
// __NR_writev 146
- //GO(__NR_writev, ".s .m");
- //SY(__NR_writev);
+ GO(__NR_writev, "3s 1m");
+ SY(__NR_writev, x0, x0, x0+1);
// __NR_getsid 147
--- valgrind/memcheck/tests/scalar.stderr.exp #1.33:1.34
@@ -1713,4 +1713,38 @@
by 0x........: ...
-----------------------------------------------------
+140: __NR__llseek 5s 1m
+-----------------------------------------------------
+
+Syscall param llseek(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param llseek(offset_high) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param llseek(offset_low) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param llseek(result) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param llseek(whence) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param llseek(result) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
141: __NR_getdents 3s 1m
-----------------------------------------------------
@@ -1820,4 +1854,52 @@
by 0x........: ...
-----------------------------------------------------
+145: __NR_readv 3s 1m
+-----------------------------------------------------
+
+Syscall param readv(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param readv(vector) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param readv(count) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param readv(vector) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+146: __NR_writev 3s 1m
+-----------------------------------------------------
+
+Syscall param writev(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param writev(vector) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param writev(count) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param writev(vector) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
147: __NR_getsid 1s 0m
-----------------------------------------------------
|
|
From: Tom H. <th...@cy...> - 2004-11-15 17:01:17
|
In message <Pin...@he...>
Nicholas Nethercote <nj...@ca...> wrote:
> In vg_syscalls.c, set_tid_address is marked as a "Special" syscall,
> ie. one that Valgrind implements itself, rather than getting the
> kernel to do it. Does anyone know why this is? Valgrind currently
> does nothing when it is called, which is surely wrong. I think we
> should remove the "Special" annotation. But I'm not certain -- anyone
> agree/disagree?
I suspect this is deliberate given that all the user level threads
are running in the same kernel thread under valgrind so we probably
don't want to be calling the actual system call here.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom H. <th...@cy...> - 2004-11-15 16:59:22
|
CVS commit by thughes:
Pass an argument to exit_group in the scalar_exit_group test.
M +5 -1 scalar_exit_group.c 1.2
--- valgrind/memcheck/tests/scalar_exit_group.c #1.1:1.2
@@ -3,9 +3,13 @@
int main(void)
{
+ // uninitialised, but we know px[0] is 0x0
+ long* px = malloc(sizeof(long));
+ long x0 = px[0];
+
// All __NR_xxx numbers are taken from x86
// __NR_exit_group 252
GO(__NR_exit_group, "1s 0m");
- SY(__NR_exit_group);
+ SY(__NR_exit_group, x0);
return(0);
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 16:54:04
|
Hi, In vg_syscalls.c, set_tid_address is marked as a "Special" syscall, ie. one that Valgrind implements itself, rather than getting the kernel to do it. Does anyone know why this is? Valgrind currently does nothing when it is called, which is surely wrong. I think we should remove the "Special" annotation. But I'm not certain -- anyone agree/disagree? Thanks. N |
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 16:40:44
|
CVS commit by nethercote:
Converted modify_ldt() and init_module(); the old code for init_module() was
seemingly totally wrong, as the man page doesn't reflect the real kernel code.
M +14 -11 coregrind/vg_syscalls.c 1.207
M +0 -17 include/x86-linux/vki_arch.h 1.6
M +4 -4 memcheck/tests/scalar.c 1.40
M +54 -0 memcheck/tests/scalar.stderr.exp 1.33
--- valgrind/coregrind/vg_syscalls.c #1.206:1.207
@@ -1227,15 +1227,17 @@ PREx(sys_umount, 0)
}
-PRE(modify_ldt)
+PREx(sys_modify_ldt, Special)
{
PRINT("modify_ldt ( %d, %p, %d )", arg1,arg2,arg3);
+ PRE_REG_READ3(int, "modify_ldt", int, func, void *, ptr,
+ unsigned long, bytecount);
+
if (arg1 == 0) {
/* read the LDT into ptr */
- PRE_MEM_WRITE( "modify_ldt(ptr)(func=0)", arg2, arg3 );
+ PRE_MEM_WRITE( "modify_ldt(ptr)", arg2, arg3 );
}
if (arg1 == 1 || arg1 == 0x11) {
/* write the LDT with the entry pointed at by ptr */
- PRE_MEM_READ( "modify_ldt(ptr)(func=1 or 0x11)", arg2,
- sizeof(vki_modify_ldt_t) );
+ PRE_MEM_READ( "modify_ldt(ptr)", arg2, sizeof(vki_modify_ldt_t) );
}
/* "do" the syscall ourselves; the kernel never sees it */
@@ -1876,10 +1878,11 @@ PREx(sys_flock, MayBlock)
}
-PRE(init_module)
+PREx(sys_init_module, MayBlock)
{
- /* int init_module(const char *name, struct module *image); */
- PRINT("init_module ( %p, %p )", arg1, arg2 );
- PRE_MEM_RASCIIZ( "init_module(name)", arg1 );
- PRE_MEM_READ( "init_module(image)", arg2, VKI_SIZEOF_STRUCT_MODULE );
+ PRINT("sys_init_module ( %p, %llu, %p )", arg1, (ULong)arg2, arg3 );
+ PRE_REG_READ3(long, "init_module",
+ void *, umod, unsigned long, len, const char *, uargs);
+ PRE_MEM_READ( "init_module(umod)", arg1, arg2 );
+ PRE_MEM_RASCIIZ( "init_module(uargs)", arg3 );
}
@@ -6483,5 +6486,5 @@ static const struct sys_info sys_info[]
// (__NR_setdomainname, sys_setdomainname),// 121 * (non-P?)
SYSXY(__NR_uname, sys_newuname), // 122 * P
- SYSB_(__NR_modify_ldt, sys_modify_ldt, Special), // 123 (x86,amd64) L
+ SYSX_(__NR_modify_ldt, sys_modify_ldt), // 123 (x86,amd64) L
SYSXY(__NR_adjtimex, sys_adjtimex), // 124 * L
@@ -6490,5 +6493,5 @@ static const struct sys_info sys_info[]
// Nb: create_module() was removed 2.4-->2.6
SYSX_(__NR_create_module, sys_ni_syscall), // 127 * P -- unimplemented
- SYSB_(__NR_init_module, sys_init_module, MayBlock), // 128 *
+ SYSX_(__NR_init_module, sys_init_module), // 128 * L?
// (__NR_delete_module, sys_delete_module),// 129 () (L?)
--- valgrind/include/x86-linux/vki_arch.h #1.5:1.6
@@ -729,21 +729,4 @@ struct vki_shminfo64 {
//----------------------------------------------------------------------
-// From linux-2.6.8.1/include/linux/module.h
-//----------------------------------------------------------------------
-
-// [[This VKI_SIZEOF_* value is arch-specific, because it depends on the
-// word size. The values are really guesses, but they are only needed for
-// init_module() which is very rare]]
-
-#if defined(KERNEL_2_2) || defined(KERNEL_2_4)
-// [[This is actually an over-estimate; only 60 bytes are mandated.]]
-# define VKI_SIZEOF_STRUCT_MODULE 96
-#else
-// [[This is a conservative guesstimate; it can be longer, depending on
-// certain #ifdefs. Close enough.]]
-# define VKI_SIZEOF_STRUCT_MODULE 160
-#endif
-
-//----------------------------------------------------------------------
// And that's it!
//----------------------------------------------------------------------
--- valgrind/memcheck/tests/scalar.c #1.39:1.40
@@ -529,6 +529,6 @@ int main(void)
// __NR_modify_ldt 123
- //GO(__NR_modify_ldt, ".s .m");
- //SY(__NR_modify_ldt);
+ GO(__NR_modify_ldt, "3s 1m");
+ SY(__NR_modify_ldt, x0, x0, x0+1);
// __NR_adjtimex 124
@@ -550,6 +550,6 @@ int main(void)
// __NR_init_module 128
- //GO(__NR_init_module, ".s .m");
- //SY(__NR_init_module);
+ GO(__NR_init_module, "3s 2m");
+ SY(__NR_init_module, x0, x0+1, x0);
// __NR_delete_module 129
--- valgrind/memcheck/tests/scalar.stderr.exp #1.32:1.33
@@ -1560,4 +1560,28 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+123: __NR_modify_ldt 3s 1m
+-----------------------------------------------------
+
+Syscall param modify_ldt(func) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param modify_ldt(ptr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param modify_ldt(bytecount) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param modify_ldt(ptr) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
125: __NR_mprotect 3s 0m
-----------------------------------------------------
@@ -1581,4 +1605,34 @@
-----------------------------------------------------
-----------------------------------------------------
+128: __NR_init_module 3s 2m
+-----------------------------------------------------
+
+Syscall param init_module(umod) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param init_module(len) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param init_module(uargs) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param init_module(umod) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param init_module(uargs) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
129: __NR_delete_module n/a
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 16:11:32
|
CVS commit by nethercote:
Add scalar_exit_group to reg tests. Tweak scalar.c again.
A scalar_exit_group.c 1.1 [no copyright]
A scalar_exit_group.stderr.exp 1.1
A scalar_exit_group.vgtest 1.1
M +1 -0 .cvsignore 1.28
M +4 -2 Makefile.am 1.62
M +8 -5 scalar.c 1.39
M +10 -1 scalar.stderr.exp 1.32
--- valgrind/memcheck/tests/.cvsignore #1.27:1.28
@@ -50,4 +50,5 @@
realloc3
scalar
+scalar_exit_group
scalar_fork
scalar_supp
--- valgrind/memcheck/tests/Makefile.am #1.61:1.62
@@ -54,6 +54,7 @@
realloc2.stderr.exp realloc2.vgtest \
realloc3.stderr.exp realloc3.vgtest \
- scalar.stderr.exp scalar.vgtest \
+ scalar.stderr.exp scalar.vgtest \
scalar_fork.stderr.exp scalar_fork.vgtest \
+ scalar_exit_group.stderr.exp scalar_exit_group.vgtest \
scalar_supp.stderr.exp scalar_supp.vgtest scalar_supp.supp \
scalar_vfork.stderr.exp scalar_vfork.vgtest \
@@ -87,5 +88,5 @@
null_socket overlap \
realloc1 realloc2 realloc3 \
- scalar scalar_fork scalar_supp scalar_vfork \
+ scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork \
sigaltstack signal2 \
str_tester supp1 supp2 suppfree \
@@ -141,4 +142,5 @@
realloc3_SOURCES = realloc3.c
scalar_SOURCES = scalar.c
+scalar_exit_group_SOURCES = scalar_exit_group.c
scalar_fork_SOURCES = scalar_fork.c
scalar_supp_SOURCES = scalar_supp.c
--- valgrind/memcheck/tests/scalar.c #1.38:1.39
@@ -9,12 +9,14 @@ int main(void)
// All __NR_xxx numbers are taken from x86
- // __NR_restart_syscall 1 XXX ???
+ // __NR_restart_syscall 0 XXX ???
// (see below)
// __NR_exit 1
+ GO(__NR_exit, "other");
// (see below)
// __NR_fork 2
- // (see scalar_fork.c)
+ GO(__NR_fork, "0s 0m");
+ // (sse scalar_fork.c)
// __NR_read 3
@@ -796,6 +798,6 @@ int main(void)
// __NR_vfork 190
- GO(__NR_vfork, "n/a");
- // (Valgrind converts this to __NR_fork)
+ GO(__NR_vfork, "0s 0m");
+ // (sse scalar_vfork.c)
// __NR_ugetrlimit 191
@@ -1044,5 +1046,6 @@ int main(void)
// __NR_exit_group 252
- // (XXX: implement in scalar_exit_group)
+ GO(__NR_exit_group, "other");
+ // (see scalar_exit_group.c)
// __NR_lookup_dcookie 253
--- valgrind/memcheck/tests/scalar.stderr.exp #1.31:1.32
@@ -1,3 +1,9 @@
-----------------------------------------------------
+ 1: __NR_exit other
+-----------------------------------------------------
+-----------------------------------------------------
+ 2: __NR_fork 0s 0m
+-----------------------------------------------------
+-----------------------------------------------------
3: __NR_read 1+3s 1m
-----------------------------------------------------
@@ -2180,5 +2186,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
-190: __NR_vfork n/a
+190: __NR_vfork 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -3139,4 +3145,7 @@
-----------------------------------------------------
-----------------------------------------------------
+252: __NR_exit_group other
+-----------------------------------------------------
+-----------------------------------------------------
253: __NR_lookup_dcookie 4s 1m
-----------------------------------------------------
|
|
From: Tom H. <th...@cy...> - 2004-11-15 15:35:53
|
CVS commit by thughes:
After a clone system call there are two threads of control running so we
need to make sure the child exits or we will get two copies of the output
from each test which follows. Also some older systems do not define the
CLONE_PARENT_SETTID flag.
M +7 -1 scalar.c 1.38
--- valgrind/memcheck/tests/scalar.c #1.37:1.38
@@ -508,7 +508,13 @@ int main(void)
#include <sched.h>
#include <signal.h>
+#ifndef CLONE_PARENT_SETTID
+#define CLONE_PARENT_SETTID 0x00100000
+#endif
// XXX: should really be "4s 2m"? Not sure... (see PRE(sys_clone))
GO(__NR_clone, "4s 0m");
- SY(__NR_clone, x0|CLONE_PARENT_SETTID|SIGCHLD, x0, x0, x0);
+ if (SY(__NR_clone, x0|CLONE_PARENT_SETTID|SIGCHLD, x0, x0, x0) == 0)
+ {
+ SY(__NR_exit, 0);
+ }
// __NR_setdomainname 121
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 15:31:28
|
CVS commit by nethercote:
Fill in missing cases in scalar.
M +1 -1 coregrind/vg_syscalls.c 1.206
M +275 -251 memcheck/tests/scalar.c 1.37
M +159 -30 memcheck/tests/scalar.stderr.exp 1.31
--- valgrind/coregrind/vg_syscalls.c #1.205:1.206
@@ -6453,5 +6453,5 @@ static const struct sys_info sys_info[]
SYSX_(__NR_getpriority, sys_getpriority), // 96 * (SVr4,4.4BSD)
SYSX_(__NR_setpriority, sys_setpriority), // 97 * (SVr4,4.4BSD)
- // (__NR_profil, sys_ni_syscall), // 98 * P -- unimplemented
+ SYSX_(__NR_profil, sys_ni_syscall), // 98 * P -- unimplemented
SYSXY(__NR_statfs, sys_statfs), // 99 * (P-ish)
--- valgrind/memcheck/tests/scalar.c #1.36:1.37
@@ -16,15 +16,16 @@ int main(void)
// __NR_fork 2
+ // (see scalar_fork.c)
- // __NR_read 3 --> sys_read()
+ // __NR_read 3
// Nb: here we are also getting an error from the syscall arg itself.
GO(__NR_read, "1+3s 1m");
SY(__NR_read+x0, x0, x0, x0+1);
- // __NR_write 4 --> sys_write()
+ // __NR_write 4
GO(__NR_write, "3s 1m");
SY(__NR_write, x0, x0, x0+1);
- // __NR_open 5 --> sys_open()
+ // __NR_open 5
GO(__NR_open, "(2-args) 2s 1m");
SY(__NR_open, x0, x0, x0+1);
@@ -33,25 +34,25 @@ int main(void)
SY(__NR_open, "tmp_write_file_foo", O_CREAT, x0);
- // __NR_close 6 --> sys_close()
+ // __NR_close 6
GO(__NR_close, "1s 0m");
SY(__NR_close, x0-1);
- // __NR_waitpid 7 --> sys_waitpid()
+ // __NR_waitpid 7
GO(__NR_waitpid, "3s 1m");
SY(__NR_waitpid, x0, x0+1, x0);
- // __NR_creat 8 --> sys_creat()
+ // __NR_creat 8
GO(__NR_creat, "2s 1m");
SY(__NR_creat, x0, x0);
- // __NR_link 9 --> sys_link()
+ // __NR_link 9
GO(__NR_link, "2s 2m");
SY(__NR_link, x0, x0);
- // __NR_unlink 10 --> sys_unlink()
+ // __NR_unlink 10
GO(__NR_unlink, "1s 1m");
SY(__NR_unlink, x0);
- // __NR_execve 11 --> sys_execve()
+ // __NR_execve 11
// Nb: could have 3 memory errors if we pass x0+1 as the 2nd and 3rd
// args, except for bug #93174.
@@ -59,178 +60,183 @@ int main(void)
SY(__NR_execve, x0, x0, x0);
- // __NR_chdir 12 --> sys_chdir()
+ // __NR_chdir 12
GO(__NR_chdir, "1s 1m");
SY(__NR_chdir, x0);
- // __NR_time 13 --> sys_time()
+ // __NR_time 13
GO(__NR_time, "1s 1m");
SY(__NR_time, x0+1);
- // __NR_mknod 14 --> sys_mknod()
+ // __NR_mknod 14
GO(__NR_mknod, "3s 1m");
SY(__NR_mknod, x0, x0, x0);
- // __NR_chmod 15 --> sys_chmod()
+ // __NR_chmod 15
GO(__NR_chmod, "2s 1m");
SY(__NR_chmod, x0, x0);
// __NR_lchown 16
- // (Not yet handled by Valgrind)
+ GO(__NR_lchown, "n/a");
+ //SY(__NR_lchown); // (Not yet handled by Valgrind)
- // __NR_break 17 --> sys_ni_syscall()
- GO(__NR_break, "0e");
+ // __NR_break 17
+ GO(__NR_break, "ni");
SY(__NR_break);
// __NR_oldstat 18
+ GO(__NR_oldstat, "n/a");
// (obsolete, not handled by Valgrind)
- // __NR_lseek 19 --> sys_lseek()
+ // __NR_lseek 19
GO(__NR_lseek, "3s 0m");
SY(__NR_lseek, x0, x0, x0);
- // __NR_getpid 20 --> sys_getpid()
+ // __NR_getpid 20
GO(__NR_getpid, "0s 0m");
SY(__NR_getpid);
- // __NR_mount 21 --> sys_mount()
+ // __NR_mount 21
GO(__NR_mount, "5s 3m");
SY(__NR_mount, x0, x0, x0, x0, x0);
- // __NR_umount 22 --> sys_oldumount()
+ // __NR_umount 22
GO(__NR_umount, "1s 1m");
SY(__NR_umount, x0);
- // __NR_setuid 23 --> sys_setuid16()
+ // __NR_setuid 23
GO(__NR_setuid, "1s 0m");
SY(__NR_setuid, x0);
- // __NR_getuid 24 --> sys_getuid16()
- GO(__NR_getuid, "0e");
+ // __NR_getuid 24
+ GO(__NR_getuid, "0s 0m");
SY(__NR_getuid);
// __NR_stime 25
- // (Not yet handled by Valgrind)
+ GO(__NR_stime, "n/a");
+ //SY(__NR_stime); // (Not yet handled by Valgrind)
- // __NR_ptrace 26 --> arch/sys_ptrace()
+ // __NR_ptrace 26
// XXX: memory pointed to be arg3 is never checked...
GO(__NR_ptrace, "4s 2m");
SY(__NR_ptrace, x0+PTRACE_GETREGS, x0, x0, x0);
- // __NR_alarm 27 --> sys_alarm()
+ // __NR_alarm 27
GO(__NR_alarm, "1s 0m");
SY(__NR_alarm, x0);
// __NR_oldfstat 28
+ GO(__NR_oldfstat, "n/a");
// (obsolete, not handled by Valgrind)
- // __NR_pause 29 --> sys_pause()
+ // __NR_pause 29
// XXX: will have to be tested separately
- // __NR_utime 30 --> sys_utime()
+ // __NR_utime 30
GO(__NR_utime, "2s 2m");
SY(__NR_utime, x0, x0+1);
- // __NR_stty 31 --> sys_ni_syscall()
- GO(__NR_stty, "0e");
+ // __NR_stty 31
+ GO(__NR_stty, "ni");
SY(__NR_stty);
- // __NR_gtty 32 --> sys_ni_syscall()
- GO(__NR_gtty, "0e");
+ // __NR_gtty 32
+ GO(__NR_gtty, "ni");
SY(__NR_gtty);
- // __NR_access 33 --> sys_access()
+ // __NR_access 33
GO(__NR_access, "2s 1m");
SY(__NR_access, x0, x0);
- // __NR_nice 34 --> sys_nice()
+ // __NR_nice 34
GO(__NR_nice, "1s 0m");
SY(__NR_nice, x0);
- // __NR_ftime 35 --> sys_ni_syscall()
- GO(__NR_ftime, "0e");
+ // __NR_ftime 35
+ GO(__NR_ftime, "ni");
SY(__NR_ftime);
- // __NR_sync 36 --> sys_sync()
- GO(__NR_sync, "0e");
+ // __NR_sync 36
+ GO(__NR_sync, "0s 0m");
SY(__NR_sync);
- // __NR_kill 37 --> sys_kill()
+ // __NR_kill 37
GO(__NR_kill, "2s 0m");
SY(__NR_kill, x0, x0);
- // __NR_rename 38 --> sys_rename()
+ // __NR_rename 38
GO(__NR_rename, "2s 2m");
SY(__NR_rename, x0, x0);
- // __NR_mkdir 39 --> sys_mkdir()
+ // __NR_mkdir 39
GO(__NR_mkdir, "2s 1m");
SY(__NR_mkdir, x0, x0);
- // __NR_rmdir 40 --> sys_rmdir()
+ // __NR_rmdir 40
GO(__NR_rmdir, "1s 1m");
SY(__NR_rmdir, x0);
- // __NR_dup 41 --> sys_dup()
+ // __NR_dup 41
GO(__NR_dup, "1s 0m");
SY(__NR_dup, x0);
- // __NR_pipe 42 --> arch/sys_pipe()
+ // __NR_pipe 42
GO(__NR_pipe, "1s 1m");
SY(__NR_pipe, x0);
- // __NR_times 43 --> sys_times()
+ // __NR_times 43
GO(__NR_times, "1s 1m");
SY(__NR_times, x0);
- // __NR_prof 44 --> sys_ni_syscall()
- GO(__NR_prof, "0e");
+ // __NR_prof 44
+ GO(__NR_prof, "ni");
SY(__NR_prof);
- // __NR_brk 45 --> sys_brk()
+ // __NR_brk 45
GO(__NR_brk, "1s 0m");
SY(__NR_brk, x0);
- // __NR_setgid 46 --> sys_setgid16()
+ // __NR_setgid 46
GO(__NR_setgid, "1s 0m");
SY(__NR_setgid, x0);
- // __NR_getgid 47 --> sys_getgid16()
- GO(__NR_getgid, "0e");
+ // __NR_getgid 47
+ GO(__NR_getgid, "0s 0m");
SY(__NR_getgid);
// __NR_signal 48
- // (Not yet handled by Valgrind)
+ GO(__NR_signal, "n/a");
+ //SY(__NR_signal); // (Not yet handled by Valgrind)
- // __NR_geteuid 49 --> sys_geteuid16()
- GO(__NR_geteuid, "0e");
+ // __NR_geteuid 49
+ GO(__NR_geteuid, "0s 0m");
SY(__NR_geteuid);
- // __NR_getegid 50 --> sys_getegid16()
- GO(__NR_getegid, "0e");
+ // __NR_getegid 50
+ GO(__NR_getegid, "0s 0m");
SY(__NR_getegid);
- // __NR_acct 51 --> sys_acct()
+ // __NR_acct 51
GO(__NR_acct, "1s 1m");
SY(__NR_acct, x0);
- // __NR_umount2 52 --> sys_umount()
+ // __NR_umount2 52
GO(__NR_umount2, "2s 1m");
SY(__NR_umount2, x0, x0);
- // __NR_lock 53 --> sys_ni_syscall()
- GO(__NR_lock, "0e");
+ // __NR_lock 53
+ GO(__NR_lock, "ni");
SY(__NR_lock);
- // __NR_ioctl 54 --> sys_ioctl()
+ // __NR_ioctl 54
#include <asm/ioctls.h>
GO(__NR_ioctl, "3s 1m");
SY(__NR_ioctl, x0, x0+TCSETS, x0);
- // __NR_fcntl 55 --> sys_fcntl()
+ // __NR_fcntl 55
GO(__NR_fcntl, "3s 0m");
SY(__NR_fcntl, x0, x0, x0);
- // __NR_mpx 56 --> sys_ni_syscall()
- GO(__NR_mpx, "0e");
+ // __NR_mpx 56
+ GO(__NR_mpx, "ni");
SY(__NR_mpx);
@@ -239,9 +245,10 @@ int main(void)
SY(__NR_setpgid, x0, x0);
- // __NR_ulimit 58 --> sys_ni_syscall()
- GO(__NR_ulimit, "0e");
+ // __NR_ulimit 58
+ GO(__NR_ulimit, "ni");
SY(__NR_ulimit);
// __NR_oldolduname 59
+ GO(__NR_oldolduname, "n/a");
// (obsolete, not handled by Valgrind)
@@ -255,4 +262,5 @@ int main(void)
// __NR_ustat 62
+ GO(__NR_ustat, "n/a");
// (deprecated, not handled by Valgrind)
@@ -261,47 +269,50 @@ int main(void)
SY(__NR_dup2, x0, x0);
- // __NR_getppid 64 --> sys_getppid()
- GO(__NR_getppid, "0e");
+ // __NR_getppid 64
+ GO(__NR_getppid, "0s 0m");
SY(__NR_getppid);
- // __NR_getpgrp 65 --> sys_getpgrp()
- GO(__NR_getpgrp, "0e");
+ // __NR_getpgrp 65
+ GO(__NR_getpgrp, "0s 0m");
SY(__NR_getpgrp);
- // __NR_setsid 66 --> sys_setsid()
- GO(__NR_setsid, "0e");
+ // __NR_setsid 66
+ GO(__NR_setsid, "0s 0m");
SY(__NR_setsid);
- // __NR_sigaction 67 --> sys_sigaction()
+ // __NR_sigaction 67
GO(__NR_sigaction, "3s 2m");
SY(__NR_sigaction, x0, x0+1, x0+1);
- // __NR_sgetmask 68
- // (Not yet handled by Valgrind)
+ // __NR_sgetmask 68 sys_sgetmask()
+ GO(__NR_sgetmask, "n/a");
+ //SY(__NR_sgetmask); // (Not yet handled by Valgrind)
// __NR_ssetmask 69
- // (Not yet handled by Valgrind)
+ GO(__NR_ssetmask, "n/a");
+ //SY(__NR_ssetmask); // (Not yet handled by Valgrind)
- // __NR_setreuid 70 --> sys_setreuid16()
+ // __NR_setreuid 70
GO(__NR_setreuid, "2s 0m");
SY(__NR_setreuid, x0, x0);
- // __NR_setregid 71 --> sys_setregid16()
+ // __NR_setregid 71
GO(__NR_setregid, "2s 0m");
SY(__NR_setregid, x0, x0);
- // __NR_sigsuspend 72 --> sys_sigsuspend()
+ // __NR_sigsuspend 72
// XXX: how do you use this function?
// GO(__NR_sigsuspend, ".s .m");
// SY(__NR_sigsuspend);
- // __NR_sigpending 73 --> sys_sigpending()
+ // __NR_sigpending 73
GO(__NR_sigpending, "1s 1m");
SY(__NR_sigpending, x0);
// __NR_sethostname 74
- // (Not yet handled by Valgrind)
+ GO(__NR_sethostname, "n/a");
+ //SY(__NR_sethostname); // (Not yet handled by Valgrind)
- // __NR_setrlimit 75 --> sys_setrlimit()
+ // __NR_setrlimit 75
GO(__NR_setrlimit, "2s 1m");
SY(__NR_setrlimit, x0, x0);
@@ -315,21 +326,21 @@ int main(void)
SY(__NR_getrusage, x0, x0);
- // __NR_gettimeofday 78 --> sys_gettimeofday()
+ // __NR_gettimeofday 78
GO(__NR_gettimeofday, "2s 2m");
SY(__NR_gettimeofday, x0, x0+1);
- // __NR_settimeofday 79 --> sys_settimeofday()
+ // __NR_settimeofday 79
GO(__NR_settimeofday, "2s 2m");
SY(__NR_settimeofday, x0, x0+1);
- // __NR_getgroups 80 --> sys_getgroups16()
+ // __NR_getgroups 80
GO(__NR_getgroups, "2s 1m");
SY(__NR_getgroups, x0+1, x0+1);
- // __NR_setgroups 81 --> sys_setgroups16()
+ // __NR_setgroups 81
GO(__NR_setgroups, "2s 1m");
SY(__NR_setgroups, x0+1, x0+1);
- // __NR_select 82 --> old_select()
+ // __NR_select 82
{
long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 };
@@ -338,9 +349,10 @@ int main(void)
}
- // __NR_symlink 83 --> sys_symlink()
+ // __NR_symlink 83
GO(__NR_symlink, "2s 2m");
SY(__NR_symlink, x0, x0);
// __NR_oldlstat 84
+ GO(__NR_oldlstat, "n/a");
// (obsolete, not handled by Valgrind)
@@ -350,16 +362,20 @@ int main(void)
// __NR_uselib 86
- // (Not yet handled by Valgrind)
+ GO(__NR_uselib, "n/a");
+ //SY(__NR_uselib); // (Not yet handled by Valgrind)
// __NR_swapon 87
- // (Not yet handled by Valgrind)
+ GO(__NR_swapon, "n/a");
+ //SY(__NR_swapon); // (Not yet handled by Valgrind)
// __NR_reboot 88
- // (Not yet handled by Valgrind)
+ GO(__NR_reboot, "n/a");
+ //SY(__NR_reboot); // (Not yet handled by Valgrind)
// __NR_readdir 89
+ GO(__NR_readdir, "n/a");
// (superseded, not handled by Valgrind)
- // __NR_mmap 90 --> old_mmap()
+ // __NR_mmap 90
{
long args[6] = { x0, x0, x0, x0, x0-1, x0 };
@@ -368,97 +384,98 @@ int main(void)
}
- // __NR_munmap 91 --> sys_munmap()
+ // __NR_munmap 91
GO(__NR_munmap, "2s 0m");
SY(__NR_munmap, x0, x0);
- // __NR_truncate 92 --> sys_truncate()
+ // __NR_truncate 92
GO(__NR_truncate, "2s 1m");
SY(__NR_truncate, x0, x0);
- // __NR_ftruncate 93 --> sys_ftruncate()
+ // __NR_ftruncate 93
GO(__NR_ftruncate, "2s 0m");
SY(__NR_ftruncate, x0, x0);
- // __NR_fchmod 94 --> sys_fchmod()
+ // __NR_fchmod 94
GO(__NR_fchmod, "2s 0m");
SY(__NR_fchmod, x0-1, x0);
- // __NR_fchown 95 --> sys_fchown16
+ // __NR_fchown 95
GO(__NR_fchown, "3s 0m");
SY(__NR_fchown, x0, x0, x0);
- // __NR_getpriority 96 --> sys_getpriority()
+ // __NR_getpriority 96
GO(__NR_getpriority, "2s 0m");
SY(__NR_getpriority, x0, x0);
- // __NR_setpriority 97 --> sys_setpriority()
+ // __NR_setpriority 97
GO(__NR_setpriority, "3s 0m");
SY(__NR_setpriority, x0, x0, x0);
// __NR_profil 98
- //GO(__NR_profil, ".s .m");
- //SY(__NR_profil);
+ GO(__NR_profil, "ni");
+ SY(__NR_profil);
- // __NR_statfs 99 --> sys_statfs()
+ // __NR_statfs 99
GO(__NR_statfs, "2s 2m");
SY(__NR_statfs, x0, x0);
- // __NR_fstatfs 100 --> sys_fstatfs()
+ // __NR_fstatfs 100
GO(__NR_fstatfs, "2s 1m");
SY(__NR_fstatfs, x0, x0);
- // __NR_ioperm 101 --> sys_ioperm()
+ // __NR_ioperm 101
GO(__NR_ioperm, "3s 0m");
SY(__NR_ioperm, x0, x0, x0);
- // __NR_socketcall 102 --> sys_socketcall()
+ // __NR_socketcall 102
// XXX: need to do properly
// GO(__NR_socketcall, "2s 1m");
// SY(__NR_socketcall, x0+SYS_SOCKETPAIR, x0);
- // __NR_syslog 103 --> sys_syslog()
+ // __NR_syslog 103
GO(__NR_syslog, "3s 1m");
SY(__NR_syslog, x0+2, x0, x0+1);
- // __NR_setitimer 104 --> sys_setitimer()
+ // __NR_setitimer 104
GO(__NR_setitimer, "3s 2m");
SY(__NR_setitimer, x0, x0+1, x0+1);
- // __NR_getitimer 105 --> sys_getitimer()
+ // __NR_getitimer 105
GO(__NR_getitimer, "2s 1m");
SY(__NR_getitimer, x0, x0, x0);
- // __NR_stat 106 --> sys_newstat()
+ // __NR_stat 106
GO(__NR_stat, "2s 2m");
SY(__NR_stat, x0, x0);
- // __NR_lstat 107 --> sys_newlstat()
+ // __NR_lstat 107
GO(__NR_lstat, "2s 2m");
SY(__NR_lstat, x0, x0);
- // __NR_fstat 108 --> sys_newfstat()
+ // __NR_fstat 108
GO(__NR_fstat, "2s 1m");
SY(__NR_fstat, x0, x0);
// __NR_olduname 109
+ GO(__NR_olduname, "n/a");
// (obsolete, not handled by Valgrind)
- // __NR_iopl 110 --> sys_iopl()
+ // __NR_iopl 110
GO(__NR_iopl, "1s 0m");
SY(__NR_iopl, x0);
- // __NR_vhangup 111 --> sys_vhangup()
- GO(__NR_vhangup, "0e");
+ // __NR_vhangup 111
+ GO(__NR_vhangup, "0s 0m");
SY(__NR_vhangup);
- // __NR_idle 112 --> sys_ni_syscall()
- GO(__NR_idle, "0e");
+ // __NR_idle 112
+ GO(__NR_idle, "ni");
SY(__NR_idle);
// __NR_vm86old 113
- //GO(__NR_vm86old, ".s .m");
- //SY(__NR_vm86old);
+ GO(__NR_vm86old, "n/a");
+ // (will probably never be handled by Valgrind)
- // __NR_wait4 114 --> sys_wait4()
+ // __NR_wait4 114
GO(__NR_wait4, "4s 2m");
SY(__NR_wait4, x0, x0+1, x0, x0+1);
@@ -468,5 +485,5 @@ int main(void)
//SY(__NR_swapoff);
- // __NR_sysinfo 116 --> sys_sysinfo()
+ // __NR_sysinfo 116
GO(__NR_sysinfo, "1s 1m");
SY(__NR_sysinfo, x0);
@@ -480,5 +497,5 @@ int main(void)
SY(__NR_ipc, x0+4, x0, x0, x0, x0, x0);
- // __NR_fsync 118 --> sys_fsync()
+ // __NR_fsync 118
GO(__NR_fsync, "1s 0m");
SY(__NR_fsync, x0-1);
@@ -496,5 +513,6 @@ int main(void)
// __NR_setdomainname 121
- // (Not yet handled by Valgrind)
+ GO(__NR_setdomainname, "n/a");
+ //SY(__NR_setdomainname); // (Not yet handled by Valgrind)
// __NR_uname 122
@@ -506,10 +524,10 @@ int main(void)
//SY(__NR_modify_ldt);
- // __NR_adjtimex 124 --> sys_adjtimex()
+ // __NR_adjtimex 124
// XXX: need to do properly, but deref'ing NULL...
// GO(__NR_adjtimex, "1s 1m");
// SY(__NR_adjtimex, x0);
- // __NR_mprotect 125 --> sys_mprotect()
+ // __NR_mprotect 125
GO(__NR_mprotect, "3s 0m");
SY(__NR_mprotect, x0, x0, x0);
@@ -519,6 +537,6 @@ int main(void)
//SY(__NR_sigprocmask);
- // __NR_create_module 127 --> sys_ni_syscall()
- GO(__NR_create_module, "0e");
+ // __NR_create_module 127
+ GO(__NR_create_module, "ni");
SY(__NR_create_module);
@@ -528,19 +546,20 @@ int main(void)
// __NR_delete_module 129
- // (Not yet handled by Valgrind)
+ GO(__NR_delete_module, "n/a");
+ //SY(__NR_delete_module); // (Not yet handled by Valgrind)
- // __NR_get_kernel_syms 130 --> sys_ni_syscall()
- GO(__NR_get_kernel_syms, "0e");
+ // __NR_get_kernel_syms 130
+ GO(__NR_get_kernel_syms, "ni");
SY(__NR_get_kernel_syms);
- // __NR_quotactl 131 --> sys_quotactl()
+ // __NR_quotactl 131
GO(__NR_quotactl, "4s 1m");
SY(__NR_quotactl, x0, x0, x0, x0);
- // __NR_getpgid 132 --> sys_getpgid()
+ // __NR_getpgid 132
GO(__NR_getpgid, "1s 0m");
SY(__NR_getpgid, x0);
- // __NR_fchdir 133 --> sys_fchdir()
+ // __NR_fchdir 133
GO(__NR_fchdir, "1s 0m");
SY(__NR_fchdir, x0-1);
@@ -554,10 +573,10 @@ int main(void)
//SY(__NR_sysfs);
- // __NR_personality 136 --> sys_personality()
+ // __NR_personality 136
GO(__NR_personality, "1s 0m");
SY(__NR_personality, x0);
- // __NR_afs_syscall 137 --> sys_ni_syscall()
- GO(__NR_afs_syscall, "0e");
+ // __NR_afs_syscall 137
+ GO(__NR_afs_syscall, "ni");
SY(__NR_afs_syscall);
@@ -574,9 +593,9 @@ int main(void)
//SY(__NR__llseek);
- // __NR_getdents 141 --> sys_getdents()
+ // __NR_getdents 141
GO(__NR_getdents, "3s 1m");
SY(__NR_getdents, x0, x0, x0+1);
- // __NR__newselect 142 --> sys_select()
+ // __NR__newselect 142
GO(__NR__newselect, "5s 4m");
SY(__NR__newselect, x0+8, x0+0xffffffff, x0+1, x0+1, x0+1);
@@ -586,5 +605,5 @@ int main(void)
SY(__NR_flock, x0, x0);
- // __NR_msync 144 --> sys_msync()
+ // __NR_msync 144
GO(__NR_msync, "3s 0m");
SY(__NR_msync, x0, x0, x0);
@@ -598,9 +617,9 @@ int main(void)
//SY(__NR_writev);
- // __NR_getsid 147 --> sys_getsid()
+ // __NR_getsid 147
GO(__NR_getsid, "1s 0m");
SY(__NR_getsid, x0);
- // __NR_fdatasync 148 --> sys_fdatasync()
+ // __NR_fdatasync 148
GO(__NR_fdatasync, "1s 0m");
SY(__NR_fdatasync, x0-1);
@@ -610,33 +629,33 @@ int main(void)
//SY(__NR__sysctl);
- // __NR_mlock 150 --> sys_mlock()
+ // __NR_mlock 150
GO(__NR_mlock, "2s 0m");
SY(__NR_mlock, x0, x0);
- // __NR_munlock 151 --> sys_munlock()
+ // __NR_munlock 151
GO(__NR_munlock, "2s 0m");
SY(__NR_munlock, x0, x0);
- // __NR_mlockall 152 --> sys_mlockall()
+ // __NR_mlockall 152
GO(__NR_mlockall, "2s 0m");
SY(__NR_mlockall, x0, x0);
- // __NR_munlockall 153 --> sys_munlockall()
- GO(__NR_munlockall, "0e");
+ // __NR_munlockall 153
+ GO(__NR_munlockall, "0s 0m");
SY(__NR_munlockall);
- // __NR_sched_setparam 154 --> sys_sched_setparam()
+ // __NR_sched_setparam 154
GO(__NR_sched_setparam, "2s 1m");
SY(__NR_sched_setparam, x0, x0);
- // __NR_sched_getparam 155 --> sys_sched_getparam()
+ // __NR_sched_getparam 155
GO(__NR_sched_getparam, "2s 1m");
SY(__NR_sched_getparam, x0, x0);
- // __NR_sched_setscheduler 156 --> sys_sched_setscheduler()
+ // __NR_sched_setscheduler 156
GO(__NR_sched_setscheduler, "3s 1m");
SY(__NR_sched_setscheduler, x0, x0, x0+1);
- // __NR_sched_getscheduler 157 --> sys_sched_getscheduler()
+ // __NR_sched_getscheduler 157
GO(__NR_sched_getscheduler, "1s 0m");
SY(__NR_sched_getscheduler, x0);
@@ -646,16 +665,17 @@ int main(void)
//SY(__NR_sched_yield);
- // __NR_sched_get_priority_max 159 --> sys_sched_get_priority_min()
+ // __NR_sched_get_priority_max 159
GO(__NR_sched_get_priority_max, "1s 0m");
SY(__NR_sched_get_priority_max, x0);
- // __NR_sched_get_priority_min 160 --> sys_sched_get_priority_min()
+ // __NR_sched_get_priority_min 160
GO(__NR_sched_get_priority_min, "1s 0m");
SY(__NR_sched_get_priority_min, x0);
// __NR_sched_rr_get_interval 161
- // (Not yet handled by Valgrind)
+ GO(__NR_sched_rr_get_interval, "n/a");
+ //SY(__NR_sched_rr_get_interval); // (Not yet handled by Valgrind)
- // __NR_nanosleep 162 --> sys_nanosleep()
+ // __NR_nanosleep 162
GO(__NR_nanosleep, "2s 2m");
SY(__NR_nanosleep, x0, x0+1);
@@ -665,33 +685,33 @@ int main(void)
//SY(__NR_mremap);
- // __NR_setresuid 164 --> sys_setresuid16()
+ // __NR_setresuid 164
GO(__NR_setresuid, "3s 0m");
SY(__NR_setresuid, x0, x0, x0);
- // __NR_getresuid 165 --> sys_getresuid16()
+ // __NR_getresuid 165
GO(__NR_getresuid, "3s 3m");
SY(__NR_getresuid, x0, x0, x0);
// __NR_vm86 166
- //GO(__NR_vm86, ".s .m");
- //SY(__NR_vm86);
+ GO(__NR_vm86, "n/a");
+ // (will probably never be handled by Valgrind)
- // __NR_query_module 167 --> sys_ni_syscall()
- GO(__NR_query_module, "0e");
+ // __NR_query_module 167
+ GO(__NR_query_module, "ni");
SY(__NR_query_module);
- // __NR_poll 168 --> sys_poll()
+ // __NR_poll 168
GO(__NR_poll, "3s 1m");
SY(__NR_poll, x0, x0+1, x0);
// __NR_nfsservctl 169
- //GO(__NR_nfsservctl, ".s .m");
- //SY(__NR_nfsservctl);
+ GO(__NR_nfsservctl, "n/a");
+ //SY(__NR_nfsservctl); // (Not yet handled by Valgrind)
- // __NR_setresgid 170 --> sys_setresgid16()
+ // __NR_setresgid 170
GO(__NR_setresgid, "3s 0m");
SY(__NR_setresgid, x0, x0, x0);
- // __NR_getresgid 171 --> sys_getresgid16()
+ // __NR_getresgid 171
GO(__NR_getresgid, "3s 3m");
SY(__NR_getresgid, x0, x0, x0);
@@ -702,8 +722,8 @@ int main(void)
// __NR_rt_sigreturn 173
- //GO(__NR_rt_sigreturn, ".s .m");
- //SY(__NR_rt_sigreturn);
+ GO(__NR_rt_sigreturn, "n/a");
+ //SY(__NR_rt_sigreturn); // (Not yet handled by Valgrind)
- // __NR_rt_sigaction 174 --> sys_rt_sigaction()
+ // __NR_rt_sigaction 174
GO(__NR_rt_sigaction, "4s 2m");
SY(__NR_rt_sigaction, x0, x0+1, x0+1, x0);
@@ -737,5 +757,5 @@ int main(void)
//SY(__NR_pwrite64);
- // __NR_chown 182 --> sys_chown16()
+ // __NR_chown 182
GO(__NR_chown, "3s 1m");
SY(__NR_chown, x0, x0, x0);
@@ -745,9 +765,9 @@ int main(void)
//SY(__NR_getcwd);
- // __NR_capget 184 --> sys_capget()
+ // __NR_capget 184
GO(__NR_capget, "2s 2m");
SY(__NR_capget, x0, x0);
- // __NR_capset 185 --> sys_capset()
+ // __NR_capset 185
GO(__NR_capset, "2s 2m");
SY(__NR_capset, x0, x0);
@@ -770,6 +790,6 @@ int main(void)
// __NR_vfork 190
- //GO(__NR_vfork, ".s .m");
- //SY(__NR_vfork);
+ GO(__NR_vfork, "n/a");
+ // (Valgrind converts this to __NR_fork)
// __NR_ugetrlimit 191
@@ -777,13 +797,13 @@ int main(void)
SY(__NR_ugetrlimit, x0, x0);
- // __NR_mmap2 192 --> sys_mmap()
+ // __NR_mmap2 192
GO(__NR_mmap2, "5s 0m");
SY(__NR_mmap2, x0, x0, x0, x0, x0-1, x0);
- // __NR_truncate64 193 --> sys_truncate64()
+ // __NR_truncate64 193
GO(__NR_truncate64, "3s 1m");
SY(__NR_truncate64, x0, x0, x0);
- // __NR_ftruncate64 194 --> sys_ftruncate64()
+ // __NR_ftruncate64 194
GO(__NR_ftruncate64, "3s 0m");
SY(__NR_ftruncate64, x0, x0, x0);
@@ -801,22 +821,22 @@ int main(void)
SY(__NR_fstat64, x0, x0);
- // __NR_lchown32 198 --> sys_chown()
+ // __NR_lchown32 198
GO(__NR_lchown32, "3s 1m");
SY(__NR_lchown32, x0, x0, x0);
- // __NR_getuid32 199 --> sys_getuid()
- GO(__NR_getuid32, "0e");
+ // __NR_getuid32 199
+ GO(__NR_getuid32, "0s 0m");
SY(__NR_getuid32);
- // __NR_getgid32 200 --> sys_getgid()
- GO(__NR_getgid32, "0e");
+ // __NR_getgid32 200
+ GO(__NR_getgid32, "0s 0m");
SY(__NR_getgid32);
- // __NR_geteuid32 201 --> sys_geteuid()
- GO(__NR_geteuid32, "0e");
+ // __NR_geteuid32 201
+ GO(__NR_geteuid32, "0s 0m");
SY(__NR_geteuid32);
- // __NR_getegid32 202 --> sys_getegid()
- GO(__NR_getegid32, "0e");
+ // __NR_getegid32 202
+ GO(__NR_getegid32, "0s 0m");
SY(__NR_getegid32);
@@ -829,37 +849,37 @@ int main(void)
SY(__NR_setregid32, x0, x0);
- // __NR_getgroups32 205 --> sys_getgroups()
+ // __NR_getgroups32 205
GO(__NR_getgroups32, "2s 1m");
SY(__NR_getgroups32, x0+1, x0+1);
- // __NR_setgroups32 206 --> sys_setgroups()
+ // __NR_setgroups32 206
GO(__NR_setgroups32, "2s 1m");
SY(__NR_setgroups32, x0+1, x0+1);
- // __NR_fchown32 207 --> sys_fchown()
+ // __NR_fchown32 207
GO(__NR_fchown32, "3s 0m");
SY(__NR_fchown32, x0, x0, x0);
- // __NR_setresuid32 208 --> sys_setresuid()
+ // __NR_setresuid32 208
GO(__NR_setresuid32, "3s 0m");
SY(__NR_setresuid32, x0, x0, x0);
- // __NR_getresuid32 209 --> sys_getresuid()
+ // __NR_getresuid32 209
GO(__NR_getresuid32, "3s 3m");
SY(__NR_getresuid32, x0, x0, x0);
- // __NR_setresgid32 210 --> sys_setresgid()
+ // __NR_setresgid32 210
GO(__NR_setresgid32, "3s 0m");
SY(__NR_setresgid32, x0, x0, x0);
- // __NR_getresgid32 211 --> sys_getresgid()
+ // __NR_getresgid32 211
GO(__NR_getresgid32, "3s 3m");
SY(__NR_getresgid32, x0, x0, x0);
- // __NR_chown32 212 --> sys_chown()
+ // __NR_chown32 212
GO(__NR_chown32, "3s 1m");
SY(__NR_chown32, x0, x0, x0);
- // __NR_setuid32 213 --> sys_setuid()
+ // __NR_setuid32 213
GO(__NR_setuid32, "1s 0m");
SY(__NR_setuid32, x0);
@@ -869,15 +889,15 @@ int main(void)
SY(__NR_setgid32, x0);
- // __NR_setfsuid32 215 --> sys_setfsuid()
+ // __NR_setfsuid32 215
GO(__NR_setfsuid32, "1s 0m");
SY(__NR_setfsuid32, x0);
- // __NR_setfsgid32 216 --> sys_setfsgid()
+ // __NR_setfsgid32 216
GO(__NR_setfsgid32, "1s 0m");
SY(__NR_setfsgid32, x0);
// __NR_pivot_root 217
- //GO(__NR_pivot_root, ".s .m");
- //SY(__NR_pivot_root);
+ GO(__NR_pivot_root, "n/a");
+ //SY(__NR_pivot_root); // (Not yet handled by Valgrind)
// __NR_mincore 218
@@ -889,77 +909,79 @@ int main(void)
//SY(__NR_madvise);
- // __NR_getdents64 220 --> sys_getdents64
+ // __NR_getdents64 220
GO(__NR_getdents64, "3s 1m");
SY(__NR_getdents64, x0, x0, x0+1);
// __NR_fcntl64 221
- //GO(__NR_fcntl64, ".s .m");
- //SY(__NR_fcntl64);
+ GO(__NR_fcntl64, "3s 0m");
+ SY(__NR_fcntl64, x0, x0, x0);
- // 222 --> sys_ni_syscall()
- GO(222, "0e");
+ // 222
+ GO(222, "ni");
SY(222);
- // 223 --> sys_ni_syscall()
- GO(223, "0e");
+ // 223
+ GO(223, "ni");
SY(223);
// __NR_gettid 224
- // (Not yet handled by Valgrind)
+ GO(__NR_gettid, "n/a");
+ //SY(__NR_gettid); // (Not yet handled by Valgrind)
// __NR_readahead 225
- //GO(__NR_readahead, ".s .m");
- //SY(__NR_readahead);
+ GO(__NR_readahead, "n/a");
+ //SY(__NR_readahead); // (Not yet handled by Valgrind)
- // __NR_setxattr 226 --> sys_xattr()
+ // __NR_setxattr 226
GO(__NR_setxattr, "5s 3m");
SY(__NR_setxattr, x0, x0, x0, x0+1, x0);
- // __NR_lsetxattr 227 --> sys_lsetxattr()
+ // __NR_lsetxattr 227
GO(__NR_lsetxattr, "5s 3m");
SY(__NR_lsetxattr, x0, x0, x0, x0+1, x0);
- // __NR_fsetxattr 228 --> sys_fsetxattr()
+ // __NR_fsetxattr 228
GO(__NR_fsetxattr, "5s 2m");
SY(__NR_fsetxattr, x0, x0, x0, x0+1, x0);
- // __NR_getxattr 229 --> sys_getxattr()
+ // __NR_getxattr 229
GO(__NR_getxattr, "4s 3m");
SY(__NR_getxattr, x0, x0, x0, x0+1);
- // __NR_lgetxattr 230 --> sys_lgetxattr()
+ // __NR_lgetxattr 230
GO(__NR_lgetxattr, "4s 3m");
SY(__NR_lgetxattr, x0, x0, x0, x0+1);
- // __NR_fgetxattr 231 --> sys_fgetxattr()
+ // __NR_fgetxattr 231
GO(__NR_fgetxattr, "4s 2m");
SY(__NR_fgetxattr, x0, x0, x0, x0+1);
- // __NR_listxattr 232 --> sys_listxattr()
+ // __NR_listxattr 232
GO(__NR_listxattr, "3s 2m");
SY(__NR_listxattr, x0, x0, x0+1);
- // __NR_llistxattr 233 --> sys_llistxattr()
+ // __NR_llistxattr 233
GO(__NR_llistxattr, "3s 2m");
SY(__NR_llistxattr, x0, x0, x0+1);
- // __NR_flistxattr 234 --> sys_flistxattr()
+ // __NR_flistxattr 234
GO(__NR_flistxattr, "3s 1m");
SY(__NR_flistxattr, x0, x0, x0+1);
- // __NR_removexattr 235 --> sys_removexattr()
+ // __NR_removexattr 235
GO(__NR_removexattr, "2s 2m");
SY(__NR_removexattr, x0, x0);
- // __NR_lremovexattr 236 --> sys_lremovexattr()
+ // __NR_lremovexattr 236
GO(__NR_lremovexattr, "2s 2m");
SY(__NR_lremovexattr, x0, x0);
- // __NR_fremovexattr 237 --> sys_fremovexattr()
+ // __NR_fremovexattr 237
GO(__NR_fremovexattr, "2s 1m");
SY(__NR_fremovexattr, x0, x0);
// __NR_tkill 238
- // (Not yet handled by Valgrind)
+ GO(__NR_tkill, "n/a");
+ //SY(__NR_tkill); // (Not yet handled by Valgrind)
// __NR_sendfile64 239
@@ -971,9 +993,9 @@ int main(void)
//SY(__NR_futex);
- // __NR_sched_setaffinity 241 --> sched_setaffinity()
+ // __NR_sched_setaffinity 241
GO(__NR_sched_setaffinity, "3s 1m");
SY(__NR_sched_setaffinity, x0, x0+1, x0);
- // __NR_sched_getaffinity 242 --> sched_getaffinity()
+ // __NR_sched_getaffinity 242
GO(__NR_sched_getaffinity, "3s 1m");
SY(__NR_sched_getaffinity, x0, x0+1, x0);
@@ -1008,27 +1030,27 @@ int main(void)
// __NR_fadvise64 250
- //GO(__NR_fadvise64, ".s .m");
- //SY(__NR_fadvise64);
+ GO(__NR_fadvise64, "n/a");
+ //SY(__NR_fadvise64); // (Not yet handled by Valgrind)
- // 251 --> sys_ni_syscall()
- GO(251, "0e");
+ // 251
+ GO(251, "ni");
SY(251);
// __NR_exit_group 252
- // See below
+ // (XXX: implement in scalar_exit_group)
- // __NR_lookup_dcookie 253 --> sys_lookup_dcookie()
+ // __NR_lookup_dcookie 253
GO(__NR_lookup_dcookie, "4s 1m");
SY(__NR_lookup_dcookie, x0, x0, x0, x0+1);
- // __NR_epoll_create 254 --> sys_epoll_create()
+ // __NR_epoll_create 254
GO(__NR_epoll_create, "1s 0m");
SY(__NR_epoll_create, x0);
- // __NR_epoll_ctl 255 --> sys_epoll_ctl()
+ // __NR_epoll_ctl 255
GO(__NR_epoll_ctl, "4s 1m");
SY(__NR_epoll_ctl, x0, x0, x0, x0);
- // __NR_epoll_wait 256 --> sys_epoll_wait()
+ // __NR_epoll_wait 256
GO(__NR_epoll_wait, "4s 1m");
SY(__NR_epoll_wait, x0, x0, x0+1, x0);
@@ -1038,5 +1060,5 @@ int main(void)
//SY(__NR_remap_file_pages);
- // __NR_set_tid_address 258 --> sys_set_tid_address()
+ // __NR_set_tid_address 258
GO(__NR_set_tid_address, "1s 0m");
SY(__NR_set_tid_address, x0);
@@ -1078,14 +1100,15 @@ int main(void)
//SY(__NR_clock_nanosleep);
- // __NR_statfs64 268 --> sys_statfs64()
+ // __NR_statfs64 268
GO(__NR_statfs64, "3s 2m");
SY(__NR_statfs64, x0, x0+1, x0);
- // __NR_fstatfs64 269 --> sys_fstatfs64()
+ // __NR_fstatfs64 269
GO(__NR_fstatfs64, "3s 1m");
SY(__NR_fstatfs64, x0, x0+1, x0);
// __NR_tgkill 270
- // (Not yet handled by Valgrind)
+ GO(__NR_tgkill, "n/a");
+ //SY(__NR_tgkill); // (Not yet handled by Valgrind)
// __NR_utimes 271
@@ -1094,22 +1117,22 @@ int main(void)
// __NR_fadvise64_64 272
- //GO(__NR_fadvise64_64, ".s .m");
- //SY(__NR_fadvise64_64);
+ GO(__NR_fadvise64_64, "n/a");
+ //SY(__NR_fadvise64_64); // (Not yet handled by Valgrind)
- // __NR_vserver 273 --> sys_ni_syscall()
- //GO(__NR_vserver, "0e");
- //SY(__NR_vserver);
+ // __NR_vserver 273
+ GO(__NR_vserver, "ni");
+ SY(__NR_vserver);
// __NR_mbind 274
- //GO(__NR_mbind, ".s .m");
- //SY(__NR_mbind);
+ GO(__NR_mbind, "n/a");
+ //SY(__NR_mbind); // (Not yet handled by Valgrind)
// __NR_get_mempolicy 275
- //GO(__NR_get_mempolicy, ".s .m");
- //SY(__NR_get_mempolicy);
+ GO(__NR_get_mempolicy, "n/a");
+ //SY(__NR_get_mempolicy); // (Not yet handled by Valgrind)
// __NR_set_mempolicy 276
- //GO(__NR_set_mempolicy, ".s .m");
- //SY(__NR_set_mempolicy);
+ GO(__NR_set_mempolicy, "n/a");
+ //SY(__NR_set_mempolicy); // (Not yet handled by Valgrind)
// __NR_mq_open 277
@@ -1137,12 +1160,13 @@ int main(void)
//SY(__NR_mq_getsetattr);
- // __NR_sys_kexec_load 283 --> sys_ni_syscall()
- //GO(__NR_sys_kexec_load, "0e");
- //SY(__NR_sys_kexec_load);
+ // __NR_sys_kexec_load 283
+ GO(__NR_sys_kexec_load, "ni");
+ SY(__NR_sys_kexec_load);
+ // no such syscall...
GO(9999, "1e");
SY(9999);
- // __NR_exit 1 --> sys_exit()
+ // __NR_exit 1
GO(__NR_exit, "1s 0m");
SY(__NR_exit, x0);
--- valgrind/memcheck/tests/scalar.stderr.exp #1.30:1.31
@@ -265,5 +265,11 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 17: __NR_break 0e
+ 16: __NR_lchown n/a
+-----------------------------------------------------
+-----------------------------------------------------
+ 17: __NR_break ni
+-----------------------------------------------------
+-----------------------------------------------------
+ 18: __NR_oldstat n/a
-----------------------------------------------------
-----------------------------------------------------
@@ -360,5 +366,8 @@
by 0x........: ...
-----------------------------------------------------
- 24: __NR_getuid 0e
+ 24: __NR_getuid 0s 0m
+-----------------------------------------------------
+-----------------------------------------------------
+ 25: __NR_stime n/a
-----------------------------------------------------
-----------------------------------------------------
@@ -400,4 +409,7 @@
by 0x........: ...
-----------------------------------------------------
+ 28: __NR_oldfstat n/a
+-----------------------------------------------------
+-----------------------------------------------------
30: __NR_utime 2s 2m
-----------------------------------------------------
@@ -425,8 +437,8 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 31: __NR_stty 0e
+ 31: __NR_stty ni
-----------------------------------------------------
-----------------------------------------------------
- 32: __NR_gtty 0e
+ 32: __NR_gtty ni
-----------------------------------------------------
-----------------------------------------------------
@@ -458,8 +470,8 @@
by 0x........: ...
-----------------------------------------------------
- 35: __NR_ftime 0e
+ 35: __NR_ftime ni
-----------------------------------------------------
-----------------------------------------------------
- 36: __NR_sync 0e
+ 36: __NR_sync 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -571,5 +583,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 44: __NR_prof 0e
+ 44: __NR_prof ni
-----------------------------------------------------
-----------------------------------------------------
@@ -590,11 +602,14 @@
by 0x........: ...
-----------------------------------------------------
- 47: __NR_getgid 0e
+ 47: __NR_getgid 0s 0m
+-----------------------------------------------------
-----------------------------------------------------
+ 48: __NR_signal n/a
-----------------------------------------------------
- 49: __NR_geteuid 0e
-----------------------------------------------------
+ 49: __NR_geteuid 0s 0m
-----------------------------------------------------
- 50: __NR_getegid 0e
+-----------------------------------------------------
+ 50: __NR_getegid 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -632,5 +647,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 53: __NR_lock 0e
+ 53: __NR_lock ni
-----------------------------------------------------
-----------------------------------------------------
@@ -677,5 +692,5 @@
by 0x........: ...
-----------------------------------------------------
- 56: __NR_mpx 0e
+ 56: __NR_mpx ni
-----------------------------------------------------
-----------------------------------------------------
@@ -693,5 +708,8 @@
by 0x........: ...
-----------------------------------------------------
- 58: __NR_ulimit 0e
+ 58: __NR_ulimit ni
+-----------------------------------------------------
+-----------------------------------------------------
+ 59: __NR_oldolduname n/a
-----------------------------------------------------
-----------------------------------------------------
@@ -718,4 +736,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 62: __NR_ustat n/a
+-----------------------------------------------------
+-----------------------------------------------------
63: __NR_dup2 2s 0m
-----------------------------------------------------
@@ -731,11 +752,11 @@
by 0x........: ...
-----------------------------------------------------
- 64: __NR_getppid 0e
+ 64: __NR_getppid 0s 0m
-----------------------------------------------------
-----------------------------------------------------
- 65: __NR_getpgrp 0e
+ 65: __NR_getpgrp 0s 0m
-----------------------------------------------------
-----------------------------------------------------
- 66: __NR_setsid 0e
+ 66: __NR_setsid 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -770,4 +791,10 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 68: __NR_sgetmask n/a
+-----------------------------------------------------
+-----------------------------------------------------
+ 69: __NR_ssetmask n/a
+-----------------------------------------------------
+-----------------------------------------------------
70: __NR_setreuid 2s 0m
-----------------------------------------------------
@@ -810,4 +837,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 74: __NR_sethostname n/a
+-----------------------------------------------------
+-----------------------------------------------------
75: __NR_setrlimit 2s 1m
-----------------------------------------------------
@@ -1012,4 +1042,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 84: __NR_oldlstat n/a
+-----------------------------------------------------
+-----------------------------------------------------
85: __NR_readlink 3s 2m
-----------------------------------------------------
@@ -1042,4 +1075,16 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 86: __NR_uselib n/a
+-----------------------------------------------------
+-----------------------------------------------------
+ 87: __NR_swapon n/a
+-----------------------------------------------------
+-----------------------------------------------------
+ 88: __NR_reboot n/a
+-----------------------------------------------------
+-----------------------------------------------------
+ 89: __NR_readdir n/a
+-----------------------------------------------------
+-----------------------------------------------------
90: __NR_mmap 1s 0m
-----------------------------------------------------
@@ -1157,4 +1202,7 @@
by 0x........: ...
-----------------------------------------------------
+ 98: __NR_profil ni
+-----------------------------------------------------
+-----------------------------------------------------
99: __NR_statfs 2s 2m
-----------------------------------------------------
@@ -1361,4 +1409,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+109: __NR_olduname n/a
+-----------------------------------------------------
+-----------------------------------------------------
110: __NR_iopl 1s 0m
-----------------------------------------------------
@@ -1369,8 +1420,11 @@
by 0x........: ...
-----------------------------------------------------
-111: __NR_vhangup 0e
+111: __NR_vhangup 0s 0m
+-----------------------------------------------------
+-----------------------------------------------------
+112: __NR_idle ni
-----------------------------------------------------
-----------------------------------------------------
-112: __NR_idle 0e
+113: __NR_vm86old n/a
-----------------------------------------------------
-----------------------------------------------------
@@ -1483,4 +1537,7 @@
by 0x........: ...
-----------------------------------------------------
+121: __NR_setdomainname n/a
+-----------------------------------------------------
+-----------------------------------------------------
122: __NR_uname 1s 1m
-----------------------------------------------------
@@ -1515,8 +1572,11 @@
by 0x........: ...
-----------------------------------------------------
-127: __NR_create_module 0e
+127: __NR_create_module ni
+-----------------------------------------------------
-----------------------------------------------------
+129: __NR_delete_module n/a
-----------------------------------------------------
-130:__NR_get_kernel_syms 0e
+-----------------------------------------------------
+130:__NR_get_kernel_syms ni
-----------------------------------------------------
-----------------------------------------------------
@@ -1574,5 +1634,5 @@
by 0x........: ...
-----------------------------------------------------
-137: __NR_afs_syscall 0e
+137: __NR_afs_syscall ni
-----------------------------------------------------
-----------------------------------------------------
@@ -1750,5 +1810,5 @@
by 0x........: ...
-----------------------------------------------------
-153: __NR_munlockall 0e
+153: __NR_munlockall 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -1839,4 +1899,7 @@
by 0x........: ...
-----------------------------------------------------
+161:__NR_sched_rr_get_interval n/a
+-----------------------------------------------------
+-----------------------------------------------------
162: __NR_nanosleep 2s 2m
-----------------------------------------------------
@@ -1918,5 +1981,8 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
-167: __NR_query_module 0e
+166: __NR_vm86 n/a
+-----------------------------------------------------
+-----------------------------------------------------
+167: __NR_query_module ni
-----------------------------------------------------
-----------------------------------------------------
@@ -1945,4 +2011,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+169: __NR_nfsservctl n/a
+-----------------------------------------------------
+-----------------------------------------------------
170: __NR_setresgid 3s 0m
-----------------------------------------------------
@@ -1999,4 +2068,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+173: __NR_rt_sigreturn n/a
+-----------------------------------------------------
+-----------------------------------------------------
174: __NR_rt_sigaction 4s 2m
-----------------------------------------------------
@@ -2108,4 +2180,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+190: __NR_vfork n/a
+-----------------------------------------------------
+-----------------------------------------------------
191: __NR_ugetrlimit 2s 1m
-----------------------------------------------------
@@ -2290,14 +2365,14 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
-199: __NR_getuid32 0e
+199: __NR_getuid32 0s 0m
-----------------------------------------------------
-----------------------------------------------------
-200: __NR_getgid32 0e
+200: __NR_getgid32 0s 0m
-----------------------------------------------------
-----------------------------------------------------
-201: __NR_geteuid32 0e
+201: __NR_geteuid32 0s 0m
-----------------------------------------------------
-----------------------------------------------------
-202: __NR_getegid32 0e
+202: __NR_getegid32 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -2548,4 +2623,7 @@
by 0x........: ...
-----------------------------------------------------
+217: __NR_pivot_root n/a
+-----------------------------------------------------
+-----------------------------------------------------
220: __NR_getdents64 3s 1m
-----------------------------------------------------
@@ -2572,8 +2650,32 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
-222: 222 0e
+221: __NR_fcntl64 3s 0m
+-----------------------------------------------------
+
+Syscall param fcntl64(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param fcntl64(cmd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param fcntl64(arg) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+222: 222 ni
-----------------------------------------------------
-----------------------------------------------------
-223: 223 0e
+223: 223 ni
+-----------------------------------------------------
+-----------------------------------------------------
+224: __NR_gettid n/a
+-----------------------------------------------------
+-----------------------------------------------------
+225: __NR_readahead n/a
-----------------------------------------------------
-----------------------------------------------------
@@ -2980,4 +3082,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+238: __NR_tkill n/a
+-----------------------------------------------------
+-----------------------------------------------------
241:__NR_sched_setaffinity 3s 1m
-----------------------------------------------------
@@ -3028,5 +3133,8 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
-251: 251 0e
+250: __NR_fadvise64 n/a
+-----------------------------------------------------
+-----------------------------------------------------
+251: 251 ni
-----------------------------------------------------
-----------------------------------------------------
@@ -3188,4 +3296,25 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+270: __NR_tgkill n/a
+-----------------------------------------------------
+-----------------------------------------------------
+272: __NR_fadvise64_64 n/a
+-----------------------------------------------------
+-----------------------------------------------------
+273: __NR_vserver ni
+-----------------------------------------------------
+-----------------------------------------------------
+274: __NR_mbind n/a
+-----------------------------------------------------
+-----------------------------------------------------
+275: __NR_get_mempolicy n/a
+-----------------------------------------------------
+-----------------------------------------------------
+276: __NR_set_mempolicy n/a
+-----------------------------------------------------
+-----------------------------------------------------
+283: __NR_sys_kexec_load ni
+-----------------------------------------------------
+-----------------------------------------------------
9999: 9999 1e
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 14:50:05
|
CVS commit by nethercote:
converted more syscalls
M +26 -21 coregrind/vg_syscalls.c 1.205
M +15 -16 memcheck/tests/scalar.c 1.36
M +90 -0 memcheck/tests/scalar.stderr.exp 1.30
--- valgrind/coregrind/vg_syscalls.c #1.204:1.205
@@ -4741,5 +4741,6 @@ POSTx(sys_pipe)
}
-PRE(poll)
+// XXX: x86-specific, due to pollfd struct
+PREx(sys_poll, MayBlock)
{
/* struct pollfd {
@@ -4752,5 +4753,7 @@ PRE(poll)
UInt i;
struct vki_pollfd* ufds = (struct vki_pollfd *)arg1;
- PRINT("poll ( %p, %d, %d )\n",arg1,arg2,arg3);
+ PRINT("sys_poll ( %p, %d, %d )\n", arg1,arg2,arg3);
+ PRE_REG_READ3(long, "poll",
+ struct pollfd *, ufds, unsigned int, nfds, long, timeout);
for (i = 0; i < arg2; i++) {
@@ -4764,5 +4767,5 @@ PRE(poll)
}
-POST(poll)
+POSTx(sys_poll)
{
if (res > 0) {
@@ -4775,13 +4778,13 @@ POST(poll)
}
-PRE(epoll_create)
+PREx(sys_epoll_create, 0)
{
- /* int epoll_create(int size) */
- PRINT("epoll_create ( %d )", arg1);
+ PRINT("sys_epoll_create ( %d )", arg1);
+ PRE_REG_READ1(long, "epoll_create", int, size);
}
-POST(epoll_create)
+POSTx(sys_epoll_create)
{
- if (!fd_allowed(res, "open", tid, True)) {
+ if (!fd_allowed(res, "epoll_create", tid, True)) {
VG_(close)(res);
set_result( -VKI_EMFILE );
@@ -4792,7 +4795,6 @@ POST(epoll_create)
}
-PRE(epoll_ctl)
+PREx(sys_epoll_ctl, 0)
{
- /* int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) */
static const char* epoll_ctl_s[3] = {
"EPOLL_CTL_ADD",
@@ -4800,18 +4802,21 @@ PRE(epoll_ctl)
"EPOLL_CTL_MOD"
};
- PRINT("epoll_ctl ( %d, %s, %d, %p )",
+ PRINT("sys_epoll_ctl ( %d, %s, %d, %p )",
arg1, ( arg2<3 ? epoll_ctl_s[arg2] : "?" ), arg3, arg4);
+ PRE_REG_READ4(long, "epoll_ctl",
+ int, epfd, int, op, int, fd, struct epoll_event *, event);
PRE_MEM_READ( "epoll_ctl(event)", arg4, sizeof(struct epoll_event) );
}
-PRE(epoll_wait)
+PREx(sys_epoll_wait, MayBlock)
{
- /* int epoll_wait(int epfd, struct epoll_event * events,
- int maxevents, int timeout) */
- PRINT("epoll_wait ( %d, %p, %d, %d )", arg1, arg2, arg3, arg4);
+ PRINT("sys_epoll_wait ( %d, %p, %d, %d )", arg1, arg2, arg3, arg4);
+ PRE_REG_READ4(long, "epoll_wait",
+ int, epfd, struct epoll_event *, events,
+ int, maxevents, int, timeout);
PRE_MEM_WRITE( "epoll_wait(events)", arg2, sizeof(struct epoll_event)*arg3);
}
-POST(epoll_wait)
+POSTx(sys_epoll_wait)
{
if (res > 0)
@@ -6534,5 +6539,5 @@ static const struct sys_info sys_info[]
// (__NR_vm86, sys_vm86), // 166 (x86) L
SYSX_(__NR_query_module, sys_ni_syscall), // 167 * P -- unimplemented
- SYSBA(__NR_poll, sys_poll, MayBlock), // 168 *
+ SYSXY(__NR_poll, sys_poll), // 168 * (XPG4-UNIX)
// (__NR_nfsservctl, sys_nfsservctl), // 169 * L
@@ -6641,8 +6646,8 @@ static const struct sys_info sys_info[]
SYSX_(__NR_exit_group, sys_exit_group), // 252 *
SYSXY(__NR_lookup_dcookie, sys_lookup_dcookie), // 253 (*/32/64) L
- SYSBA(__NR_epoll_create, sys_epoll_create, 0), // 254 *
+ SYSXY(__NR_epoll_create, sys_epoll_create), // 254 * L
- SYSB_(__NR_epoll_ctl, sys_epoll_ctl, 0), // 255 *
- SYSBA(__NR_epoll_wait, sys_epoll_wait, MayBlock), // 256 *
+ SYSX_(__NR_epoll_ctl, sys_epoll_ctl), // 255 * L
+ SYSXY(__NR_epoll_wait, sys_epoll_wait), // 256 * L
// (__NR_remap_file_pages, sys_remap_file_pages), // 257 * L
SYSX_(__NR_set_tid_address, sys_set_tid_address), // 258 * ?
--- valgrind/memcheck/tests/scalar.c #1.35:1.36
@@ -496,6 +496,5 @@ int main(void)
// __NR_setdomainname 121
- //GO(__NR_setdomainname, ".s .m");
- //SY(__NR_setdomainname);
+ // (Not yet handled by Valgrind)
// __NR_uname 122
@@ -682,7 +681,7 @@ int main(void)
SY(__NR_query_module);
- // __NR_poll 168
- //GO(__NR_poll, ".s .m");
- //SY(__NR_poll);
+ // __NR_poll 168 --> sys_poll()
+ GO(__NR_poll, "3s 1m");
+ SY(__NR_poll, x0, x0+1, x0);
// __NR_nfsservctl 169
@@ -1023,15 +1022,15 @@ int main(void)
SY(__NR_lookup_dcookie, x0, x0, x0, x0+1);
- // __NR_epoll_create 254
- //GO(__NR_epoll_create, ".s .m");
- //SY(__NR_epoll_create);
+ // __NR_epoll_create 254 --> sys_epoll_create()
+ GO(__NR_epoll_create, "1s 0m");
+ SY(__NR_epoll_create, x0);
- // __NR_epoll_ctl 255
- //GO(__NR_epoll_ctl, ".s .m");
- //SY(__NR_epoll_ctl);
+ // __NR_epoll_ctl 255 --> sys_epoll_ctl()
+ GO(__NR_epoll_ctl, "4s 1m");
+ SY(__NR_epoll_ctl, x0, x0, x0, x0);
- // __NR_epoll_wait 256
- //GO(__NR_epoll_wait, ".s .m");
- //SY(__NR_epoll_wait);
+ // __NR_epoll_wait 256 --> sys_epoll_wait()
+ GO(__NR_epoll_wait, "4s 1m");
+ SY(__NR_epoll_wait, x0, x0, x0+1, x0);
// __NR_remap_file_pages 257
--- valgrind/memcheck/tests/scalar.stderr.exp #1.29:1.30
@@ -1921,4 +1921,28 @@
-----------------------------------------------------
-----------------------------------------------------
+168: __NR_poll 3s 1m
+-----------------------------------------------------
+
+Syscall param poll(ufds) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param poll(nfds) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param poll(timeout) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param poll(ufds) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
170: __NR_setresgid 3s 0m
-----------------------------------------------------
@@ -3036,4 +3060,70 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+254: __NR_epoll_create 1s 0m
+-----------------------------------------------------
+
+Syscall param epoll_create(size) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+255: __NR_epoll_ctl 4s 1m
+-----------------------------------------------------
+
+Syscall param epoll_ctl(epfd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_ctl(op) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_ctl(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_ctl(event) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_ctl(event) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+256: __NR_epoll_wait 4s 1m
+-----------------------------------------------------
+
+Syscall param epoll_wait(epfd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_wait(events) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_wait(maxevents) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_wait(timeout) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param epoll_wait(events) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
258:__NR_set_tid_address 1s 0m
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 14:32:18
|
CVS commit by nethercote:
Converted more syscalls
M +116 -103 coregrind/vg_syscalls.c 1.204
M +9 -0 include/linux/vki.h 1.8
M +71 -76 memcheck/tests/scalar.c 1.35
M +327 -0 memcheck/tests/scalar.stderr.exp 1.29
--- valgrind/coregrind/vg_syscalls.c #1.203:1.204
@@ -1125,4 +1125,9 @@ PREx(sys_exit, Special)
}
+PREx(sys_sched_yield, Special)
+{
+ VG_(core_panic)("syscall sched_yield() not caught by the scheduler?!");
+}
+
PREx(sys_ni_syscall, Special)
{
@@ -1267,7 +1272,8 @@ PRE(get_thread_area)
}
-PRE(set_tid_address)
+PREx(sys_set_tid_address, Special)
{
- PRINT("set_tid_address ( %p )", arg1);
+ PRINT("sys_set_tid_address ( %p )", arg1);
+ PRE_REG_READ1(long, "set_tid_address", int *, tidptr);
}
@@ -1449,7 +1455,10 @@ PREx(sys_fremovexattr, MayBlock)
}
-PRE(quotactl)
+PREx(sys_quotactl, 0)
{
- PRINT("quotactl (0x%x, %p, 0x%x, 0x%x )", arg1,arg2,arg3, arg4);
+ PRINT("sys_quotactl (0x%x, %p, 0x%x, 0x%x )", arg1,arg2,arg3, arg4);
+ PRE_REG_READ4(long, "quotactl",
+ unsigned int, cmd, const char *, special, vki_qid_t, id,
+ void *, addr);
PRE_MEM_RASCIIZ( "quotactl(special)", arg2 );
}
@@ -1552,12 +1561,12 @@ PRE(putpmsg)
}
-PRE(getitimer)
+PREx(sys_getitimer, NBRunInLWP)
{
- /* int getitimer(int which, struct itimerval *value); */
- PRINT("getitimer ( %d, %p )", arg1, arg2);
- PRE_MEM_WRITE( "getitimer(timer)", arg2, sizeof(struct vki_itimerval) );
+ PRINT("sys_getitimer ( %d, %p )", arg1, arg2);
+ PRE_REG_READ2(long, "getitimer", int, which, struct itimerval *, value);
+ PRE_MEM_WRITE( "getitimer(value)", arg2, sizeof(struct vki_itimerval) );
}
-POST(getitimer)
+POSTx(sys_getitimer)
{
if (arg2 != (Addr)NULL) {
@@ -1566,4 +1575,23 @@ POST(getitimer)
}
+PREx(sys_setitimer, NBRunInLWP)
+{
+ PRINT("sys_setitimer ( %d, %p, %p )", arg1,arg2,arg3);
+ PRE_REG_READ3(long, "setitimer",
+ int, which,
+ struct itimerval *, value, struct itimerval *, ovalue);
+ if (arg2 != (Addr)NULL)
+ PRE_MEM_READ( "setitimer(value)", arg2, sizeof(struct vki_itimerval) );
+ if (arg3 != (Addr)NULL)
+ PRE_MEM_WRITE( "setitimer(ovalue)", arg3, sizeof(struct vki_itimerval));
+}
+
+POSTx(sys_setitimer)
+{
+ if (arg3 != (Addr)NULL) {
+ VG_TRACK( post_mem_write,arg3, sizeof(struct vki_itimerval));
+ }
+}
+
PREx(sys_syslog, MayBlock)
{
@@ -1590,8 +1618,8 @@ POSTx(sys_syslog)
}
-PRE(personality)
+PREx(sys_personality, 0)
{
- /* int personality(unsigned long persona); */
- PRINT("personality ( %d )", arg1);
+ PRINT("personality ( %llu )", (ULong)arg1);
+ PRE_REG_READ1(long, "personality", vki_u_long, persona);
}
@@ -1647,17 +1675,17 @@ POST(_sysctl)
}
-PRE(sched_getscheduler)
+PREx(sys_sched_getscheduler, 0/*???*/)
{
- /* int sched_getscheduler(pid_t pid); */
- PRINT("sched_getscheduler ( %d )", arg1);
+ PRINT("sys_sched_getscheduler ( %d )", arg1);
+ PRE_REG_READ1(long, "sched_getscheduler", vki_pid_t, pid);
}
-PRE(sched_setscheduler)
+PREx(sys_sched_setscheduler, 0/*???*/)
{
- /* int sched_setscheduler(pid_t pid, int policy,
- const struct sched_param *p); */
- PRINT("sched_setscheduler ( %d, %d, %p )",arg1,arg2,arg3);
+ PRINT("sys_sched_setscheduler ( %d, %d, %p )", arg1,arg2,arg3);
+ PRE_REG_READ3(long, "sched_setscheduler",
+ vki_pid_t, pid, int, policy, struct sched_param *, p);
if (arg3 != (UWord)NULL)
- PRE_MEM_READ( "sched_setscheduler(struct sched_param *p)",
+ PRE_MEM_READ( "sched_setscheduler(p)",
arg3, sizeof(struct vki_sched_param));
}
@@ -1687,14 +1715,14 @@ PREx(sys_munlockall, MayBlock)
}
-PRE(sched_get_priority_max)
+PREx(sys_sched_get_priority_max, 0/*???*/)
{
- /* int sched_get_priority_max(int policy); */
PRINT("sched_get_priority_max ( %d )", arg1);
+ PRE_REG_READ1(long, "sched_get_priority_max", int, policy);
}
-PRE(sched_get_priority_min)
+PREx(sys_sched_get_priority_min, 0/*???*/)
{
- /* int sched_get_priority_min(int policy); */
PRINT("sched_get_priority_min ( %d )", arg1);
+ PRE_REG_READ1(long, "sched_get_priority_min", int, policy);
}
@@ -1813,8 +1841,8 @@ POSTx(sys_fstatfs64)
}
-PRE(getsid)
+PREx(sys_getsid, 0)
{
- /* pid_t getsid(pid_t pid); */
- PRINT("getsid ( %d )", arg1);
+ PRINT("sys_getsid ( %d )", arg1);
+ PRE_REG_READ1(long, "getsid", vki_pid_t, pid);
}
@@ -1863,8 +1891,9 @@ PREx(sys_ioperm, 0)
}
-PRE(capget)
+PREx(sys_capget, 0)
{
- /* int capget(cap_user_header_t header, cap_user_data_t data); */
PRINT("capget ( %p, %p )", arg1, arg2 );
+ PRE_REG_READ2(long, "capget",
+ vki_cap_user_header_t, header, vki_cap_user_data_t, data);
PRE_MEM_READ( "capget(header)", arg1,
sizeof(struct __vki_user_cap_header_struct) );
@@ -1873,5 +1902,5 @@ PRE(capget)
}
-POST(capget)
+POSTx(sys_capget)
{
if (arg2 != (Addr)NULL)
@@ -1879,6 +1908,10 @@ POST(capget)
}
-PRE(capset)
+PREx(sys_capset, 0)
{
+ PRINT("sys_capset ( %p, %p )", arg1, arg2 );
+ PRE_REG_READ2(long, "capset",
+ vki_cap_user_header_t, header,
+ const vki_cap_user_data_t, data);
PRE_MEM_READ( "capset(header)",
arg1, sizeof(struct __vki_user_cap_header_struct) );
@@ -2172,8 +2205,8 @@ POSTx(sys_fcntl)
}
-PRE(fchdir)
+PREx(sys_fchdir, 0)
{
- /* int fchdir(int fd); */
- PRINT("fchdir ( %d )", arg1);
+ PRINT("sys_fchdir ( %d )", arg1);
+ PRE_REG_READ1(long, "fchdir", unsigned int, fd);
}
@@ -2453,8 +2486,8 @@ PREx(sys_getpid, 0)
}
-PRE(getpgid)
+PREx(sys_getpgid, 0)
{
- /* pid_t getpgid(pid_t pid); */
- PRINT("getpgid ( %d )", arg1);
+ PRINT("sys_getpgid ( %d )", arg1);
+ PRE_REG_READ1(long, "getpgid", vki_pid_t, pid);
}
@@ -4592,8 +4625,9 @@ POST(mincore)
}
-PRE(nanosleep)
+PREx(sys_nanosleep, MayBlock|PostOnFail)
{
- /* int nanosleep(const struct timespec *req, struct timespec *rem); */
PRINT("nanosleep ( %p, %p )", arg1,arg2);
+ PRE_REG_READ2(long, "nanosleep",
+ struct timespec *, req, struct timespec *, rem);
PRE_MEM_READ( "nanosleep(req)", arg1, sizeof(struct vki_timespec) );
if (arg2 != (UWord)NULL)
@@ -4601,5 +4635,5 @@ PRE(nanosleep)
}
-POST(nanosleep)
+POSTx(sys_nanosleep)
{
if (arg2 != (UWord)NULL && res == -VKI_EINTR)
@@ -4850,35 +4884,30 @@ PREx(sys_rmdir, MayBlock)
}
-PRE(sched_setparam)
+PREx(sys_sched_setparam, 0/*???*/)
{
- /* int sched_setparam(pid_t pid, const struct sched_param *p); */
PRINT("sched_setparam ( %d, %p )", arg1, arg2 );
- PRE_MEM_READ( "sched_setparam(ptr)", arg2, sizeof(struct vki_sched_param) );
+ PRE_REG_READ2(long, "sched_setparam",
+ vki_pid_t, pid, struct sched_param *, p);
+ PRE_MEM_READ( "sched_setparam(p)", arg2, sizeof(struct vki_sched_param) );
}
-POST(sched_setparam)
+POSTx(sys_sched_setparam)
{
POST_MEM_WRITE( arg2, sizeof(struct vki_sched_param) );
}
-PRE(sched_getparam)
+PREx(sys_sched_getparam, 0/*???*/)
{
- /* int sched_getparam(pid_t pid, struct sched_param *p); */
PRINT("sched_getparam ( %d, %p )", arg1, arg2 );
- PRE_MEM_WRITE( "sched_getparam(ptr)",
- arg2, sizeof(struct vki_sched_param) );
+ PRE_REG_READ2(long, "sched_getparam",
+ vki_pid_t, pid, struct sched_param *, p);
+ PRE_MEM_WRITE( "sched_getparam(p)", arg2, sizeof(struct vki_sched_param) );
}
-POST(sched_getparam)
+POSTx(sys_sched_getparam)
{
POST_MEM_WRITE( arg2, sizeof(struct vki_sched_param) );
}
-PRE(sched_yield)
-{
- /* int sched_yield(void); */
- PRINT("sched_yield ()" );
-}
-
PREx(old_select, MayBlock)
{
@@ -4934,22 +4963,4 @@ PREx(sys_select, MayBlock)
}
-PRE(setitimer)
-{
- /* setitimer(int which, const struct itimerval *value,
- struct itimerval *ovalue); */
- PRINT("setitimer ( %d, %p, %p )", arg1,arg2,arg3);
- if (arg2 != (Addr)NULL)
- PRE_MEM_READ( "setitimer(value)", arg2, sizeof(struct vki_itimerval) );
- if (arg3 != (Addr)NULL)
- PRE_MEM_WRITE( "setitimer(ovalue)", arg3, sizeof(struct vki_itimerval));
-}
-
-POST(setitimer)
-{
- if (arg3 != (Addr)NULL) {
- VG_TRACK( post_mem_write,arg3, sizeof(struct vki_itimerval));
- }
-}
-
PREx(sys_setfsgid, 0)
{
@@ -5699,19 +5710,21 @@ POST(futex)
}
-PRE(sched_setaffinity)
+PREx(sys_sched_setaffinity, 0)
{
- /* int sched_setaffinity(pid_t pid, unsigned int len, unsigned long *mask) */
PRINT("sched_setaffinity ( %d, %d, %p )", arg1, arg2, arg3);
+ PRE_REG_READ3(long, "sched_setaffinity",
+ vki_pid_t, pid, unsigned int, len, unsigned long *, mask);
PRE_MEM_READ( "sched_setaffinity(mask)", arg3, arg2);
}
-PRE(sched_getaffinity)
+PREx(sys_sched_getaffinity, 0)
{
- /* int sched_setaffinity(pid_t pid, unsigned int len, unsigned long *mask) */
PRINT("sched_getaffinity ( %d, %d, %p )", arg1, arg2, arg3);
+ PRE_REG_READ3(long, "sched_getaffinity",
+ vki_pid_t, pid, unsigned int, len, unsigned long *, mask);
PRE_MEM_WRITE( "sched_getaffinity(mask)", arg3, arg2);
}
-POST(sched_getaffinity)
+POSTx(sys_sched_getaffinity)
{
VG_TRACK(post_mem_write, arg3, arg2);
@@ -6442,7 +6455,7 @@ static const struct sys_info sys_info[]
SYSXY(__NR_socketcall, sys_socketcall), // 102 * L
SYSXY(__NR_syslog, sys_syslog), // 103 * L
- SYSBA(__NR_setitimer, sys_setitimer, NBRunInLWP), // 104 *
+ SYSXY(__NR_setitimer, sys_setitimer), // 104 * (SVr4,4.4BSD)
- SYSBA(__NR_getitimer, sys_getitimer, NBRunInLWP), // 105 *
+ SYSXY(__NR_getitimer, sys_getitimer), // 105 * (SVr4,4.4BSD)
SYSXY(__NR_stat, sys_newstat), // 106 * P
SYSXY(__NR_lstat, sys_newlstat), // 107 *
@@ -6477,11 +6490,11 @@ static const struct sys_info sys_info[]
// Nb: get_kernel_syms() was removed 2.4-->2.6
SYSX_(__NR_get_kernel_syms, sys_ni_syscall), // 130 * P -- unimplemented
- SYSB_(__NR_quotactl, sys_quotactl, 0), // 131 *
- SYSB_(__NR_getpgid, sys_getpgid, 0), // 132 *
- SYSB_(__NR_fchdir, sys_fchdir, 0), // 133 *
+ SYSX_(__NR_quotactl, sys_quotactl), // 131 * (?)
+ SYSX_(__NR_getpgid, sys_getpgid), // 132 * P
+ SYSX_(__NR_fchdir, sys_fchdir), // 133 * (almost-P)
// (__NR_bdflush, sys_bdflush), // 134 * L
// (__NR_sysfs, sys_sysfs), // 135 * (SVr4)
- SYSB_(__NR_personality, sys_personality, 0), // 135 * (SVr4)
+ SYSX_(__NR_personality, sys_personality), // 136 * L
SYSX_(__NR_afs_syscall, sys_ni_syscall), // 137 * P
SYSX_(__NR_setfsuid, sys_setfsuid16), // 138 ## L
@@ -6496,5 +6509,5 @@ static const struct sys_info sys_info[]
SYSBA(__NR_readv, sys_readv, MayBlock), // 145 *
SYSB_(__NR_writev, sys_writev, MayBlock), // 146 *
- SYSB_(__NR_getsid, sys_getsid, 0), // 147 *
+ SYSX_(__NR_getsid, sys_getsid), // 147 * P
SYSX_(__NR_fdatasync, sys_fdatasync), // 148 * P
SYSBA(__NR__sysctl, sys_sysctl, 0), // 149 *
@@ -6504,15 +6517,15 @@ static const struct sys_info sys_info[]
SYSX_(__NR_mlockall, sys_mlockall), // 152 * P
SYSX_(__NR_munlockall, sys_munlockall), // 153 * P
- SYSBA(__NR_sched_setparam, sys_sched_setparam, 0/*???*/), // 154 *
+ SYSXY(__NR_sched_setparam, sys_sched_setparam), // 154 * P
- SYSBA(__NR_sched_getparam, sys_sched_getparam, 0/*???*/), // 155 *
- SYSB_(__NR_sched_setscheduler, sys_sched_setscheduler, 0/*???*/), // 156 *
- SYSB_(__NR_sched_getscheduler, sys_sched_getscheduler, 0/*???*/), // 157 *
- SYSB_(__NR_sched_yield, sys_sched_yield, 0/*???*/), // 158 *
- SYSB_(__NR_sched_get_priority_max,sys_sched_get_priority_max, 0/*???*/), // 159 *
+ SYSXY(__NR_sched_getparam, sys_sched_getparam), // 155 * P
+ SYSX_(__NR_sched_setscheduler, sys_sched_setscheduler), // 156 * P
+ SYSX_(__NR_sched_getscheduler, sys_sched_getscheduler), // 157 * P
+ SYSX_(__NR_sched_yield, sys_sched_yield), // 158 * P
+ SYSX_(__NR_sched_get_priority_max,sys_sched_get_priority_max), // 159 * P
- SYSB_(__NR_sched_get_priority_min,sys_sched_get_priority_min, 0/*???*/), // 160 *
+ SYSX_(__NR_sched_get_priority_min,sys_sched_get_priority_min), // 160 * P
// (__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161 *
- SYSBA(__NR_nanosleep, sys_nanosleep, MayBlock|PostOnFail), // 162 *
+ SYSXY(__NR_nanosleep, sys_nanosleep), // 162 * P
SYSX_(__NR_mremap, sys_mremap), // 163 * P
SYSX_(__NR_setresuid, sys_setresuid16), // 164 ## (non-standard)
@@ -6540,7 +6553,7 @@ static const struct sys_info sys_info[]
SYSX_(__NR_chown, sys_chown16), // 182 * P
SYSBA(__NR_getcwd, sys_getcwd, 0), // 183 *
- SYSBA(__NR_capget, sys_capget, 0), // 184 *
+ SYSXY(__NR_capget, sys_capget), // 184 * L?
- SYSB_(__NR_capset, sys_capset, 0), // 185 *
+ SYSX_(__NR_capset, sys_capset), // 185 * L?
SYSBA(__NR_sigaltstack, sys_sigaltstack, SIG_SIM), // 186
SYSBA(__NR_sendfile, sys_sendfile, MayBlock), // 187 *
@@ -6613,6 +6626,6 @@ static const struct sys_info sys_info[]
SYSBA(__NR_futex, sys_futex, MayBlock), // 240 *
- SYSB_(__NR_sched_setaffinity,sys_sched_setaffinity, 0), // 241 *
- SYSBA(__NR_sched_getaffinity,sys_sched_getaffinity, 0), // 242 *
+ SYSX_(__NR_sched_setaffinity,sys_sched_setaffinity), // 241 * L?
+ SYSXY(__NR_sched_getaffinity,sys_sched_getaffinity), // 242 * L?
SYSB_(__NR_set_thread_area, sys_set_thread_area, Special), // 243
SYSB_(__NR_get_thread_area, sys_get_thread_area, Special), // 244
@@ -6633,5 +6646,5 @@ static const struct sys_info sys_info[]
SYSBA(__NR_epoll_wait, sys_epoll_wait, MayBlock), // 256 *
// (__NR_remap_file_pages, sys_remap_file_pages), // 257 * L
- SYSB_(__NR_set_tid_address, sys_set_tid_address, Special), // 258 *
+ SYSX_(__NR_set_tid_address, sys_set_tid_address), // 258 * ?
SYSBA(__NR_timer_create, sys_timer_create, 0), // 259
--- valgrind/include/linux/vki.h #1.7:1.8
@@ -128,4 +128,6 @@ typedef __vki_kernel_clock_t vki_clock_t
typedef __vki_kernel_caddr_t vki_caddr_t;
+typedef unsigned long vki_u_long;
+
typedef unsigned int vki_uint;
@@ -1841,4 +1843,11 @@ struct vki_kbd_repeat {
#define VKI_KDFONTOP 0x4B72 /* font operations */
+//----------------------------------------------------------------------
+// From linux-2.6.9/include/linux/kb.h
+//----------------------------------------------------------------------
+
+typedef __vki_kernel_uid32_t vki_qid_t; /* Type in which we store ids in memory */
+
+
#endif // __LINUX_VKI_H
--- valgrind/memcheck/tests/scalar.c #1.34:1.35
@@ -421,11 +421,11 @@ int main(void)
SY(__NR_syslog, x0+2, x0, x0+1);
- // __NR_setitimer 104
- //GO(__NR_setitimer, ".s .m");
- //SY(__NR_setitimer);
+ // __NR_setitimer 104 --> sys_setitimer()
+ GO(__NR_setitimer, "3s 2m");
+ SY(__NR_setitimer, x0, x0+1, x0+1);
- // __NR_getitimer 105
- //GO(__NR_getitimer, ".s .m");
- //SY(__NR_getitimer);
+ // __NR_getitimer 105 --> sys_getitimer()
+ GO(__NR_getitimer, "2s 1m");
+ SY(__NR_getitimer, x0, x0, x0);
// __NR_stat 106 --> sys_newstat()
@@ -529,6 +529,5 @@ int main(void)
// __NR_delete_module 129
- //GO(__NR_delete_module, ".s .m");
- //SY(__NR_delete_module);
+ // (Not yet handled by Valgrind)
// __NR_get_kernel_syms 130 --> sys_ni_syscall()
@@ -536,15 +535,15 @@ int main(void)
SY(__NR_get_kernel_syms);
- // __NR_quotactl 131
- //GO(__NR_quotactl, ".s .m");
- //SY(__NR_quotactl);
+ // __NR_quotactl 131 --> sys_quotactl()
+ GO(__NR_quotactl, "4s 1m");
+ SY(__NR_quotactl, x0, x0, x0, x0);
- // __NR_getpgid 132
- //GO(__NR_getpgid, ".s .m");
- //SY(__NR_getpgid);
+ // __NR_getpgid 132 --> sys_getpgid()
+ GO(__NR_getpgid, "1s 0m");
+ SY(__NR_getpgid, x0);
- // __NR_fchdir 133
- //GO(__NR_fchdir, ".s .m");
- //SY(__NR_fchdir);
+ // __NR_fchdir 133 --> sys_fchdir()
+ GO(__NR_fchdir, "1s 0m");
+ SY(__NR_fchdir, x0-1);
// __NR_bdflush 134
@@ -556,7 +555,7 @@ int main(void)
//SY(__NR_sysfs);
- // __NR_personality 136
- //GO(__NR_personality, ".s .m");
- //SY(__NR_personality);
+ // __NR_personality 136 --> sys_personality()
+ GO(__NR_personality, "1s 0m");
+ SY(__NR_personality, x0);
// __NR_afs_syscall 137 --> sys_ni_syscall()
@@ -600,7 +599,7 @@ int main(void)
//SY(__NR_writev);
- // __NR_getsid 147
- //GO(__NR_getsid, ".s .m");
- //SY(__NR_getsid);
+ // __NR_getsid 147 --> sys_getsid()
+ GO(__NR_getsid, "1s 0m");
+ SY(__NR_getsid, x0);
// __NR_fdatasync 148 --> sys_fdatasync()
@@ -628,19 +627,19 @@ int main(void)
SY(__NR_munlockall);
- // __NR_sched_setparam 154
- //GO(__NR_sched_setparam, ".s .m");
- //SY(__NR_sched_setparam);
+ // __NR_sched_setparam 154 --> sys_sched_setparam()
+ GO(__NR_sched_setparam, "2s 1m");
+ SY(__NR_sched_setparam, x0, x0);
- // __NR_sched_getparam 155
- //GO(__NR_sched_getparam, ".s .m");
- //SY(__NR_sched_getparam);
+ // __NR_sched_getparam 155 --> sys_sched_getparam()
+ GO(__NR_sched_getparam, "2s 1m");
+ SY(__NR_sched_getparam, x0, x0);
- // __NR_sched_setscheduler 156
- //GO(__NR_sched_setscheduler, ".s .m");
- //SY(__NR_sched_setscheduler);
+ // __NR_sched_setscheduler 156 --> sys_sched_setscheduler()
+ GO(__NR_sched_setscheduler, "3s 1m");
+ SY(__NR_sched_setscheduler, x0, x0, x0+1);
- // __NR_sched_getscheduler 157
- //GO(__NR_sched_getscheduler, ".s .m");
- //SY(__NR_sched_getscheduler);
+ // __NR_sched_getscheduler 157 --> sys_sched_getscheduler()
+ GO(__NR_sched_getscheduler, "1s 0m");
+ SY(__NR_sched_getscheduler, x0);
// __NR_sched_yield 158
@@ -648,19 +647,18 @@ int main(void)
//SY(__NR_sched_yield);
- // __NR_sched_get_priority_max 159
- //GO(__NR_sched_get_priority_max, ".s .m");
- //SY(__NR_sched_get_priority_max);
+ // __NR_sched_get_priority_max 159 --> sys_sched_get_priority_min()
+ GO(__NR_sched_get_priority_max, "1s 0m");
+ SY(__NR_sched_get_priority_max, x0);
- // __NR_sched_get_priority_min 160
- //GO(__NR_sched_get_priority_min, ".s .m");
- //SY(__NR_sched_get_priority_min);
+ // __NR_sched_get_priority_min 160 --> sys_sched_get_priority_min()
+ GO(__NR_sched_get_priority_min, "1s 0m");
+ SY(__NR_sched_get_priority_min, x0);
// __NR_sched_rr_get_interval 161
- //GO(__NR_sched_rr_get_interval, ".s .m");
- //SY(__NR_sched_rr_get_interval);
+ // (Not yet handled by Valgrind)
- // __NR_nanosleep 162
- //GO(__NR_nanosleep, ".s .m");
- //SY(__NR_nanosleep);
+ // __NR_nanosleep 162 --> sys_nanosleep()
+ GO(__NR_nanosleep, "2s 2m");
+ SY(__NR_nanosleep, x0, x0+1);
// __NR_mremap 163
@@ -748,11 +746,11 @@ int main(void)
//SY(__NR_getcwd);
- // __NR_capget 184
- //GO(__NR_capget, ".s .m");
- //SY(__NR_capget);
+ // __NR_capget 184 --> sys_capget()
+ GO(__NR_capget, "2s 2m");
+ SY(__NR_capget, x0, x0);
- // __NR_capset 185
- //GO(__NR_capset, ".s .m");
- //SY(__NR_capset);
+ // __NR_capset 185 --> sys_capset()
+ GO(__NR_capset, "2s 2m");
+ SY(__NR_capset, x0, x0);
// __NR_sigaltstack 186
@@ -909,6 +907,5 @@ int main(void)
// __NR_gettid 224
- //GO(__NR_gettid, ".s .m");
- //SY(__NR_gettid);
+ // (Not yet handled by Valgrind)
// __NR_readahead 225
@@ -965,6 +962,5 @@ int main(void)
// __NR_tkill 238
- //GO(__NR_tkill, ".s .m");
- //SY(__NR_tkill);
+ // (Not yet handled by Valgrind)
// __NR_sendfile64 239
@@ -976,11 +972,11 @@ int main(void)
//SY(__NR_futex);
- // __NR_sched_setaffinity 241
- //GO(__NR_sched_setaffinity, ".s .m");
- //SY(__NR_sched_setaffinity);
+ // __NR_sched_setaffinity 241 --> sched_setaffinity()
+ GO(__NR_sched_setaffinity, "3s 1m");
+ SY(__NR_sched_setaffinity, x0, x0+1, x0);
- // __NR_sched_getaffinity 242
- //GO(__NR_sched_getaffinity, ".s .m");
- //SY(__NR_sched_getaffinity);
+ // __NR_sched_getaffinity 242 --> sched_getaffinity()
+ GO(__NR_sched_getaffinity, "3s 1m");
+ SY(__NR_sched_getaffinity, x0, x0+1, x0);
// __NR_set_thread_area 243
@@ -1043,7 +1039,7 @@ int main(void)
//SY(__NR_remap_file_pages);
- // __NR_set_tid_address 258
- //GO(__NR_set_tid_address, ".s .m");
- //SY(__NR_set_tid_address);
+ // __NR_set_tid_address 258 --> sys_set_tid_address()
+ GO(__NR_set_tid_address, "1s 0m");
+ SY(__NR_set_tid_address, x0);
// __NR_timer_create 259
@@ -1092,6 +1088,5 @@ int main(void)
// __NR_tgkill 270
- //GO(__NR_tgkill, ".s .m");
- //SY(__NR_tgkill);
+ // (Not yet handled by Valgrind)
// __NR_utimes 271
--- valgrind/memcheck/tests/scalar.stderr.exp #1.28:1.29
@@ -1243,4 +1243,53 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+104: __NR_setitimer 3s 2m
+-----------------------------------------------------
+
+Syscall param setitimer(which) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param setitimer(value) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param setitimer(ovalue) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param setitimer(value) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param setitimer(ovalue) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+105: __NR_getitimer 2s 1m
+-----------------------------------------------------
+
+Syscall param getitimer(which) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param getitimer(value) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param getitimer(value) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
106: __NR_stat 2s 2m
-----------------------------------------------------
@@ -1472,4 +1521,57 @@
-----------------------------------------------------
-----------------------------------------------------
+131: __NR_quotactl 4s 1m
+-----------------------------------------------------
+
+Syscall param quotactl(cmd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param quotactl(special) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param quotactl(id) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param quotactl(addr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param quotactl(special) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+132: __NR_getpgid 1s 0m
+-----------------------------------------------------
+
+Syscall param getpgid(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+133: __NR_fchdir 1s 0m
+-----------------------------------------------------
+
+Syscall param fchdir(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+136: __NR_personality 1s 0m
+-----------------------------------------------------
+
+Syscall param personality(persona) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
137: __NR_afs_syscall 0e
-----------------------------------------------------
@@ -1598,4 +1700,12 @@
by 0x........: ...
-----------------------------------------------------
+147: __NR_getsid 1s 0m
+-----------------------------------------------------
+
+Syscall param getsid(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
148: __NR_fdatasync 1s 0m
-----------------------------------------------------
@@ -1643,4 +1753,115 @@
-----------------------------------------------------
-----------------------------------------------------
+154: __NR_sched_setparam 2s 1m
+-----------------------------------------------------
+
+Syscall param sched_setparam(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setparam(p) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setparam(p) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+155: __NR_sched_getparam 2s 1m
+-----------------------------------------------------
+
+Syscall param sched_getparam(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_getparam(p) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_getparam(p) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+156:__NR_sched_setscheduler 3s 1m
+-----------------------------------------------------
+
+Syscall param sched_setscheduler(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setscheduler(policy) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setscheduler(p) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setscheduler(p) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+157:__NR_sched_getscheduler 1s 0m
+-----------------------------------------------------
+
+Syscall param sched_getscheduler(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+159:__NR_sched_get_priority_max 1s 0m
+-----------------------------------------------------
+
+Syscall param sched_get_priority_max(policy) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+160:__NR_sched_get_priority_min 1s 0m
+-----------------------------------------------------
+
+Syscall param sched_get_priority_min(policy) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+162: __NR_nanosleep 2s 2m
+-----------------------------------------------------
+
+Syscall param nanosleep(req) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param nanosleep(rem) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param nanosleep(req) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param nanosleep(rem) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
164: __NR_setresuid 3s 0m
-----------------------------------------------------
@@ -1813,4 +2034,54 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+184: __NR_capget 2s 2m
+-----------------------------------------------------
+
+Syscall param capget(header) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param capget(data) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param capget(header) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param capget(data) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+185: __NR_capset 2s 2m
+-----------------------------------------------------
+
+Syscall param capset(header) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param capset(data) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param capset(header) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param capset(data) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
191: __NR_ugetrlimit 2s 1m
-----------------------------------------------------
@@ -2685,4 +2956,52 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+241:__NR_sched_setaffinity 3s 1m
+-----------------------------------------------------
+
+Syscall param sched_setaffinity(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setaffinity(len) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setaffinity(mask) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_setaffinity(mask) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+242:__NR_sched_getaffinity 3s 1m
+-----------------------------------------------------
+
+Syscall param sched_getaffinity(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_getaffinity(len) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_getaffinity(mask) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param sched_getaffinity(mask) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
251: 251 0e
-----------------------------------------------------
@@ -2717,4 +3036,12 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+258:__NR_set_tid_address 1s 0m
+-----------------------------------------------------
+
+Syscall param set_tid_address(tidptr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
268: __NR_statfs64 3s 2m
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 12:57:43
|
CVS commit by nethercote:
converted mmap and mmap2
M +32 -26 coregrind/vg_syscalls.c 1.203
M +1 -1 coregrind/x86-linux/core_platform.h 1.12
M +9 -6 memcheck/tests/scalar.c 1.34
M +36 -0 memcheck/tests/scalar.stderr.exp 1.28
--- valgrind/coregrind/vg_syscalls.c #1.202:1.203
@@ -4464,15 +4464,16 @@ PREx(sys_mkdir, MayBlock)
}
-PRE(mmap2)
+PREx(sys_mmap2, 0)
{
- // Exactly like __NR_mmap except:
+ // Exactly like old_mmap() except:
// - all 6 args are passed in regs, rather than in a memory-block.
// - the file offset is specified in pagesize units rather than bytes,
// so that it can be used for files bigger than 2^32 bytes.
- /* void* mmap2(void *start, size_t length, int prot,
- int flags, int fd, off_t offset);
- */
- PRINT("mmap2 ( %p, %llu, %d, %d, %d, %d )",
+ PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
arg1, (ULong)arg2, arg3, arg4, arg5, arg6 );
+ PRE_REG_READ6(long, "mmap2",
+ unsigned long, start, unsigned long, length,
+ unsigned long, prot, unsigned long, flags,
+ unsigned long, fd, unsigned long, offset);
if (arg4 & VKI_MAP_FIXED) {
@@ -4488,27 +4489,32 @@ PRE(mmap2)
}
-POST(mmap2)
+POSTx(sys_mmap2)
{
vg_assert(valid_client_addr(res, arg2, tid, "mmap2"));
- mmap_segment( (Addr)res, arg2, arg3, arg4, arg5, arg6 * (ULong)VKI_PAGE_SIZE );
+ mmap_segment( (Addr)res, arg2, arg3, arg4, arg5,
+ arg6 * (ULong)VKI_PAGE_SIZE );
}
-PRE(mmap)
+PREx(old_mmap, Special)
{
- /* void* mmap(void *start, size_t length, int prot,
- int flags, int fd, off_t offset);
- */
-
+ /* struct mmap_arg_struct {
+ unsigned long addr;
+ unsigned long len;
+ unsigned long prot;
+ unsigned long flags;
+ unsigned long fd;
+ unsigned long offset;
+ }; */
UInt a1, a2, a3, a4, a5, a6;
- vg_assert(tid = tst->tid);
+ PRE_REG_READ1(long, "old_mmap", struct mmap_arg_struct *, args);
PLATFORM_GET_MMAP_ARGS(tst, a1, a2, a3, a4, a5, a6);
- PRINT("mmap ( %p, %llu, %d, %d, %d, %d )",
+ PRINT("old_mmap ( %p, %llu, %d, %d, %d, %d )",
a1, (ULong)a2, a3, a4, a5, a6 );
if (a4 & VKI_MAP_FIXED) {
- if (!valid_client_addr(a1, a2, tid, "mmap")) {
- PRINT("mmap failing: %p-%p\n", a1, a1+a2);
+ if (!valid_client_addr(a1, a2, tid, "old_mmap")) {
+ PRINT("old_mmap failing: %p-%p\n", a1, a1+a2);
set_result( -VKI_ENOMEM );
}
@@ -4525,5 +4531,5 @@ PRE(mmap)
if (!VG_(is_kerror)(res)) {
- vg_assert(valid_client_addr(res, a2, tid, "mmap"));
+ vg_assert(valid_client_addr(res, a2, tid, "old_mmap"));
mmap_segment( (Addr)res, a2, a3, a4, a5, a6 );
}
@@ -4884,5 +4890,5 @@ PREx(old_select, MayBlock)
*/
PRE_REG_READ1(long, "old_select", struct sel_arg_struct *, args);
- PRE_MEM_READ( "old_select(args)", arg1, 5*sizeof(UInt) );
+ PRE_MEM_READ( "old_select(args)", arg1, 5*sizeof(UWord) );
{
@@ -6420,5 +6426,5 @@ static const struct sys_info sys_info[]
// (__NR_readdir, old_readdir), // 89 () L -- superseded
- SYSB_(__NR_mmap, old_mmap, Special), // 90 old_mmap
+ SYSX_(__NR_mmap, old_mmap), // 90 (x86) (P but not...)
SYSXY(__NR_munmap, sys_munmap), // 91 * P
SYSX_(__NR_truncate, sys_truncate), // 92 * P
@@ -6545,5 +6551,5 @@ static const struct sys_info sys_info[]
// (__NR_vfork, sys_vfork), // 190 -- Valgrind avoids
SYSXY(__NR_ugetrlimit, sys_getrlimit), // 191 * (?)
- SYSBA(__NR_mmap2, sys_mmap2, 0), // 192
+ SYSXY(__NR_mmap2, sys_mmap2), // 192 (x86?) P?
SYSX_(__NR_truncate64, sys_truncate64), // 193 %% (P?)
SYSX_(__NR_ftruncate64, sys_ftruncate64), // 194 %% (P?)
--- valgrind/coregrind/x86-linux/core_platform.h #1.11:1.12
@@ -116,5 +116,5 @@ extern Addr VG_(do_useseg) ( UInt seg_se
#define PLATFORM_GET_MMAP_ARGS(tst, a1, a2, a3, a4, a5, a6) do {\
UInt *arg_block = (UInt*)PLATFORM_SYSCALL_ARG1(tst->arch); \
- PRE_MEM_READ( "mmap(args)", arg1, 6*sizeof(UWord) ); \
+ PRE_MEM_READ( "old_mmap(args)", arg1, 6*sizeof(UWord) ); \
a1 = arg_block[0]; \
a2 = arg_block[1]; \
--- valgrind/memcheck/tests/scalar.c #1.33:1.34
@@ -361,7 +361,10 @@ int main(void)
// (superseded, not handled by Valgrind)
- // __NR_mmap 90
- //GO(__NR_mmap, ".s .m");
- //SY(__NR_mmap);
+ // __NR_mmap 90 --> old_mmap()
+ {
+ long args[6] = { x0, x0, x0, x0, x0-1, x0 };
+ GO(__NR_mmap, "1s 0m");
+ SY(__NR_mmap, args+x0);
+ }
// __NR_munmap 91 --> sys_munmap()
@@ -777,7 +780,7 @@ int main(void)
SY(__NR_ugetrlimit, x0, x0);
- // __NR_mmap2 192
- //GO(__NR_mmap2, ".s .m");
- //SY(__NR_mmap2);
+ // __NR_mmap2 192 --> sys_mmap()
+ GO(__NR_mmap2, "5s 0m");
+ SY(__NR_mmap2, x0, x0, x0, x0, x0-1, x0);
// __NR_truncate64 193 --> sys_truncate64()
--- valgrind/memcheck/tests/scalar.stderr.exp #1.27:1.28
@@ -1042,4 +1042,12 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 90: __NR_mmap 1s 0m
+-----------------------------------------------------
+
+Syscall param old_mmap(args) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
91: __NR_munmap 2s 0m
-----------------------------------------------------
@@ -1824,4 +1832,32 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+192: __NR_mmap2 5s 0m
+-----------------------------------------------------
+
+Syscall param mmap2(start) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mmap2(length) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mmap2(prot) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mmap2(flags) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mmap2(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
193: __NR_truncate64 3s 1m
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-15 12:29:01
|
CVS commit by nethercote:
Converted a few more, including clone() which I'm not at all sure about, and
ipc() which is done too simplistically.
M +32 -17 coregrind/vg_syscalls.c 1.202
M +2 -0 include/linux/vki.h 1.7
M +17 -12 memcheck/tests/scalar.c 1.33
M +94 -0 memcheck/tests/scalar.stderr.exp 1.27
--- valgrind/coregrind/vg_syscalls.c #1.201:1.202
@@ -1292,7 +1292,8 @@ PREx(sys_vhangup, 0)
}
-PRE(iopl)
+PREx(sys_iopl, 0)
{
- PRINT("iopl ( %d )", arg1);
+ PRINT("sys_iopl ( %d )", arg1);
+ PRE_REG_READ1(long, "iopl", unsigned long, level);
}
@@ -2277,7 +2278,13 @@ POSTx(sys_fork)
}
-PRE(clone)
+// XXX: x86-specific
+PREx(sys_clone, Special)
{
- PRINT("clone ( %d, %p, %p, %p, %p )",arg1,arg2,arg3,arg4,arg5);
+ PRINT("sys_clone ( %d, %p, %p, %p, %p )",arg1,arg2,arg3,arg4,arg5);
+ // XXX: really not sure about the last two args... if they are really
+ // there, we should do PRE_MEM_READs for both of them...
+ PRE_REG_READ4(int, "clone",
+ unsigned long, flags, void *, child_stack,
+ int *, parent_tidptr, int *, child_tidptr);
if (arg2 == 0 &&
@@ -2291,5 +2298,5 @@ PRE(clone)
VG_(unimplemented)
("clone(): not supported by Valgrind.\n "
- "We do now support programs linked against\n "
+ "We do support programs linked against\n "
"libpthread.so, though. Re-run with -v and ensure that\n "
"you are picking up Valgrind's implementation of libpthread.so.");
@@ -2645,7 +2652,14 @@ PREx(sys_getuid, 0)
}
-PRE(ipc)
+// XXX: x86-specific
+// XXX: should use the constants here (eg. SHMAT), not the numbers directly!
+PREx(sys_ipc, 0)
{
- PRINT("ipc ( %d, %d, %d, %d, %p, %d )", arg1,arg2,arg3,arg4,arg5,arg6);
+ PRINT("sys_ipc ( %d, %d, %d, %d, %p, %d )", arg1,arg2,arg3,arg4,arg5,arg6);
+ // XXX: this is simplistic -- some args are not used in all circumstances.
+ PRE_REG_READ6(int, "ipc",
+ vki_uint, call, int, first, int, second, int, third,
+ void *, ptr, long, fifth)
+
switch (arg1 /* call */) {
case 1: /* IPCOP_semop */
@@ -2902,5 +2916,5 @@ PRE(ipc)
}
-POST(ipc)
+POSTx(sys_ipc)
{
switch (arg1 /* call */) {
@@ -5570,11 +5584,12 @@ POSTx(sys_waitpid)
}
-PRE(wait4)
+PREx(sys_wait4, MayBlock)
{
- /* pid_t wait4(pid_t pid, int *status, int options,
- struct rusage *rusage) */
- PRINT("wait4 ( %d, %p, %d, %p )", arg1,arg2,arg3,arg4);
+ PRINT("sys_wait4 ( %d, %p, %d, %p )", arg1,arg2,arg3,arg4);
arg3 &= ~(__VKI_WCLONE | __VKI_WALL);
+ PRE_REG_READ4(long, "wait4",
+ vki_pid_t, pid, unsigned int *, status, int, options,
+ struct rusage *, rusage);
if (arg2 != (Addr)NULL)
PRE_MEM_WRITE( "wait4(status)", arg2, sizeof(int) );
@@ -5583,5 +5598,5 @@ PRE(wait4)
}
-POST(wait4)
+POSTx(sys_wait4)
{
if (arg2 != (Addr)NULL)
@@ -6429,17 +6444,17 @@ static const struct sys_info sys_info[]
// (__NR_olduname, sys_uname), // 109 (?) L -- obsolete
- SYSB_(__NR_iopl, sys_iopl, 0), // 110
+ SYSX_(__NR_iopl, sys_iopl), // 110 (x86/amd64) L
SYSX_(__NR_vhangup, sys_vhangup), // 111 * L
SYSX_(__NR_idle, sys_ni_syscall), // 112 * P -- unimplemented
// (__NR_vm86old, sys_vm86old), // 113 (x86) L
- SYSBA(__NR_wait4, sys_wait4, MayBlock), // 114 *
+ SYSXY(__NR_wait4, sys_wait4), // 114 * P
// (__NR_swapoff, sys_swapoff), // 115 * L
SYSXY(__NR_sysinfo, sys_sysinfo), // 116 * L
- SYSBA(__NR_ipc, sys_ipc, 0), // 117
+ SYSXY(__NR_ipc, sys_ipc), // 117 (x86) L
SYSX_(__NR_fsync, sys_fsync), // 118 * L
// (__NR_sigreturn, sys_sigreturn), // 119 () L
- SYSB_(__NR_clone, sys_clone, Special), // 120 (very non-gen) L
+ SYSX_(__NR_clone, sys_clone), // 120 (x86) L
// (__NR_setdomainname, sys_setdomainname),// 121 * (non-P?)
SYSXY(__NR_uname, sys_newuname), // 122 * P
--- valgrind/include/linux/vki.h #1.6:1.7
@@ -128,4 +128,6 @@ typedef __vki_kernel_clock_t vki_clock_t
typedef __vki_kernel_caddr_t vki_caddr_t;
+typedef unsigned int vki_uint;
+
//----------------------------------------------------------------------
// Now the rest of the arch-specific stuff
--- valgrind/memcheck/tests/scalar.c #1.32:1.33
@@ -9,6 +9,4 @@ int main(void)
// All __NR_xxx numbers are taken from x86
- // 0--49
-
// __NR_restart_syscall 1 XXX ???
// (see below)
@@ -443,7 +441,7 @@ int main(void)
// (obsolete, not handled by Valgrind)
- // __NR_iopl 110
- //GO(__NR_iopl, ".s .m");
- //SY(__NR_iopl);
+ // __NR_iopl 110 --> sys_iopl()
+ GO(__NR_iopl, "1s 0m");
+ SY(__NR_iopl, x0);
// __NR_vhangup 111 --> sys_vhangup()
@@ -459,7 +457,7 @@ int main(void)
//SY(__NR_vm86old);
- // __NR_wait4 114
- //GO(__NR_wait4, ".s .m");
- //SY(__NR_wait4);
+ // __NR_wait4 114 --> sys_wait4()
+ GO(__NR_wait4, "4s 2m");
+ SY(__NR_wait4, x0, x0+1, x0, x0+1);
// __NR_swapoff 115
@@ -472,6 +470,10 @@ int main(void)
// __NR_ipc 117
- //GO(__NR_ipc, ".s .m");
- //SY(__NR_ipc);
+ // XXX: This is simplistic -- doesn't treat any of the sub-ops.
+ // XXX: Also, should be 6 scalar errors, except glibc's syscall() doesn't
+ // use the 6th one!
+ #include <asm/ipc.h>
+ GO(__NR_ipc, "5s 0m");
+ SY(__NR_ipc, x0+4, x0, x0, x0, x0, x0);
// __NR_fsync 118 --> sys_fsync()
@@ -484,6 +486,9 @@ int main(void)
// __NR_clone 120
- //GO(__NR_clone, ".s .m");
- //SY(__NR_clone);
+ #include <sched.h>
+ #include <signal.h>
+ // XXX: should really be "4s 2m"? Not sure... (see PRE(sys_clone))
+ GO(__NR_clone, "4s 0m");
+ SY(__NR_clone, x0|CLONE_PARENT_SETTID|SIGCHLD, x0, x0, x0);
// __NR_setdomainname 121
--- valgrind/memcheck/tests/scalar.stderr.exp #1.26:1.27
@@ -1304,4 +1304,12 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+110: __NR_iopl 1s 0m
+-----------------------------------------------------
+
+Syscall param iopl(level) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
111: __NR_vhangup 0e
-----------------------------------------------------
@@ -1310,4 +1318,39 @@
-----------------------------------------------------
-----------------------------------------------------
+114: __NR_wait4 4s 2m
+-----------------------------------------------------
+
+Syscall param wait4(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param wait4(status) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param wait4(options) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param wait4(rusage) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param wait4(status) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param wait4(rusage) points to unaddressable byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
116: __NR_sysinfo 1s 1m
-----------------------------------------------------
@@ -1324,4 +1367,32 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+117: __NR_ipc 5s 0m
+-----------------------------------------------------
+
+Syscall param ipc(call) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param ipc(first) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param ipc(second) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param ipc(third) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param ipc(ptr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
118: __NR_fsync 1s 0m
-----------------------------------------------------
@@ -1332,4 +1403,27 @@
by 0x........: ...
-----------------------------------------------------
+120: __NR_clone 4s 0m
+-----------------------------------------------------
+
+Syscall param clone(flags) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param clone(child_stack) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param clone(parent_tidptr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
122: __NR_uname 1s 1m
-----------------------------------------------------
|
|
From: Tom H. <th...@cy...> - 2004-11-15 10:02:56
|
CVS commit by thughes:
Add some missing system call arguments to the scalar test.
M +2 -2 scalar.c 1.32
--- valgrind/memcheck/tests/scalar.c #1.31:1.32
@@ -349,5 +349,5 @@ int main(void)
// __NR_readlink 85
GO(__NR_readlink, "3s 2m");
- SY(__NR_readlink);
+ SY(__NR_readlink, x0+1, x0+1, x0+1);
// __NR_uselib 86
@@ -614,5 +614,5 @@ int main(void)
// __NR_mlockall 152 --> sys_mlockall()
GO(__NR_mlockall, "2s 0m");
- SY(__NR_mlockall);
+ SY(__NR_mlockall, x0, x0);
// __NR_munlockall 153 --> sys_munlockall()
|
|
From: Tom H. <th...@cy...> - 2004-11-15 09:38:29
|
CVS commit by thughes:
Remove trailing space after \ continuation marker.
M +1 -1 Makefile.am 1.61
--- valgrind/memcheck/tests/Makefile.am #1.60:1.61
@@ -87,5 +87,5 @@
null_socket overlap \
realloc1 realloc2 realloc3 \
- scalar scalar_fork scalar_supp scalar_vfork \
+ scalar scalar_fork scalar_supp scalar_vfork \
sigaltstack signal2 \
str_tester supp1 supp2 suppfree \
|
|
From: Tom H. <th...@cy...> - 2004-11-15 09:27:28
|
CVS commit by thughes:
Add comments documenting the difference between the sigsuspend
function in the C library and the sigsuspend and rt_sigsuspend
system calls.
M +15 -0 vg_syscalls.c 1.201
--- valgrind/coregrind/vg_syscalls.c #1.200:1.201
@@ -5713,4 +5713,13 @@ PREx(sys_pause, MayBlock)
PREx(sys_sigsuspend, MayBlock)
{
+ /* The C library interface to sigsuspend just takes a pointer to
+ a signal mask but this system call has three arguments - the first
+ two don't appear to be used by the kernel and are always passed as
+ zero by glibc and the third is the first word of the signal mask
+ so only 32 signals are supported.
+
+ In fact glibc normally uses rt_sigsuspend if it is available as
+ that takes a pointer to the signal mask so supports more signals.
+ */
PRINT("sys_sigsuspend ( %d, %d, %d )", arg1,arg2,arg3 );
PRE_REG_READ3(int, "sigsuspend",
@@ -5722,4 +5731,10 @@ PREx(sys_sigsuspend, MayBlock)
PREx(sys_rt_sigsuspend, MayBlock)
{
+ /* The C library interface to sigsuspend just takes a pointer to
+ a signal mask but this system call has two arguments - a pointer
+ to the mask and the number of bytes used by it. The kernel insists
+ on the size being equal to sizeof(sigset_t) however and will just
+ return EINVAL if it isn't.
+ */
PRINT("sys_rt_sigsuspend ( %p, %d )", arg1,arg2 );
PRE_REG_READ2(int, "rt_sigsuspend", vki_sigset_t *, mask, vki_size_t, size)
|
|
From: <js...@ac...> - 2004-11-15 03:57:00
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2004-11-15 03:50:00 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: (cpu_test failed, skipping) insn_sse: valgrind ./insn_sse insn_sse2: (cpu_test failed, skipping) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 183 tests, 2 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_fcntl (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2004-11-15 03:25:26
|
Nightly build on dunsmere ( Fedora Core 3 ) started at 2004-11-15 03:20:03 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 188 tests, 13 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) make: *** [regtest] Error 1 |