Converted lookup_dcookie.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2966
This commit is contained in:
Nicholas Nethercote 2004-11-12 13:29:24 +00:00
parent 4a6c062608
commit 691c66f51d
5 changed files with 61 additions and 13 deletions

View File

@ -1375,13 +1375,17 @@ PRE(quotactl)
PRE_MEM_RASCIIZ( "quotactl(special)", arg2 );
}
PRE(lookup_dcookie)
// XXX: this is only suitable for 32-bit platforms
PREx(sys_lookup_dcookie, 0)
{
PRINT("lookup_dcookie (0x%llx, %p, %d)", LOHI64(arg1,arg2), arg3, arg4);
PRINT("sys_lookup_dcookie (0x%llx, %p, %d)", LOHI64(arg1,arg2), arg3, arg4);
PRE_REG_READ4(long, "lookup_dcookie",
vki_u32, cookie_low32, vki_u32, cookie_high32,
char *, buf, vki_size_t, len);
PRE_MEM_WRITE( "lookup_dcookie(buf)", arg3, arg4);
}
POST(lookup_dcookie)
POST(sys_lookup_dcookie)
{
if (arg3 != (Addr)NULL)
POST_MEM_WRITE( arg3, res);
@ -6125,9 +6129,9 @@ static const struct sys_info sys_info[] = {
// fadvise64 250 sys_fadvise64 *
// 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 *
SYSX_(251, sys_ni_syscall), // 251 * P
SYSX_(__NR_exit_group, sys_exit_group), // 252 *
SYSXY(__NR_lookup_dcookie, sys_lookup_dcookie), // 253 (*/32/64) L
SYSBA(epoll_create, 0), // 254 sys_epoll_create *
SYSB_(epoll_ctl, 0), // 255 sys_epoll_ctl *

View File

@ -50,6 +50,8 @@ typedef unsigned long long __vki_u64;
typedef unsigned short vki_u16;
typedef unsigned int vki_u32;
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/asm-i386/page.h
//----------------------------------------------------------------------

View File

@ -19,8 +19,8 @@ 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+3s 0m");
SY(__NR_read+i0, i0, s0, i0);
GO(__NR_read, "1+3s 1m");
SY(__NR_read+i0, i0, s0, i0+1);
// __NR_write 4 --> sys_write()
GO(__NR_write, "3s 1m");
@ -407,6 +407,8 @@ int main(void)
// __NR_getdents64 220
// __NR_fcntl64 221
// XXX: from here on in, not present in early 2.4 kernels
// 222 --> sys_ni_syscall()
GO(222, "0e");
SY(222);
@ -448,7 +450,11 @@ int main(void)
SY(251);
// __NR_exit_group 252
// __NR_lookup_dcookie 253
// __NR_lookup_dcookie 253 --> sys_lookup_dcookie()
GO(__NR_lookup_dcookie, "4s 1m");
SY(__NR_lookup_dcookie, i0, i0, s0, i0+1);
// __NR_epoll_create 254
// __NR_epoll_ctl 255
// __NR_epoll_wait 256

View File

@ -1,5 +1,5 @@
-----------------------------------------------------
3: __NR_read 1+3s 0m
3: __NR_read 1+3s 1m
-----------------------------------------------------
Syscall param (syscallno) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
@ -20,6 +20,12 @@ Syscall param read(count) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
Syscall param read(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
-----------------------------------------------------
4: __NR_write 3s 1m
-----------------------------------------------------
@ -312,6 +318,9 @@ Syscall param umount(path) contains uninitialised byte(s)
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
More than 50 errors detected. Subsequent errors
will still be recorded, but in less detail than before.
Syscall param umount(path) points to unaddressable byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: __libc_start_main (...libc...)
@ -321,9 +330,6 @@ Syscall param umount(path) points to unaddressable byte(s)
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...)
@ -457,6 +463,35 @@ Syscall param setuid(uid) contains uninitialised byte(s)
251: 251 0e
-----------------------------------------------------
-----------------------------------------------------
253: __NR_lookup_dcookie 4s 1m
-----------------------------------------------------
Syscall param lookup_dcookie(cookie_low32) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
Syscall param lookup_dcookie(cookie_high32) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
Syscall param lookup_dcookie(buf) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
Syscall param lookup_dcookie(len) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
Syscall param lookup_dcookie(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
-----------------------------------------------------
9999: 9999 1e
-----------------------------------------------------
WARNING: unhandled syscall: 9999

View File

@ -1,3 +1,4 @@
prog: scalar
vgopts: -q
args: < scalar.c
delete: tmp_write_file_foo