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: Nicholas N. <nj...@ca...> - 2004-11-11 19:43:53
|
CVS commit by nethercote:
Now handling non-existent syscalls appropriately -- just returning ENOSYS
rather than giving the warning about the syscall being missing. (Nb: this only
applies to syscall numbers for which the kernel has no corresponding syscall;
Valgrind will still give that warning if new syscalls are added to the kernel.)
M +38 -27 coregrind/vg_syscalls.c 1.177
M +89 -21 memcheck/tests/scalar.c 1.9
M +53 -5 memcheck/tests/scalar.stderr.exp 1.8
--- valgrind/coregrind/vg_syscalls.c #1.176:1.177
@@ -1112,4 +1112,11 @@ PREx(sys_exit, Special)
}
+PREx(sys_ni_syscall, Special)
+{
+ PRINT("non-existent syscall! (ni_syscall)");
+ PRE_REG_READ0(long, "ni_syscall");
+ set_result( -VKI_ENOSYS );
+}
+
PRE(ptrace)
{
@@ -5793,11 +5800,12 @@ static const struct sys_info bad_sys = {
// XXX: temporary: I've started labelled each entry with the target of its
// __NR_foo-->sys_foo() mapping, and the __NR_foo number (for x86), and
-// marked those that are generic (ie. present in
-// linux-2.6.8.1/include/linux/syscalls.h) with a '*', and non-generic ones
-// with an indication of which architecture they are specific to.
-// Those with "##" are generic, but within a "#ifdef CONFIG_UID16".
-// Those with "%%" are generic, but within a "#if BITS_PER_LONG == 32"
-
-// Those with 'P' are generic/POSIX. Those with 'L' are Linux-only.
+// properties of the sys_foo() function:
+// '*' ones are Linux-generic (ie. present in
+// linux-2.6.8.1/include/linux/syscalls.h); non-generic ones have an
+// indication of which architecture they are specific to.
+// "##" ones are Linux-generic, but within a "#ifdef CONFIG_UID16".
+// "%%" ones are Linux-generic, but within a "#if BITS_PER_LONG == 32"
+// 'P' ones are POSIX-generic, according to man pages.
+// 'L' ones are Linux-specific, according to man pages.
// XXX: this does duplicate the vki_unistd.h file somewhat -- could make
@@ -5827,5 +5835,5 @@ static const struct sys_info sys_info[]
SYSX_(__NR_chmod, sys_chmod), // 15 * P
// lchown sys_lchown16 ## // 16
- // break sys_ni_syscall // 17
+ SYSX_(__NR_break, sys_ni_syscall), // 17 * P
// oldstat sys_stat // 18 *
SYSX_(__NR_lseek, sys_lseek), // 19 * P
@@ -5844,9 +5852,9 @@ static const struct sys_info sys_info[]
SYSB_(utime, MayBlock), // 30 sys_utime *
- // stty 31 sys_ni_syscall
- // gtty 32 sys_ni_syscall
+ SYSX_(__NR_stty, sys_ni_syscall), // 31 * P
+ SYSX_(__NR_gtty, sys_ni_syscall), // 32 * P
SYSB_(access, 0), // 33 sys_access *
SYSB_(nice, 0), // 34 sys_nice *
- // ftime 35 sys_ni_syscall
+ SYSX_(__NR_ftime, sys_ni_syscall), // 35 * P
SYSX_(__NR_sync, sys_sync), // 36 *
@@ -5859,5 +5867,5 @@ static const struct sys_info sys_info[]
SYSBA(pipe, 0), // 42 sys_pipe
SYSBA(times, 0), // 43 sys_times *
- // prof 44 sys_ni_syscall
+ SYSX_(__NR_prof, sys_ni_syscall), // 44 * P
SYSB_(brk, Special), // 45 sys_brk *
@@ -5870,11 +5878,11 @@ static const struct sys_info sys_info[]
SYSB_(acct, 0), // 51 sys_acct *
SYSX_(__NR_umount2, sys_umount), // 52 * L
- // lock 53 sys_ni_syscall
+ SYSX_(__NR_lock, sys_ni_syscall), // 53 * P
SYSBA(ioctl, MayBlock), // 54 sys_ioctl *
SYSBA(fcntl, 0), // 55 sys_fcntl *
- // mpx 56 sys_ni_syscall
+ SYSX_(__NR_mpx, sys_ni_syscall), // 56 * P
SYSBA(setpgid, 0), // 57 sys_setpgid *
- // ulimit 58 // sys_ni_syscall
+ SYSX_(__NR_ulimit, sys_ni_syscall), // 58 * P
// oldolduname 59 sys_olduname
@@ -5941,5 +5949,5 @@ static const struct sys_info sys_info[]
SYSB_(iopl, 0), // 110 sys_iopl
SYSX_(__NR_vhangup, sys_vhangup), // 111 *
- // idle 112 sys_ni_syscall
+ SYSX_(__NR_idle, sys_ni_syscall), // 112 * P
// vm86old 113 sys_vm86old
SYSBA(wait4, MayBlock), // 114 sys_wait4 *
@@ -5959,10 +5967,10 @@ static const struct sys_info sys_info[]
SYSBA(sigprocmask, SIG_SIM), // 126 sys_sigprocmask *
- // XXX: create_module was removed 2.4-->2.6
- // create_module 127 sys_ni_syscall
+ // Nb: create_module() was removed 2.4-->2.6
+ SYSX_(__NR_create_module, sys_ni_syscall), // 127 * P
SYSB_(init_module, MayBlock), // 128 sys_init_module *
// delete_module 129 sys_delete_module *
- // XXX: get_kernel_syms was removed 2.4-->2.6
- // get_kernel_syms 130 sys_ni_syscall
+ // Nb: get_kernel_syms() was removed 2.4-->2.6
+ SYSX_(__NR_get_kernel_syms, sys_ni_syscall), // 130 * P
SYSB_(quotactl, 0), // 131 sys_quotactl *
@@ -5973,5 +5981,5 @@ static const struct sys_info sys_info[]
SYSB_(personality, 0), // 136 sys_personality *
- // afs_syscall 137 sys_ni_syscall
+ SYSX_(__NR_afs_syscall, sys_ni_syscall), // 137 * P
SYSB_(setfsuid, 0), // 138 sys_setfsuid16 ##
SYSB_(setfsgid, 0), // 139 sys_setfsgid16 ##
@@ -6009,5 +6017,5 @@ static const struct sys_info sys_info[]
SYSBA(getresuid, 0), // 165 sys_getresuid16 ##
// vm86 166 sys_vm86
- // query_module 167 sys_ni_syscall
+ SYSX_(__NR_query_module, sys_ni_syscall), // 167 * P
SYSBA(poll, MayBlock), // 168 sys_poll *
// nfsservctl 169 sys_nfsservctl *
@@ -6079,6 +6087,8 @@ static const struct sys_info sys_info[]
SYSBA(fcntl64, 0), // 221 sys_fcntl64 *
- // 222 reserved for TUX sys_ni_syscall
- /* 223 is unused */ // sys_ni_syscall
+ // Nb: 222 is reserved for TUX (whatever that means --njn)
+ SYSX_(222, sys_ni_syscall), // 222 * P
+ // Nb: 223 is unused
+ SYSX_(223, sys_ni_syscall), // 223 * P
// gettid 224 sys_gettid *
@@ -6114,5 +6124,6 @@ static const struct sys_info sys_info[]
// fadvise64 250 sys_fadvise64 *
- // 251 is empty... // sys_ni_syscall
+ // Nb: 251 is unused
+ SYSX_(251, sys_ni_syscall), // 251 * P
SYSX_(__NR_exit_group, sys_exit_group), // 252 *
SYSBA(lookup_dcookie, 0), // 253 sys_lookup_dcookie *
@@ -6141,5 +6152,5 @@ static const struct sys_info sys_info[]
// fadvise64_64 272 sys_fadvise64_64 *
- // vserver 273 sys_ni_syscall
+ SYSX_(__NR_vserver, sys_ni_syscall), // 273 * P
// mbind 274 sys_mbind
@@ -6153,5 +6164,5 @@ static const struct sys_info sys_info[]
SYSB_(mq_notify, 0), // (mq_open+4) sys_mq_notify *
SYSBA(mq_getsetattr, 0), // (mq_open+5) sys_mq_getsetarr *
- // sys_kexec_load 283 sys_ni_syscall *
+ SYSX_(__NR_sys_kexec_load, sys_ni_syscall), // 283 * P
};
#define MAX_SYS_INFO (sizeof(sys_info)/sizeof(sys_info[0]))
--- valgrind/memcheck/tests/scalar.c #1.8:1.9
@@ -24,5 +24,5 @@ int main(void)
// __NR_write 4 --> sys_write()
- GO(__NR_write, "3S 1m");
+ GO(__NR_write, "3s 1m");
SY(__NR_write, i0, s0, i0+1);
@@ -65,21 +65,25 @@ int main(void)
// __NR_mknod 14 --> sys_mknod()
- GO(__NR_mknod, "3S 1M");
+ GO(__NR_mknod, "3s 1m");
SY(__NR_mknod, s0, i0, i0);
// __NR_chmod 15 --> sys_chmod()
- GO(__NR_chmod, "2S 1M");
+ GO(__NR_chmod, "2s 1m");
SY(__NR_chmod, s0, i0);
// __NR_lchown 16
- // __NR_break 17
+
+ // __NR_break 17 --> sys_ni_syscall()
+ GO(__NR_break, "0e");
+ SY(__NR_break);
+
// __NR_oldstat 18
// __NR_lseek 19 --> sys_lseek()
- GO(__NR_lseek, "3S 0M");
+ GO(__NR_lseek, "3s 0m");
SY(__NR_lseek, i0, i0, i0);
// __NR_getpid 20 --> sys_getpid()
- GO(__NR_getpid, "0S 0M");
+ GO(__NR_getpid, "0s 0m");
SY(__NR_getpid);
@@ -109,9 +113,20 @@ int main(void)
// __NR_utime 30
- // __NR_stty 31
- // __NR_gtty 32
+
+ // __NR_stty 31 --> sys_ni_syscall()
+ GO(__NR_stty, "0e");
+ SY(__NR_stty);
+
+ // __NR_gtty 32 --> sys_ni_syscall()
+ GO(__NR_gtty, "0e");
+ SY(__NR_gtty);
+
// __NR_access 33
+
// __NR_nice 34
- // __NR_ftime 35
+
+ // __NR_ftime 35 --> sys_ni_syscall()
+ GO(__NR_ftime, "0e");
+ SY(__NR_ftime);
// __NR_sync 36 --> sys_sync()
@@ -126,5 +141,9 @@ int main(void)
// __NR_pipe 42
// __NR_times 43
- // __NR_prof 44
+
+ // __NR_prof 44 --> sys_ni_syscall()
+ GO(__NR_prof, "0e");
+ SY(__NR_prof);
+
// __NR_brk 45
// __NR_setgid 46
@@ -150,10 +169,21 @@ int main(void)
SY(__NR_umount2, s0, i0);
- // __NR_lock 53
+ // __NR_lock 53 --> sys_ni_syscall()
+ GO(__NR_lock, "0e");
+ SY(__NR_lock);
+
// __NR_ioctl 54
// __NR_fcntl 55
- // __NR_mpx 56
+
+ // __NR_mpx 56 --> sys_ni_syscall()
+ GO(__NR_mpx, "0e");
+ SY(__NR_mpx);
+
// __NR_setpgid 57
- // __NR_ulimit 58
+
+ // __NR_ulimit 58 --> sys_ni_syscall()
+ GO(__NR_ulimit, "0e");
+ SY(__NR_ulimit);
+
// __NR_oldolduname 59
// __NR_umask 60
@@ -223,5 +253,8 @@ int main(void)
SY(__NR_vhangup);
- // __NR_idle 112
+ // __NR_idle 112 --> sys_ni_syscall()
+ GO(__NR_idle, "0e");
+ SY(__NR_idle);
+
// __NR_vm86old 113
// __NR_wait4 114
@@ -238,8 +271,16 @@ int main(void)
// __NR_mprotect 125
// __NR_sigprocmask 126
- // __NR_create_module 127
+
+ // __NR_create_module 127 --> sys_ni_syscall()
+ GO(__NR_create_module, "0e");
+ SY(__NR_create_module);
+
// __NR_init_module 128
// __NR_delete_module 129
- // __NR_get_kernel_syms 130
+
+ // __NR_get_kernel_syms 130 --> sys_ni_syscall()
+ GO(__NR_get_kernel_syms, "0e");
+ SY(__NR_get_kernel_syms);
+
// __NR_quotactl 131
// __NR_getpgid 132
@@ -248,5 +289,9 @@ int main(void)
// __NR_sysfs 135
// __NR_personality 136
- // __NR_afs_syscall 137
+
+ // __NR_afs_syscall 137 --> sys_ni_syscall()
+ GO(__NR_afs_syscall, "0e");
+ SY(__NR_afs_syscall);
+
// __NR_setfsuid 138
// __NR_setfsgid 139
@@ -282,5 +327,9 @@ int main(void)
// __NR_getresuid 165
// __NR_vm86 166
- // __NR_query_module 167
+
+ // __NR_query_module 167 --> sys_ni_syscall()
+ GO(__NR_query_module, "0e");
+ SY(__NR_query_module);
+
// __NR_poll 168
// __NR_nfsservctl 169
@@ -354,5 +403,13 @@ int main(void)
// __NR_getdents64 220
// __NR_fcntl64 221
-/* 223 is unused */
+
+ // 222 --> sys_ni_syscall()
+ GO(222, "0e");
+ SY(222);
+
+ // 223 --> sys_ni_syscall()
+ GO(223, "0e");
+ SY(223);
+
// __NR_gettid 224
// __NR_readahead 225
@@ -383,4 +440,8 @@ int main(void)
// __NR_fadvise64 250
+ // 251 --> sys_ni_syscall()
+ GO(251, "0e");
+ SY(251);
+
// __NR_exit_group 252
// __NR_lookup_dcookie 253
@@ -404,5 +465,9 @@ int main(void)
// __NR_utimes 271
// __NR_fadvise64_64 272
- // __NR_vserver 273
+
+ // __NR_vserver 273 --> sys_ni_syscall()
+ //GO(__NR_vserver, "0e");
+ //SY(__NR_vserver);
+
// __NR_mbind 274
// __NR_get_mempolicy 275
@@ -414,5 +479,8 @@ int main(void)
// __NR_mq_notify (__NR_mq_open+4)
// __NR_mq_getsetattr (__NR_mq_open+5)
- // __NR_sys_kexec_load 283
+
+ // __NR_sys_kexec_load 283 --> sys_ni_syscall()
+ //GO(__NR_sys_kexec_load, "0e");
+ //SY(__NR_sys_kexec_load);
GO(9999, "1e");
--- valgrind/memcheck/tests/scalar.stderr.exp #1.7:1.8
@@ -22,5 +22,5 @@
by 0x........: ...
-----------------------------------------------------
- 4: __NR_write 3S 1m
+ 4: __NR_write 3s 1m
-----------------------------------------------------
@@ -192,5 +192,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 14: __NR_mknod 3S 1M
+ 14: __NR_mknod 3s 1m
-----------------------------------------------------
@@ -216,5 +216,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 15: __NR_chmod 2S 1M
+ 15: __NR_chmod 2s 1m
-----------------------------------------------------
@@ -235,5 +235,8 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 19: __NR_lseek 3S 0M
+ 17: __NR_break 0e
+-----------------------------------------------------
+-----------------------------------------------------
+ 19: __NR_lseek 3s 0m
-----------------------------------------------------
@@ -253,5 +256,5 @@
by 0x........: ...
-----------------------------------------------------
- 20: __NR_getpid 0S 0M
+ 20: __NR_getpid 0s 0m
-----------------------------------------------------
-----------------------------------------------------
@@ -330,7 +333,19 @@
-----------------------------------------------------
-----------------------------------------------------
+ 31: __NR_stty 0e
+-----------------------------------------------------
+-----------------------------------------------------
+ 32: __NR_gtty 0e
+-----------------------------------------------------
+-----------------------------------------------------
+ 35: __NR_ftime 0e
+-----------------------------------------------------
+-----------------------------------------------------
36: __NR_sync 0e
-----------------------------------------------------
-----------------------------------------------------
+ 44: __NR_prof 0e
+-----------------------------------------------------
+-----------------------------------------------------
47: __NR_getgid 0e
-----------------------------------------------------
@@ -361,4 +376,13 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+ 53: __NR_lock 0e
+-----------------------------------------------------
+-----------------------------------------------------
+ 56: __NR_mpx 0e
+-----------------------------------------------------
+-----------------------------------------------------
+ 58: __NR_ulimit 0e
+-----------------------------------------------------
+-----------------------------------------------------
64: __NR_getppid 0e
-----------------------------------------------------
@@ -373,7 +397,22 @@
-----------------------------------------------------
-----------------------------------------------------
+112: __NR_idle 0e
+-----------------------------------------------------
+-----------------------------------------------------
+127: __NR_create_module 0e
+-----------------------------------------------------
+-----------------------------------------------------
+130:__NR_get_kernel_syms 0e
+-----------------------------------------------------
+-----------------------------------------------------
+137: __NR_afs_syscall 0e
+-----------------------------------------------------
+-----------------------------------------------------
153: __NR_munlockall 0e
-----------------------------------------------------
-----------------------------------------------------
+167: __NR_query_module 0e
+-----------------------------------------------------
+-----------------------------------------------------
199: __NR_getuid32 0e
-----------------------------------------------------
@@ -396,4 +435,13 @@
by 0x........: ...
-----------------------------------------------------
+222: 222 0e
+-----------------------------------------------------
+-----------------------------------------------------
+223: 223 0e
+-----------------------------------------------------
+-----------------------------------------------------
+251: 251 0e
+-----------------------------------------------------
+-----------------------------------------------------
9999: 9999 1e
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-11 19:03:37
|
CVS commit by nethercote:
Converted fork(), and added a separate regtest for it.
A memcheck/tests/scalar.h 1.1 [POSSIBLY UNSAFE: printf] [no copyright]
M +10 -8 coregrind/vg_syscalls.c 1.176
M +7 -2 memcheck/tests/Makefile.am 1.57
M +1 -20 memcheck/tests/scalar.c 1.8
--- valgrind/coregrind/vg_syscalls.c #1.175:1.176
@@ -2112,8 +2112,13 @@ POST(fstat)
static vki_sigset_t fork_saved_mask;
-PRE(fork)
+// In Linux, the sys_fork() function varies across architectures, but we
+// ignore the various args it gets, and so it looks arch-neutral. Hmm.
+PREx(sys_fork, 0)
{
vki_sigset_t mask;
+ PRINT("sys_fork ( )");
+ PRE_REG_READ0(long, "fork");
+
vg_assert(VG_(gettid)() == VG_(main_pid));
@@ -2123,11 +2128,8 @@ PRE(fork)
VG_(sigprocmask)(VKI_SIG_SETMASK, &mask, &fork_saved_mask);
- /* pid_t fork(void); */
- PRINT("fork ()");
-
do_atfork_pre(tid);
}
-POST(fork)
+POST(sys_fork)
{
if (res == 0) {
@@ -2161,7 +2163,7 @@ PRE(clone)
|| arg1 == (VKI_CLONE_PARENT_SETTID|VKI_SIGCHLD)))
{
- before_fork(tid, tst);
+ before_sys_fork(tid, tst);
set_result( VG_(do_syscall)(SYSNO, arg1, arg2, arg3, arg4, arg5) );
- after_fork(tid, tst);
+ after_sys_fork(tid, tst);
} else {
VG_(unimplemented)
@@ -5807,5 +5809,5 @@ static const struct sys_info sys_info[]
// 0 is restart_syscall
SYSX_(__NR_exit, sys_exit), // 1 * P
- SYSBA(fork, 0), // 2 sys_fork P
+ SYSXY(__NR_fork, sys_fork), // 2 (quasi-generic...) P
SYSXY(__NR_read, sys_read), // 3 * P
SYSX_(__NR_write, sys_write), // 4 * P
--- valgrind/memcheck/tests/Makefile.am #1.56:1.57
@@ -4,4 +4,6 @@
filter_stderr filter_stderr_backtrace
+noinst_HEADERS = scalar.h
+
EXTRA_DIST = $(noinst_SCRIPTS) \
badaddrvalue.stderr.exp \
@@ -53,5 +55,6 @@
realloc3.stderr.exp realloc3.vgtest \
scalar.stderr.exp scalar.vgtest scalar.supp \
- scalar_supp.stderr.exp scalar_supp.vgtest scalar_supp.c \
+ scalar_fork.stderr.exp scalar_fork.vgtest \
+ scalar_supp.stderr.exp scalar_supp.vgtest \
sigaltstack.stderr.exp sigaltstack.vgtest \
signal2.stderr.exp \
@@ -82,5 +85,6 @@
nanoleak new_nothrow \
null_socket overlap \
- realloc1 realloc2 realloc3 scalar scalar_supp sigaltstack signal2 \
+ realloc1 realloc2 realloc3 scalar scalar_fork \
+ scalar_supp sigaltstack signal2 \
str_tester supp1 supp2 suppfree \
trivialleak weirdioctl \
@@ -135,4 +139,5 @@
realloc3_SOURCES = realloc3.c
scalar_SOURCES = scalar.c
+scalar_fork_SOURCES = scalar_fork.c
scalar_supp_SOURCES = scalar_supp.c
signal2_SOURCES = signal2.c
--- valgrind/memcheck/tests/scalar.c #1.7:1.8
@@ -1,22 +1,3 @@
-#include <assert.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
-
-// Thorough syscall scalar arg checking. Also serves as thorough checking
-// for (very) basic syscall use. Generally not trying to do anything
-// meaningful with the syscalls.
-
-#define GO(__NR_xxx, s) \
- fprintf(stderr, "-----------------------------------------------------\n" \
- "%3d:%20s %s\n" \
- "-----------------------------------------------------\n", \
- __NR_xxx, #__NR_xxx, s);
-
-#define SY syscall
+#include "scalar.h"
int main(void)
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-11 18:01:00
|
CVS commit by nethercote:
Converted a bunch more syscalls.
M +95 -74 coregrind/vg_syscalls.c 1.175
M +3 -0 include/linux/vki.h 1.3
M +3 -0 include/x86-linux/vki_arch_posixtypes.h 1.2
M +131 -84 memcheck/tests/scalar.c 1.7
M +254 -22 memcheck/tests/scalar.stderr.exp 1.7
--- valgrind/coregrind/vg_syscalls.c #1.174:1.175
@@ -1059,6 +1059,9 @@ static Bool fd_allowed(Int fd, const Cha
for the syscall (eg. "write")... this should be good enough for the
average user to understand what is happening, without confusing them
- with names like "sys_write". However, for the --trace-syscalls=yes
- output, we use the sys_foo() name to avoid ambiguity.
+ with names like "sys_write". Also, the arg names sometimes are taken
+ from the man pages for the glibc equivalent functions, rather than those
+ used in the Linux source code, for the same reason. However, for the
+ --trace-syscalls=yes output, we use the sys_foo() name to avoid
+ ambiguity.
XXX: some of these are arch-specific, and should be factored out.
@@ -1182,9 +1185,16 @@ PREx(sys_mount, MayBlock)
}
-PRE(umount)
+PREx(sys_oldumount, 0)
{
- /* int umount(const char *path) */
- PRINT("umount( %p )", arg1);
- PRE_MEM_RASCIIZ( "umount(path)",arg1);
+ PRINT("sys_oldumount( %p )", arg1);
+ PRE_REG_READ1(long, "umount", char *, path);
+ PRE_MEM_RASCIIZ( "umount(path)", arg1);
+}
+
+PREx(sys_umount, 0)
+{
+ PRINT("sys_umount( %p )", arg1);
+ PRE_REG_READ2(long, "umount2", char *, path, int, flags);
+ PRE_MEM_RASCIIZ( "umount2(path)", arg1);
}
@@ -1727,8 +1737,9 @@ POST(pread64)
}
-PRE(mknod)
+PREx(sys_mknod, 0)
{
- /* int mknod(const char *pathname, mode_t mode, dev_t dev); */
- PRINT("mknod ( %p, 0x%x, 0x%x )", arg1, arg2, arg3 );
+ PRINT("sys_mknod ( %p, 0x%x, 0x%x )", arg1, arg2, arg3 );
+ PRE_REG_READ3(long, "mknod",
+ const char *, pathname, int, mode, unsigned, dev);
PRE_MEM_RASCIIZ( "mknod(pathname)", arg1 );
}
@@ -1954,15 +1965,15 @@ PRE(brk)
}
-PRE(chdir)
+PREx(sys_chdir, 0)
{
- /* int chdir(const char *path); */
- PRINT("chdir ( %p )", arg1);
+ PRINT("sys_chdir ( %p )", arg1);
+ PRE_REG_READ1(long, "chdir", const char *, path);
PRE_MEM_RASCIIZ( "chdir(path)", arg1 );
}
-PRE(chmod)
+PREx(sys_chmod, 0)
{
- /* int chmod(const char *path, mode_t mode); */
- PRINT("chmod ( %p, %d )", arg1,arg2);
+ PRINT("sys_chmod ( %p, %d )", arg1,arg2);
+ PRE_REG_READ2(long, "chmod", const char *, path, vki_mode_t, mode);
PRE_MEM_RASCIIZ( "chmod(path)", arg1 );
}
@@ -1978,8 +1989,9 @@ PREALIAS(chown32, chown);
PREALIAS(lchown32, chown);
-PRE(close)
+PREx(sys_close, 0)
{
- /* int close(int fd); */
- PRINT("close ( %d )",arg1);
+ PRINT("sys_close ( %d )", arg1);
+ PRE_REG_READ1(long, "close", unsigned int, fd);
+
/* Detect and negate attempts by the client to close Valgrind's log fd */
if (!fd_allowed(arg1, "close", tid, False))
@@ -1987,7 +1999,7 @@ PRE(close)
}
-POST(close)
+POST(sys_close)
{
- if(VG_(clo_track_fds)) record_fd_close(tid, arg1);
+ if (VG_(clo_track_fds)) record_fd_close(tid, arg1);
}
@@ -3916,16 +3928,17 @@ POST(kill)
}
-PRE(link)
+PREx(sys_link, MayBlock)
{
- /* int link(const char *oldpath, const char *newpath); */
- PRINT("link ( %p, %p)", arg1, arg2);
+ PRINT("sys_link ( %p, %p)", arg1, arg2);
+ PRE_REG_READ2(long, "link", const char *, oldpath, const char *, newpath);
PRE_MEM_RASCIIZ( "link(oldpath)", arg1);
PRE_MEM_RASCIIZ( "link(newpath)", arg2);
}
-PRE(lseek)
+PREx(sys_lseek, 0)
{
- /* off_t lseek(int fildes, off_t offset, int whence); */
- PRINT("lseek ( %d, %d, %d )",arg1,arg2,arg3);
+ PRINT("sys_lseek ( %d, %d, %d )", arg1,arg2,arg3);
+ PRE_REG_READ3(vki_off_t, "lseek",
+ unsigned int, fd, vki_off_t, offset, unsigned int, whence);
}
@@ -4195,12 +4208,12 @@ PREx(sys_write, MayBlock)
}
-PRE(creat)
+PREx(sys_creat, MayBlock)
{
- /* int creat(const char *pathname, mode_t mode); */
- PRINT("creat ( %p(%s), %d )",arg1,arg1,arg2);
+ PRINT("sys_creat ( %p(%s), %d )", arg1,arg1,arg2);
+ PRE_REG_READ2(long, "creat", const char *, pathname, int, mode);
PRE_MEM_RASCIIZ( "creat(pathname)", arg1 );
}
-POST(creat)
+POST(sys_creat)
{
if (!fd_allowed(res, "creat", tid, True)) {
@@ -4574,11 +4587,15 @@ PRE(settimeofday)
}
-PRE(setuid)
+PREx(sys_setuid16, 0)
{
- /* int setuid(uid_t uid); */
- PRINT("setuid ( %d )", arg1);
+ PRINT("sys_setuid16 ( %d )", arg1);
+ PRE_REG_READ1(long, "setuid16", vki_old_uid_t, uid);
}
-PREALIAS(setuid32, setuid);
+PREx(sys_setuid, 0)
+{
+ PRINT("sys_setuid ( %d )", arg1);
+ PRE_REG_READ1(long, "setuid", vki_uid_t, uid);
+}
PRE(socketcall)
@@ -5017,14 +5034,15 @@ POST(sysinfo)
}
-PRE(time)
+PREx(sys_time, 0)
{
/* time_t time(time_t *t); */
- PRINT("time ( %p )",arg1);
+ PRINT("sys_time ( %p )",arg1);
+ PRE_REG_READ1(long, "time", int *, t);
if (arg1 != (UWord)NULL) {
- PRE_MEM_WRITE( "time", arg1, sizeof(vki_time_t) );
+ PRE_MEM_WRITE( "time(t)", arg1, sizeof(vki_time_t) );
}
}
-POST(time)
+POST(sys_time)
{
if (arg1 != (UWord)NULL) {
@@ -5060,8 +5078,8 @@ PRE(umask)
}
-PRE(unlink)
+PREx(sys_unlink, MayBlock)
{
- /* int unlink(const char *pathname) */
- PRINT("unlink ( %p(%s) )",arg1, arg1);
+ PRINT("sys_unlink ( %p(%s) )", arg1,arg1);
+ PRE_REG_READ1(long, "unlink", const char *, pathname);
PRE_MEM_RASCIIZ( "unlink(pathname)", arg1 );
}
@@ -5090,14 +5108,15 @@ PRE(utime)
}
-PRE(waitpid)
+PREx(sys_waitpid, MayBlock)
{
- /* pid_t waitpid(pid_t pid, int *status, int options); */
+ PRINT("sys_waitpid ( %d, %p, %d )", arg1,arg2,arg3);
+ PRE_REG_READ3(long, "waitpid",
+ vki_pid_t, pid, unsigned int *, status, int, options);
- PRINT("waitpid ( %d, %p, %d )", arg1,arg2,arg3);
if (arg2 != (Addr)NULL)
PRE_MEM_WRITE( "waitpid(status)", arg2, sizeof(int) );
}
-POST(waitpid)
+POST(sys_waitpid)
{
if (arg2 != (Addr)NULL)
@@ -5778,4 +5797,6 @@ static const struct sys_info bad_sys = {
// Those with "%%" are generic, but within a "#if BITS_PER_LONG == 32"
+// Those with 'P' are generic/POSIX. Those with 'L' are Linux-only.
+
// XXX: this does duplicate the vki_unistd.h file somewhat -- could make
// this table replace that somehow...
@@ -5785,35 +5806,35 @@ static const struct sys_info bad_sys = {
static const struct sys_info sys_info[] = {
// 0 is restart_syscall
- SYSX_(__NR_exit, sys_exit), // 1 *
- SYSBA(fork, 0), // 2 sys_fork
- SYSXY(__NR_read, sys_read), // 3 *
- SYSX_(__NR_write, sys_write), // 4 *
+ SYSX_(__NR_exit, sys_exit), // 1 * P
+ SYSBA(fork, 0), // 2 sys_fork P
+ SYSXY(__NR_read, sys_read), // 3 * P
+ SYSX_(__NR_write, sys_write), // 4 * P
- SYSXY(__NR_open, sys_open), // 5 *
- SYSBA(close, 0), // 6 sys_close *
- SYSBA(waitpid, MayBlock), // 7 sys_waitpid *
- SYSBA(creat, MayBlock), // 8 sys_creat *
- SYSB_(link, MayBlock), // 9 sys_link *
+ SYSXY(__NR_open, sys_open), // 5 * P
+ SYSXY(__NR_close, sys_close), // 6 * P
+ SYSXY(__NR_waitpid, sys_waitpid), // 7 * P
+ SYSXY(__NR_creat, sys_creat), // 8 * P
+ SYSX_(__NR_link, sys_link), // 9 * P
- SYSB_(unlink, MayBlock), // 10 sys_unlink *
- SYSB_(execve, Special), // 11 sys_execve
- SYSB_(chdir, 0), // 12 sys_chdir *
- SYSBA(time, 0), // 13 sys_time *
- SYSB_(mknod, 0), // 14 sys_mknod *
+ SYSX_(__NR_unlink, sys_unlink), // 10 * P
+ SYSB_(execve, Special), // 11 sys_execve () P
+ SYSX_(__NR_chdir, sys_chdir), // 12 *
+ SYSXY(__NR_time, sys_time), // 13 *
+ SYSX_(__NR_mknod, sys_mknod), // 14 * P
- SYSB_(chmod, 0), // 15 sys_chmod *
- // lchown 16 sys_lchown16 ##
- // break 17 sys_ni_syscall
- // oldstat 18 sys_stat *
- SYSB_(lseek, 0), // 19 sys_lseek *
+ SYSX_(__NR_chmod, sys_chmod), // 15 * P
+ // lchown sys_lchown16 ## // 16
+ // break sys_ni_syscall // 17
+ // oldstat sys_stat // 18 *
+ SYSX_(__NR_lseek, sys_lseek), // 19 * P
SYSX_(__NR_getpid, sys_getpid), // 20 *
- SYSX_(__NR_mount, sys_mount), // 21 *
- SYSB_(umount, 0), // 22 sys_oldumount *
- SYSB_(setuid, 0), // 23 sys_setuid16 ##
- SYSX_(__NR_getuid, sys_getuid16), // 24 ##
+ SYSX_(__NR_mount, sys_mount), // 21 * L
+ SYSX_(__NR_umount, sys_oldumount), // 22 * L
+ SYSX_(__NR_setuid, sys_setuid16), // 23 ## P
+ SYSX_(__NR_getuid, sys_getuid16), // 24 ## P
// stime 25 sys_stime *
- SYSBA(ptrace, 0), // 26 sys_ptrace
+ SYSBA(ptrace, 0), // 26 sys_ptrace ()
SYSB_(alarm, MayBlock), /* not blocking, but must run in LWP context */ // 27 sys_alarm *
// oldfstat 28 sys_fstat *
@@ -5846,5 +5867,5 @@ static const struct sys_info sys_info[]
SYSX_(__NR_getegid, sys_getegid16), // 50 ##
SYSB_(acct, 0), // 51 sys_acct *
- // umount2 52 sys_umount
+ SYSX_(__NR_umount2, sys_umount), // 52 * L
// lock 53 sys_ni_syscall
SYSBA(ioctl, MayBlock), // 54 sys_ioctl *
@@ -6041,5 +6062,5 @@ static const struct sys_info sys_info[]
SYSBA(getresgid32, 0), // 211 sys_getresgid *
SYSB_(chown32, 0), // 212 sys_chown *
- SYSB_(setuid32, 0), // 213 sys_setuid *
+ SYSX_(__NR_setuid32, sys_setuid), // 213 *
SYSB_(setgid32, 0), // 214 sys_setgid *
--- valgrind/include/linux/vki.h #1.2:1.3
@@ -98,4 +98,7 @@ typedef __vki_kernel_uid32_t vki_uid_t;
typedef __vki_kernel_gid32_t vki_gid_t;
+typedef __vki_kernel_old_uid_t vki_old_uid_t;
+typedef __vki_kernel_old_gid_t vki_old_gid_t;
+
typedef __vki_kernel_loff_t vki_loff_t;
--- valgrind/include/x86-linux/vki_arch_posixtypes.h #1.1:1.2
@@ -52,4 +52,7 @@ typedef unsigned int __vki_kernel_uid32_
typedef unsigned int __vki_kernel_gid32_t;
+typedef unsigned short __vki_kernel_old_uid_t;
+typedef unsigned short __vki_kernel_old_gid_t;
+
typedef long long __vki_kernel_loff_t;
--- valgrind/memcheck/tests/scalar.c #1.6:1.7
@@ -18,4 +18,6 @@
__NR_xxx, #__NR_xxx, s);
+#define SY syscall
+
int main(void)
{
@@ -37,46 +39,83 @@ int main(void)
// __NR_read 3 --> sys_read()
// Nb: here we are also getting an error from the syscall arg itself.
- GO(__NR_read, "1+3 scalar errors");
- syscall(i0+__NR_read, i0, s0, i0);
+ GO(__NR_read, "1+3s 0m");
+ SY(__NR_read+i0, i0, s0, i0);
// __NR_write 4 --> sys_write()
- GO(__NR_write, "3 scalar errors, 1 memory error");
- syscall(__NR_write, i0, s0, i0+1);
+ GO(__NR_write, "3S 1m");
+ SY(__NR_write, i0, s0, i0+1);
- // __NR_open 5
- GO(__NR_open, "(2-args), 2 scalar errors, 1 memory error");
- syscall(__NR_open, s0, i0, i0+1);
+ // __NR_open 5 --> sys_open()
+ GO(__NR_open, "(2-args) 2s 1m");
+ SY(__NR_open, s0, i0, i0+1);
- GO(__NR_open, "(3-args), 1 scalar error");
- syscall(__NR_open, "tmp_write_file_foo", O_CREAT, i0);
+ GO(__NR_open, "(3-args) 1s 0m");
+ SY(__NR_open, "tmp_write_file_foo", O_CREAT, i0);
+
+ // __NR_close 6 --> sys_close()
+ GO(__NR_close, "1s 0m");
+ SY(__NR_close, i0-1);
+
+ // __NR_waitpid 7 --> sys_waitpid()
+ GO(__NR_waitpid, "3s 1m");
+ SY(__NR_waitpid, i0-1);
+
+ // __NR_creat 8 --> sys_creat()
+ GO(__NR_creat, "2s 1m");
+ SY(__NR_creat, s0, i0);
+
+ // __NR_link 9 --> sys_link()
+ GO(__NR_link, "2s 2m");
+ SY(__NR_link, s0, s0);
+
+ // __NR_unlink 10 --> sys_unlink()
+ GO(__NR_unlink, "1s 1m");
+ SY(__NR_unlink, s0);
- // __NR_close 6
- // __NR_waitpid 7
- // __NR_creat 8
- // __NR_link 9
- // __NR_unlink 10
// __NR_execve 11
- // __NR_chdir 12
- // __NR_time 13
- // __NR_mknod 14
- // __NR_chmod 15
+
+ // __NR_chdir 12 --> sys_chdir()
+ GO(__NR_chdir, "1s 1m");
+ SY(__NR_chdir, s0);
+
+ // __NR_time 13 --> sys_time()
+ GO(__NR_time, "1s 1m");
+ SY(__NR_time, s0+1);
+
+ // __NR_mknod 14 --> sys_mknod()
+ GO(__NR_mknod, "3S 1M");
+ SY(__NR_mknod, s0, i0, i0);
+
+ // __NR_chmod 15 --> sys_chmod()
+ GO(__NR_chmod, "2S 1M");
+ SY(__NR_chmod, s0, i0);
+
// __NR_lchown 16
// __NR_break 17
// __NR_oldstat 18
- // __NR_lseek 19
+
+ // __NR_lseek 19 --> sys_lseek()
+ GO(__NR_lseek, "3S 0M");
+ SY(__NR_lseek, i0, i0, i0);
+
// __NR_getpid 20 --> sys_getpid()
- GO(__NR_getpid, "0 errors");
- syscall(__NR_getpid);
+ GO(__NR_getpid, "0S 0M");
+ SY(__NR_getpid);
- // __NR_mount 21
- GO(__NR_mount, "4 scalar errors, 3 memory errors");
- syscall(__NR_mount, s0, s0, s0, i0, s0);
+ // __NR_mount 21 --> sys_mount()
+ GO(__NR_mount, "5s 3m");
+ SY(__NR_mount, s0, s0, s0, i0, s0);
- // __NR_umount 22
- // __NR_setuid 23
+ // __NR_umount 22 --> sys_oldumount()
+ GO(__NR_umount, "1s 1m");
+ SY(__NR_umount, s0);
- // __NR_getuid 24
- GO(__NR_getuid, "0 errors");
- syscall(__NR_getuid);
+ // __NR_setuid 23 --> sys_setuid16()
+ GO(__NR_setuid, "1s 0m");
+ SY(__NR_setuid, i0);
+
+ // __NR_getuid 24 --> sys_getuid16()
+ GO(__NR_getuid, "0e");
+ SY(__NR_getuid);
// __NR_stime 25
@@ -85,5 +124,5 @@ int main(void)
// __NR_oldfstat 28
- // __NR_pause 29
+ // __NR_pause 29 --> sys_pause()
// XXX: will have to be tested separately
@@ -95,7 +134,7 @@ int main(void)
// __NR_ftime 35
- // __NR_sync 36
- GO(__NR_sync, "0 errors");
- syscall(__NR_sync);
+ // __NR_sync 36 --> sys_sync()
+ GO(__NR_sync, "0e");
+ SY(__NR_sync);
// __NR_kill 37
@@ -110,17 +149,17 @@ int main(void)
// __NR_setgid 46
- // __NR_getgid 47
- GO(__NR_getgid, "0 errors");
- syscall(__NR_getgid);
+ // __NR_getgid 47 --> sys_getgid16()
+ GO(__NR_getgid, "0e");
+ SY(__NR_getgid);
// __NR_signal 48
- // __NR_geteuid 49
- GO(__NR_geteuid, "0 errors");
- syscall(__NR_geteuid);
+ // __NR_geteuid 49 --> sys_geteuid16()
+ GO(__NR_geteuid, "0e");
+ SY(__NR_geteuid);
- // __NR_getegid 50
- GO(__NR_getegid, "0 errors");
- syscall(__NR_getegid);
+ // __NR_getegid 50 --> sys_getegid16()
+ GO(__NR_getegid, "0e");
+ SY(__NR_getegid);
// __NR_acct 51
@@ -125,5 +164,9 @@ int main(void)
// __NR_acct 51
+
// __NR_umount2 52
+ GO(__NR_umount2, "2s 1m");
+ SY(__NR_umount2, s0, i0);
+
// __NR_lock 53
// __NR_ioctl 54
@@ -138,15 +181,15 @@ int main(void)
// __NR_dup2 63
- // __NR_getppid 64
- GO(__NR_getppid, "0 errors");
- syscall(__NR_getppid);
+ // __NR_getppid 64 --> sys_getppid()
+ GO(__NR_getppid, "0e");
+ SY(__NR_getppid);
- // __NR_getpgrp 65
- GO(__NR_getpgrp, "0 errors");
- syscall(__NR_getpgrp);
+ // __NR_getpgrp 65 --> sys_getpgrp()
+ GO(__NR_getpgrp, "0e");
+ SY(__NR_getpgrp);
- // __NR_setsid 66
- GO(__NR_setsid, "0 errors");
- syscall(__NR_setsid);
+ // __NR_setsid 66 --> sys_setsid()
+ GO(__NR_setsid, "0e");
+ SY(__NR_setsid);
// __NR_sigaction 67
@@ -195,7 +238,7 @@ int main(void)
// __NR_iopl 110
- // __NR_vhangup 111
- GO(__NR_vhangup, "0 errors");
- syscall(__NR_vhangup);
+ // __NR_vhangup 111 --> sys_vhangup()
+ GO(__NR_vhangup, "0e");
+ SY(__NR_vhangup);
// __NR_idle 112
@@ -241,7 +284,7 @@ int main(void)
// __NR_mlockall 152
- // __NR_munlockall 153
- GO(__NR_munlockall, "0 errors");
- syscall(__NR_munlockall);
+ // __NR_munlockall 153 --> sys_munlockall()
+ GO(__NR_munlockall, "0e");
+ SY(__NR_munlockall);
// __NR_sched_setparam 154
@@ -291,19 +334,19 @@ int main(void)
// __NR_lchown32 198
- // __NR_getuid32 199
- GO(__NR_getuid32, "0 errors");
- syscall(__NR_getuid32);
+ // __NR_getuid32 199 --> sys_getuid()
+ GO(__NR_getuid32, "0e");
+ SY(__NR_getuid32);
- // __NR_getgid32 200
- GO(__NR_getgid32, "0 errors");
- syscall(__NR_getgid32);
+ // __NR_getgid32 200 --> sys_getgid()
+ GO(__NR_getgid32, "0e");
+ SY(__NR_getgid32);
- // __NR_geteuid32 201
- GO(__NR_geteuid32, "0 errors");
- syscall(__NR_geteuid32);
+ // __NR_geteuid32 201 --> sys_geteuid()
+ GO(__NR_geteuid32, "0e");
+ SY(__NR_geteuid32);
- // __NR_getegid32 202
- GO(__NR_getegid32, "0 errors");
- syscall(__NR_getegid32);
+ // __NR_getegid32 202 --> sys_getegid()
+ GO(__NR_getegid32, "0e");
+ SY(__NR_getegid32);
// __NR_setreuid32 203
@@ -317,5 +360,9 @@ int main(void)
// __NR_getresgid32 211
// __NR_chown32 212
- // __NR_setuid32 213
+
+ // __NR_setuid32 213 --> sys_setuid()
+ GO(__NR_setuid32, "1s 0m");
+ SY(__NR_setuid32, i0);
+
// __NR_setgid32 214
// __NR_setfsuid32 215
@@ -388,10 +435,10 @@ int main(void)
// __NR_sys_kexec_load 283
- GO(9999, "1 message");
- syscall(9999);
+ GO(9999, "1e");
+ SY(9999);
// __NR_exit 1 --> sys_exit()
- GO(__NR_exit, "1 scalar error");
- syscall(__NR_exit, i0);
+ GO(__NR_exit, "1s 0m");
+ SY(__NR_exit, i0);
assert(0);
--- valgrind/memcheck/tests/scalar.stderr.exp #1.6:1.7
@@ -1,4 +1,4 @@
-----------------------------------------------------
- 3: __NR_read 1+3 scalar errors
+ 3: __NR_read 1+3s 0m
-----------------------------------------------------
Syscall param (syscallno) contains uninitialised byte(s)
@@ -22,5 +22,5 @@
by 0x........: ...
-----------------------------------------------------
- 4: __NR_write 3 scalar errors, 1 memory error
+ 4: __NR_write 3S 1m
-----------------------------------------------------
@@ -46,5 +46,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 5: __NR_open (2-args), 2 scalar errors, 1 memory error
+ 5: __NR_open (2-args) 2s 1m
-----------------------------------------------------
@@ -65,5 +65,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 5: __NR_open (3-args), 1 scalar error
+ 5: __NR_open (3-args) 1s 0m
-----------------------------------------------------
@@ -73,8 +73,188 @@
by 0x........: ...
-----------------------------------------------------
- 20: __NR_getpid 0 errors
+ 6: __NR_close 1s 0m
+-----------------------------------------------------
+
+Syscall param close(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+Warning: invalid file descriptor -1 in syscall close()
+-----------------------------------------------------
+ 7: __NR_waitpid 3s 1m
+-----------------------------------------------------
+
+Syscall param waitpid(pid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param waitpid(status) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param waitpid(options) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param waitpid(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
+-----------------------------------------------------
+ 8: __NR_creat 2s 1m
+-----------------------------------------------------
+
+Syscall param creat(pathname) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param creat(mode) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param creat(pathname) 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
+-----------------------------------------------------
+ 9: __NR_link 2s 2m
+-----------------------------------------------------
+
+Syscall param link(oldpath) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param link(newpath) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param link(oldpath) 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 link(newpath) 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
+-----------------------------------------------------
+ 10: __NR_unlink 1s 1m
+-----------------------------------------------------
+
+Syscall param unlink(pathname) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param unlink(pathname) 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
+-----------------------------------------------------
+ 12: __NR_chdir 1s 1m
+-----------------------------------------------------
+
+Syscall param chdir(path) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param chdir(path) 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
+-----------------------------------------------------
+ 13: __NR_time 1s 1m
+-----------------------------------------------------
+
+Syscall param time(t) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param time(t) 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
+-----------------------------------------------------
+ 14: __NR_mknod 3S 1M
+-----------------------------------------------------
+
+Syscall param mknod(pathname) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mknod(mode) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mknod(dev) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mknod(pathname) 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
+-----------------------------------------------------
+ 15: __NR_chmod 2S 1M
+-----------------------------------------------------
+
+Syscall param chmod(path) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param chmod(mode) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param chmod(path) 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
+-----------------------------------------------------
+ 19: __NR_lseek 3S 0M
+-----------------------------------------------------
+
+Syscall param lseek(fd) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param lseek(offset) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param lseek(whence) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
+ 20: __NR_getpid 0S 0M
-----------------------------------------------------
-----------------------------------------------------
- 21: __NR_mount 4 scalar errors, 3 memory errors
+ 21: __NR_mount 5s 3m
-----------------------------------------------------
@@ -122,47 +302,99 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
- 24: __NR_getuid 0 errors
+ 22: __NR_umount 1s 1m
-----------------------------------------------------
+
+Syscall param umount(path) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param umount(path) 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
-----------------------------------------------------
- 36: __NR_sync 0 errors
+ 23: __NR_setuid 1s 0m
-----------------------------------------------------
+
+More than 50 errors detected. Subsequent errors
+will still be recorded, but in less detail than before.
+
+Syscall param setuid16(uid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
-----------------------------------------------------
- 47: __NR_getgid 0 errors
+ 24: __NR_getuid 0e
-----------------------------------------------------
-----------------------------------------------------
- 49: __NR_geteuid 0 errors
+ 36: __NR_sync 0e
-----------------------------------------------------
-----------------------------------------------------
- 50: __NR_getegid 0 errors
+ 47: __NR_getgid 0e
-----------------------------------------------------
-----------------------------------------------------
- 64: __NR_getppid 0 errors
+ 49: __NR_geteuid 0e
-----------------------------------------------------
-----------------------------------------------------
- 65: __NR_getpgrp 0 errors
+ 50: __NR_getegid 0e
-----------------------------------------------------
-----------------------------------------------------
- 66: __NR_setsid 0 errors
+ 52: __NR_umount2 2s 1m
-----------------------------------------------------
+
+Syscall param umount2(path) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param umount2(flags) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param umount2(path) 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
+-----------------------------------------------------
+ 64: __NR_getppid 0e
-----------------------------------------------------
-111: __NR_vhangup 0 errors
-----------------------------------------------------
+ 65: __NR_getpgrp 0e
-----------------------------------------------------
-153: __NR_munlockall 0 errors
-----------------------------------------------------
+ 66: __NR_setsid 0e
-----------------------------------------------------
-199: __NR_getuid32 0 errors
-----------------------------------------------------
+111: __NR_vhangup 0e
-----------------------------------------------------
-200: __NR_getgid32 0 errors
-----------------------------------------------------
+153: __NR_munlockall 0e
-----------------------------------------------------
-201: __NR_geteuid32 0 errors
-----------------------------------------------------
+199: __NR_getuid32 0e
-----------------------------------------------------
-202: __NR_getegid32 0 errors
-----------------------------------------------------
+200: __NR_getgid32 0e
+-----------------------------------------------------
+-----------------------------------------------------
+201: __NR_geteuid32 0e
+-----------------------------------------------------
+-----------------------------------------------------
+202: __NR_getegid32 0e
+-----------------------------------------------------
+-----------------------------------------------------
+213: __NR_setuid32 1s 0m
+-----------------------------------------------------
+
+Syscall param setuid(uid) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
-----------------------------------------------------
-9999: 9999 1 message
+9999: 9999 1e
-----------------------------------------------------
WARNING: unhandled syscall: 9999
@@ -170,5 +402,5 @@
Read the file README_MISSING_SYSCALL_OR_IOCTL.
-----------------------------------------------------
- 1: __NR_exit 1 scalar error
+ 1: __NR_exit 1s 0m
-----------------------------------------------------
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-11 16:38:27
|
CVS commit by nethercote:
Converted a bunch of zero-arg syscalls.
M +73 -73 coregrind/vg_syscalls.c 1.174
M +68 -18 memcheck/tests/scalar.c 1.6 [POSSIBLY UNSAFE: printf]
M +66 -9 memcheck/tests/scalar.stderr.exp 1.6
--- valgrind/coregrind/vg_syscalls.c #1.173:1.174
@@ -49,5 +49,5 @@
R_SYSCALL_NUM, sizeof(UWord));
-#define PRRAn(n,s,a,t) \
+#define PRRAn(n,s,t,a) \
SK_(pre_reg_read)(Vg_CoreSysCall, tid, X(s,a), \
R_SYSCALL_ARG##n, sizeof(t));
@@ -61,5 +61,5 @@
if (VG_(defined_pre_reg_read)()) { \
PRRSN; \
- PRRAn(1,s,); \
+ PRRAn(1,s,t1,a1); \
}
@@ -67,5 +67,5 @@
if (VG_(defined_pre_reg_read)()) { \
PRRSN; \
- PRRAn(1,s,a1,t1); PRRAn(2,s,a2,t2); \
+ PRRAn(1,s,t1,a1); PRRAn(2,s,t2,a2); \
}
@@ -73,5 +73,5 @@
if (VG_(defined_pre_reg_read)()) { \
PRRSN; \
- PRRAn(1,s,a1,t1); PRRAn(2,s,a2,t2); PRRAn(3,s,a3,t3); \
+ PRRAn(1,s,t1,a1); PRRAn(2,s,t2,a2); PRRAn(3,s,t3,a3); \
}
@@ -79,6 +79,6 @@
if (VG_(defined_pre_reg_read)()) { \
PRRSN; \
- PRRAn(1,s,a1,t1); PRRAn(2,s,a2,t2); PRRAn(3,s,a3,t3); \
- PRRAn(4,s,a4,t4); \
+ PRRAn(1,s,t1,a1); PRRAn(2,s,t2,a2); PRRAn(3,s,t3,a3); \
+ PRRAn(4,s,t4,a4); \
}
@@ -86,6 +86,6 @@
if (VG_(defined_pre_reg_read)()) { \
PRRSN; \
- PRRAn(1,s,a1,t1); PRRAn(2,s,a2,t2); PRRAn(3,s,a3,t3); \
- PRRAn(4,s,a4,t4); PRRAn(5,s,a5,t5); \
+ PRRAn(1,s,t1,a1); PRRAn(2,s,t2,a2); PRRAn(3,s,t3,a3); \
+ PRRAn(4,s,t4,a4); PRRAn(5,s,t5,a5); \
}
@@ -93,6 +93,6 @@
if (VG_(defined_pre_reg_read)()) { \
PRRSN; \
- PRRAn(1,s,a1,t1); PRRAn(2,s,a2,t2); PRRAn(3,s,a3,t3); \
- PRRAn(4,s,a4,t4); PRRAn(5,s,a5,t5); PRRAn(6,s,a6,t6); \
+ PRRAn(1,s,t1,a1); PRRAn(2,s,t2,a2); PRRAn(3,s,t3,a3); \
+ PRRAn(4,s,t4,a4); PRRAn(5,s,t5,a5); PRRAn(6,s,t6,a6); \
}
@@ -1175,7 +1175,6 @@ PREx(sys_mount, MayBlock)
PRINT( "sys_mount( %p, %p, %p, %p, %p )" ,arg1,arg2,arg3);
PRE_REG_READ5(long, "mount",
- char __user *, source, char __user *, target,
- char __user *, type, unsigned long, flags,
- void __user *, data);
+ char *, source, char *, target, char *, type,
+ unsigned long, flags, void *, data);
PRE_MEM_RASCIIZ( "mount(source)", arg1);
PRE_MEM_RASCIIZ( "mount(target)", arg2);
@@ -1246,7 +1245,8 @@ PRE(setresgid)
}
-PRE(vhangup)
+PREx(sys_vhangup, 0)
{
- PRINT("vhangup()");
+ PRINT("sys_vhangup ( )");
+ PRE_REG_READ0(long, "vhangup");
}
@@ -1584,8 +1584,8 @@ PRE(mlockall)
}
-PRE(munlockall)
+PREx(sys_munlockall, MayBlock)
{
- /* int munlockall(void) */
- PRINT("munlockall()");
+ PRINT("sys_munlockall ( )");
+ PRE_REG_READ0(long, "munlockall");
}
@@ -1676,8 +1676,8 @@ PRE(pwrite64)
}
-PRE(sync)
+PREx(sys_sync, MayBlock)
{
- /* int sync(); */
- PRINT("sync ( )");
+ PRINT("sys_sync ( )");
+ PRE_REG_READ0(long, "sync");
}
@@ -2239,38 +2239,38 @@ POST(getcwd)
}
-PRE(geteuid)
+PREx(sys_geteuid16, 0)
{
- /* uid_t geteuid(void); */
- PRINT("geteuid ( )");
+ PRINT("sys_geteuid16 ( )");
+ PRE_REG_READ0(long, "geteuid16");
}
-PRE(geteuid32)
+PREx(sys_geteuid, 0)
{
- /* ?? uid_t geteuid32(void); */
- PRINT("geteuid32(?) ( )");
+ PRINT("sys_geteuid ( )");
+ PRE_REG_READ0(long, "geteuid");
}
-PRE(getegid)
+PREx(sys_getegid16, 0)
{
- /* gid_t getegid(void); */
- PRINT("getegid ()");
+ PRINT("sys_getegid16 ( )");
+ PRE_REG_READ0(long, "getegid16");
}
-PRE(getegid32)
+PREx(sys_getegid, 0)
{
- /* gid_t getegid32(void); */
- PRINT("getegid32 ()");
+ PRINT("sys_getegid ( )");
+ PRE_REG_READ0(long, "getegid");
}
-PRE(getgid)
+PREx(sys_getgid16, 0)
{
- /* gid_t getgid(void); */
- PRINT("getgid ()");
+ PRINT("sys_getgid16 ( )");
+ PRE_REG_READ0(long, "getgid16");
}
-PRE(getgid32)
+PREx(sys_getgid, 0)
{
- /* gid_t getgid32(void); */
- PRINT("getgid32 ()");
+ PRINT("sys_getgid ( )");
+ PRE_REG_READ0(long, "getgid");
}
@@ -2287,8 +2287,8 @@ PRE(getpgid)
}
-PRE(getpgrp)
+PREx(sys_getpgrp, 0)
{
- /* pid_t getpgrp(void); */
- PRINT("getpgrp ()");
+ PRINT("sys_getpgrp ()");
+ PRE_REG_READ0(long, "getpgrp");
}
@@ -2432,14 +2432,14 @@ POST(gettimeofday)
}
-PRE(getuid)
+PREx(sys_getuid16, 0)
{
- /* uid_t getuid(void); */
- PRINT("getuid ( )");
+ PRINT("sys_getuid16 ( )");
+ PRE_REG_READ0(long, "getuid16");
}
-PRE(getuid32)
+PREx(sys_getuid, 0)
{
- /* ???uid_t getuid32(void); */
- PRINT("getuid32 ( )");
+ PRINT("sys_getuid ( )");
+ PRE_REG_READ0(long, "getuid");
}
@@ -4146,10 +4146,10 @@ PREx(sys_open, MayBlock)
PRINT("sys_open ( %p(%s), %d, %d )",arg1,arg1,arg2,arg3);
PRE_REG_READ3(long, "open",
- const char __user *, filename, int, flags, int, mode);
+ const char *, filename, int, flags, int, mode);
} else {
// 2-arg version
PRINT("sys_open ( %p(%s), %d )",arg1,arg1,arg2);
PRE_REG_READ2(long, "open",
- const char __user *, filename, int, flags);
+ const char *, filename, int, flags);
}
PRE_MEM_RASCIIZ( "open(filename)", arg1 );
@@ -4171,5 +4171,5 @@ PREx(sys_read, MayBlock)
PRINT("sys_read ( %d, %p, %llu )", arg1, arg2, (ULong)arg3);
PRE_REG_READ3(ssize_t, "read",
- unsigned int, fd, char __user *, buf, size_t, count);
+ unsigned int, fd, char *, buf, size_t, count);
if (!fd_allowed(arg1, "read", tid, False))
@@ -4188,5 +4188,5 @@ PREx(sys_write, MayBlock)
PRINT("sys_write ( %d, %p, %llu )", arg1, arg2, (ULong)arg3);
PRE_REG_READ3(ssize_t, "write",
- unsigned int, fd, const char __user *, buf, size_t, count);
+ unsigned int, fd, const char *, buf, size_t, count);
if (!fd_allowed(arg1, "write", tid, False))
set_result( -VKI_EBADF );
@@ -4477,8 +4477,8 @@ PRE(setgid)
PREALIAS(setgid32, setgid);
-PRE(setsid)
+PREx(sys_setsid, 0)
{
- /* pid_t setsid(void); */
- PRINT("setsid ()");
+ PRINT("sys_setsid ( )");
+ PRE_REG_READ0(long, "setsid");
}
@@ -5239,8 +5239,8 @@ PRE(acct)
}
-PRE(pause)
+PREx(sys_pause, MayBlock)
{
- /* int pause(void); */
- PRINT("pause ( )");
+ PRINT("sys_pause ( )");
+ PRE_REG_READ0(long, "pause");
}
@@ -5812,5 +5812,5 @@ static const struct sys_info sys_info[]
SYSB_(umount, 0), // 22 sys_oldumount *
SYSB_(setuid, 0), // 23 sys_setuid16 ##
- SYSB_(getuid, 0), // 24 sys_getuid16 ##
+ SYSX_(__NR_getuid, sys_getuid16), // 24 ##
// stime 25 sys_stime *
@@ -5818,5 +5818,5 @@ static const struct sys_info sys_info[]
SYSB_(alarm, MayBlock), /* not blocking, but must run in LWP context */ // 27 sys_alarm *
// oldfstat 28 sys_fstat *
- SYSB_(pause, MayBlock), // 29 sys_pause *
+ SYSX_(__NR_pause, sys_pause), // 29 *
SYSB_(utime, MayBlock), // 30 sys_utime *
@@ -5827,5 +5827,5 @@ static const struct sys_info sys_info[]
// ftime 35 sys_ni_syscall
- SYSB_(sync, MayBlock), // 36 sys_sync *
+ SYSX_(__NR_sync, sys_sync), // 36 *
SYSBA(kill, 0), // 37 sys_kill *
SYSB_(rename, 0), // 38 sys_rename *
@@ -5840,9 +5840,9 @@ static const struct sys_info sys_info[]
SYSB_(setgid, 0), // 46 sys_setgid16 ##
- SYSB_(getgid, 0), // 47 sys_getgid16 ##
+ SYSX_(__NR_getgid, sys_getgid16), // 47 ##
// signal 48 sys_signal *
- SYSB_(geteuid, 0), // 49 sys_geteuid16 ##
+ SYSX_(__NR_geteuid, sys_geteuid16), // 49 ##
- SYSB_(getegid, 0), // 50 sys_getegid16 ##
+ SYSX_(__NR_getegid, sys_getegid16), // 50 ##
SYSB_(acct, 0), // 51 sys_acct *
// umount2 52 sys_umount
@@ -5862,6 +5862,6 @@ static const struct sys_info sys_info[]
SYSX_(__NR_getppid, sys_getppid), // 64 *
- SYSB_(getpgrp, 0), // 65 sys_getpgrp *
- SYSB_(setsid, 0), // 66 sys_setsid *
+ SYSX_(__NR_getpgrp, sys_getpgrp), // 65 *
+ SYSX_(__NR_setsid, sys_setsid), // 66 *
SYSBA(sigaction, SIG_SIM), // 67 sys_sigaction
// sgetmask 68 sys_sgetmask *
@@ -5917,5 +5917,5 @@ static const struct sys_info sys_info[]
SYSB_(iopl, 0), // 110 sys_iopl
- SYSB_(vhangup, 0), // 111 sys_vhangup *
+ SYSX_(__NR_vhangup, sys_vhangup), // 111 *
// idle 112 sys_ni_syscall
// vm86old 113 sys_vm86old
@@ -5969,5 +5969,5 @@ static const struct sys_info sys_info[]
SYSB_(munlock, MayBlock), // 151 sys_unlock *
SYSB_(mlockall, MayBlock), // 152 sys_mlockall *
- SYSB_(munlockall, MayBlock), // 153 sys_munlockall *
+ SYSX_(__NR_munlockall, sys_munlockall), // 153 *
SYSBA(sched_setparam, 0), /* ??? */ // 154 sys_sched_setparam *
@@ -6024,9 +6024,9 @@ static const struct sys_info sys_info[]
SYSBA(fstat64, 0), // 197 sys_fstat64 %%
SYSB_(lchown32, 0), // 198 sys_lchown *
- SYSB_(getuid32, 0), // 199 sys_getuid *
+ SYSX_(__NR_getuid32, sys_getuid), // 199 *
- SYSB_(getgid32, 0), // 200 sys_getgid *
- SYSB_(geteuid32, 0), // 201 sys_geteuid *
- SYSB_(getegid32, 0), // 202 sys_getegid *
+ SYSX_(__NR_getgid32, sys_getgid), // 200 *
+ SYSX_(__NR_geteuid32, sys_geteuid), // 201 *
+ SYSX_(__NR_getegid32, sys_getegid), // 202 *
SYSB_(setreuid32, 0), // 203 sys_setreuid *
SYSB_(setregid32, 0), // 204 sys_setregid *
--- valgrind/memcheck/tests/scalar.c #1.5:1.6
@@ -12,7 +12,9 @@
// meaningful with the syscalls.
-void GO(char* s) {
- fprintf(stderr, "---------- %s\n", s);
-}
+#define GO(__NR_xxx, s) \
+ fprintf(stderr, "-----------------------------------------------------\n" \
+ "%3d:%20s %s\n" \
+ "-----------------------------------------------------\n", \
+ __NR_xxx, #__NR_xxx, s);
int main(void)
@@ -35,16 +37,16 @@ int main(void)
// __NR_read 3 --> sys_read()
// Nb: here we are also getting an error from the syscall arg itself.
- GO("__NR_read, 1+3 scalar errors");
+ GO(__NR_read, "1+3 scalar errors");
syscall(i0+__NR_read, i0, s0, i0);
// __NR_write 4 --> sys_write()
- GO("__NR_write, 3 scalar errors, 1 memory error");
+ GO(__NR_write, "3 scalar errors, 1 memory error");
syscall(__NR_write, i0, s0, i0+1);
// __NR_open 5
- GO("__NR_open(2), 2 scalar errors, 1 memory error");
+ GO(__NR_open, "(2-args), 2 scalar errors, 1 memory error");
syscall(__NR_open, s0, i0, i0+1);
- GO("__NR_open(3), 1 scalar error");
+ GO(__NR_open, "(3-args), 1 scalar error");
syscall(__NR_open, "tmp_write_file_foo", O_CREAT, i0);
@@ -64,9 +66,9 @@ int main(void)
// __NR_lseek 19
// __NR_getpid 20 --> sys_getpid()
- GO("__NR_getpid, 0 errors");
+ GO(__NR_getpid, "0 errors");
syscall(__NR_getpid);
// __NR_mount 21
- GO("__NR_mount, 4 scalar errors, 3 memory errors");
+ GO(__NR_mount, "4 scalar errors, 3 memory errors");
syscall(__NR_mount, s0, s0, s0, i0, s0);
@@ -73,5 +75,9 @@ int main(void)
// __NR_umount 22
// __NR_setuid 23
+
// __NR_getuid 24
+ GO(__NR_getuid, "0 errors");
+ syscall(__NR_getuid);
+
// __NR_stime 25
// __NR_ptrace 26
@@ -78,5 +84,8 @@ int main(void)
// __NR_alarm 27
// __NR_oldfstat 28
+
// __NR_pause 29
+ // XXX: will have to be tested separately
+
// __NR_utime 30
// __NR_stty 31
@@ -85,5 +94,9 @@ int main(void)
// __NR_nice 34
// __NR_ftime 35
+
// __NR_sync 36
+ GO(__NR_sync, "0 errors");
+ syscall(__NR_sync);
+
// __NR_kill 37
// __NR_rename 38
@@ -96,8 +109,19 @@ int main(void)
// __NR_brk 45
// __NR_setgid 46
+
// __NR_getgid 47
+ GO(__NR_getgid, "0 errors");
+ syscall(__NR_getgid);
+
// __NR_signal 48
+
// __NR_geteuid 49
+ GO(__NR_geteuid, "0 errors");
+ syscall(__NR_geteuid);
+
// __NR_getegid 50
+ GO(__NR_getegid, "0 errors");
+ syscall(__NR_getegid);
+
// __NR_acct 51
// __NR_umount2 52
@@ -115,9 +139,15 @@ int main(void)
// __NR_getppid 64
- GO("__NR_getppid, 0 errors");
+ GO(__NR_getppid, "0 errors");
syscall(__NR_getppid);
// __NR_getpgrp 65
+ GO(__NR_getpgrp, "0 errors");
+ syscall(__NR_getpgrp);
+
// __NR_setsid 66
+ GO(__NR_setsid, "0 errors");
+ syscall(__NR_setsid);
+
// __NR_sigaction 67
// __NR_sgetmask 68
@@ -129,5 +159,5 @@ int main(void)
// __NR_sethostname 74
// __NR_setrlimit 75
- // __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
+ // __NR_getrlimit 76
// __NR_getrusage 77
// __NR_gettimeofday 78
@@ -164,5 +194,9 @@ int main(void)
// __NR_olduname 109
// __NR_iopl 110
+
// __NR_vhangup 111
+ GO(__NR_vhangup, "0 errors");
+ syscall(__NR_vhangup);
+
// __NR_idle 112
// __NR_vm86old 113
@@ -190,5 +224,5 @@ int main(void)
// __NR_sysfs 135
// __NR_personality 136
- // __NR_afs_syscall 137 /* Syscall for Andrew File System */
+ // __NR_afs_syscall 137
// __NR_setfsuid 138
// __NR_setfsgid 139
@@ -206,5 +240,9 @@ int main(void)
// __NR_munlock 151
// __NR_mlockall 152
+
// __NR_munlockall 153
+ GO(__NR_munlockall, "0 errors");
+ syscall(__NR_munlockall);
+
// __NR_sched_setparam 154
// __NR_sched_getparam 155
@@ -241,8 +279,8 @@ int main(void)
// __NR_sigaltstack 186
// __NR_sendfile 187
- // __NR_getpmsg 188 /* some people actually want streams */
- // __NR_putpmsg 189 /* some people actually want streams */
+ // __NR_getpmsg 188
+ // __NR_putpmsg 189
// __NR_vfork 190
- // __NR_ugetrlimit 191 /* SuS compliant getrlimit */
+ // __NR_ugetrlimit 191
// __NR_mmap2 192
// __NR_truncate64 193
@@ -252,8 +290,21 @@ int main(void)
// __NR_fstat64 197
// __NR_lchown32 198
+
// __NR_getuid32 199
+ GO(__NR_getuid32, "0 errors");
+ syscall(__NR_getuid32);
+
// __NR_getgid32 200
+ GO(__NR_getgid32, "0 errors");
+ syscall(__NR_getgid32);
+
// __NR_geteuid32 201
+ GO(__NR_geteuid32, "0 errors");
+ syscall(__NR_geteuid32);
+
// __NR_getegid32 202
+ GO(__NR_getegid32, "0 errors");
+ syscall(__NR_getegid32);
+
// __NR_setreuid32 203
// __NR_setregid32 204
@@ -273,5 +324,4 @@ int main(void)
// __NR_mincore 218
// __NR_madvise 219
- // __NR_madvise1 219 /* delete when C lib stub is removed */
// __NR_getdents64 220
// __NR_fcntl64 221
@@ -338,9 +388,9 @@ int main(void)
// __NR_sys_kexec_load 283
- GO("bogus constant, 1 message");
+ GO(9999, "1 message");
syscall(9999);
// __NR_exit 1 --> sys_exit()
- GO("__NR_exit, 1 scalar error");
+ GO(__NR_exit, "1 scalar error");
syscall(__NR_exit, i0);
--- valgrind/memcheck/tests/scalar.stderr.exp #1.5:1.6
@@ -1,3 +1,5 @@
----------- __NR_read, 1+3 scalar errors
+-----------------------------------------------------
+ 3: __NR_read 1+3 scalar errors
+-----------------------------------------------------
Syscall param (syscallno) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
@@ -19,5 +21,7 @@
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
----------- __NR_write, 3 scalar errors, 1 memory error
+-----------------------------------------------------
+ 4: __NR_write 3 scalar errors, 1 memory error
+-----------------------------------------------------
Syscall param write(fd) contains uninitialised byte(s)
@@ -41,5 +45,7 @@
by 0x........: ...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
----------- __NR_open(2), 2 scalar errors, 1 memory error
+-----------------------------------------------------
+ 5: __NR_open (2-args), 2 scalar errors, 1 memory error
+-----------------------------------------------------
Syscall param open(filename) contains uninitialised byte(s)
@@ -58,5 +64,7 @@
by 0x........: ...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
----------- __NR_open(3), 1 scalar error
+-----------------------------------------------------
+ 5: __NR_open (3-args), 1 scalar error
+-----------------------------------------------------
Syscall param open(mode) contains uninitialised byte(s)
@@ -64,6 +72,10 @@
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
----------- __NR_getpid, 0 errors
----------- __NR_mount, 4 scalar errors, 3 memory errors
+-----------------------------------------------------
+ 20: __NR_getpid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 21: __NR_mount 4 scalar errors, 3 memory errors
+-----------------------------------------------------
Syscall param mount(source) contains uninitialised byte(s)
@@ -109,10 +121,55 @@
by 0x........: ...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
----------- __NR_getppid, 0 errors
----------- bogus constant, 1 message
+-----------------------------------------------------
+ 24: __NR_getuid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 36: __NR_sync 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 47: __NR_getgid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 49: __NR_geteuid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 50: __NR_getegid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 64: __NR_getppid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 65: __NR_getpgrp 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+ 66: __NR_setsid 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+111: __NR_vhangup 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+153: __NR_munlockall 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+199: __NR_getuid32 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+200: __NR_getgid32 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+201: __NR_geteuid32 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+202: __NR_getegid32 0 errors
+-----------------------------------------------------
+-----------------------------------------------------
+9999: 9999 1 message
+-----------------------------------------------------
WARNING: unhandled syscall: 9999
Do not panic. You may be able to fix this easily.
Read the file README_MISSING_SYSCALL_OR_IOCTL.
----------- __NR_exit, 1 scalar error
+-----------------------------------------------------
+ 1: __NR_exit 1 scalar error
+-----------------------------------------------------
Syscall param exit(error_code) contains uninitialised byte(s)
|
|
From: <js...@ac...> - 2004-11-11 03:57:15
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2004-11-11 03:50:01 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 ---------------------------------------- == 181 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-11 03:26:41
|
Nightly build on dunsmere ( Fedora Core 2 ) started at 2004-11-11 03:20:03 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 186 tests, 11 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (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) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-11-11 03:20:34
|
Nightly build on audi ( Red Hat 9 ) started at 2004-11-11 03:15:01 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 186 tests, 11 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (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) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-11-11 03:13:57
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2004-11-11 03:10:02 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow cpuid: valgrind ./cpuid dastest: valgrind ./dastest fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext 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 ---------------------------------------- == 186 tests, 0 stderr failures, 0 stdout failures ================= |
|
From: Tom H. <th...@cy...> - 2004-11-11 03:08:39
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2004-11-11 03:05:02 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext 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 ---------------------------------------- == 186 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/vgtest_ume (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-11-11 03:04:05
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-11-11 03:00:02 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext 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 ---------------------------------------- == 186 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/vgtest_ume (stderr) make: *** [regtest] Error 1 |