|
From: Julian S. <js...@ac...> - 2003-10-29 22:53:17
|
CVS commit by jseward: Add a reader for DWARF-1 style line number info. The Lahey/Fujitsu Fortran compiler seems to generate DWARF-1 info. MERGE TO HEAD M +324 -2 vg_symtab2.c 1.48.2.2 |
|
From: Nicholas N. <nj...@ca...> - 2003-11-02 21:22:31
|
CVS commit by nethercote: Apply patch from Steve Grubb: It turns out that select is an open ended function that can take thousands of fds to select on if you are careful. fd_set as defined allocates 128 bytes of space, but you can allocate it dynamically. The bug goes like this...the programmer looks at maxfd and determines how many bytes it takes to allocate for the fd_set. Suppose 5 was the maximum fd. Going through the howmany macro yields 4 bytes. The sizeof fd_set is 128 bytes. If you do a rdfds_copy = *rfds, then valgrind overruns the rfds variable causing invalid reads. You can see real live code that does this around line 1260 of sshd.c from openssh. I discussed this problem with Damien Miller of the OpenSSH project since it was their code I was auditing. I then read the source to the linux kernel to make sure that it has no dependencies on the size of the structure passed in as the fd sets. It is very careful to look at n and then limit itself to the bytes indicated by n of the select call. The attached patch fixes this problem. I tested the Openssh daemon against this and the bug at select is now resolved. I did not look to see if poll is wrapped by valgrind. But it should be scalable too. (Nb: I haven't touched poll(), I don't understand it well enough to know if it needs fixing, let alone how to do so.) M +62 -20 vg_intercept.c 1.18.2.1 |
|
From: Julian S. <js...@ac...> - 2003-11-03 14:43:00
|
CVS commit by jseward:
Merge rev 1.52:
Add missing printf and pre_mem_read to rt_sigtimedwait(), thanks to Thomas
Lussnig <lu...@sm...>.
M +7 -2 vg_syscalls.c 1.40.2.5
--- valgrind/coregrind/vg_syscalls.c #1.40.2.4:1.40.2.5
@@ -1241,4 +1241,9 @@ void VG_(perform_assumed_nonblocking_sys
/* int sigtimedwait(const sigset_t *set, siginfo_t *info,
const struct timespec timeout); */
+ MAYBE_PRINTF("sigtimedwait ( %p, %p, timeout )\n", arg1, arg2);
+ if (arg1 != (UInt)NULL)
+ SYSCALL_TRACK( pre_mem_read, tid,
+ "sigtimedwait(set)", arg1,
+ sizeof(vki_ksigset_t));
if (arg2 != (UInt)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "sigtimedwait(info)", arg2,
|
|
From: Julian S. <js...@ac...> - 2003-11-03 14:44:17
|
CVS commit by jseward:
Merge rev 1.106:
Implemented PUSH/POP %{FS,GS}, and PUSH %CS (Nb: there is no POP %CS). Based
on patches from Adam Gundy and Tom Hughes.
M +51 -44 vg_to_ucode.c 1.87.2.9
|
|
From: Julian S. <js...@ac...> - 2003-11-03 14:45:58
|
CVS commit by jseward:
Merge rev 1.107:
Move var declarations to start of block, for older versions of gcc.
M +2 -2 vg_to_ucode.c 1.87.2.10
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.9:1.87.2.10
@@ -3580,6 +3580,6 @@ static
void dis_push_segreg ( UCodeBlock* cb, UInt sreg, Int sz )
{
- vg_assert(sz == 4);
Int t1 = newTemp(cb), t2 = newTemp(cb);
+ vg_assert(sz == 4);
uInstr2(cb, GETSEG, 2, ArchRegS, sreg, TempReg, t1);
uInstr2(cb, GET, 4, ArchReg, R_ESP, TempReg, t2);
@@ -3595,6 +3595,6 @@ static
void dis_pop_segreg ( UCodeBlock* cb, UInt sreg, Int sz )
{
- vg_assert(sz == 4);
Int t1 = newTemp(cb), t2 = newTemp(cb);
+ vg_assert(sz == 4);
uInstr2(cb, GET, 4, ArchReg, R_ESP, TempReg, t2);
uInstr2(cb, LOAD, 2, TempReg, t2, TempReg, t1);
|
|
From: Julian S. <js...@ac...> - 2003-11-03 19:15:38
|
CVS commit by jseward:
Implement __NR_clock_gettime (265). Needed on Red Hat Severn.
MERGE TO HEAD
M +12 -0 vg_syscalls.c 1.40.2.6
--- valgrind/coregrind/vg_syscalls.c #1.40.2.5:1.40.2.6
@@ -486,4 +486,16 @@ void VG_(perform_assumed_nonblocking_sys
/* !!!!!!!!!! New, untested syscalls !!!!!!!!!!!!!!!!!!!!! */
+# if defined(__NR_clock_gettime)
+ case __NR_clock_gettime: /* syscall 265 */
+ /* int clock_gettime(clockid_t clk_id, struct timespec *tp); */
+ MAYBE_PRINTF( "clock_gettime( %d, %p )\n" ,arg1,arg2);
+ SYSCALL_TRACK( pre_mem_write, tid, "clock_gettime(tp)",
+ arg2, sizeof(struct timespec) );
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res > 0)
+ VG_TRACK( post_mem_write, arg2, sizeof(struct timespec) );
+ break;
+# endif
+
# if defined(__NR_ptrace)
case __NR_ptrace: { /* syscall 26 */
|
|
From: Julian S. <js...@ac...> - 2003-11-04 07:08:11
|
CVS commit by jseward:
Merge from head, all changes to do with checking staticness and
setuid/setgid flags on executables. Probably these revs:
1.37 1.36 1.35 1.34 1.32 1.31
M +41 -16 valgrind.in 1.28.2.3
--- valgrind/coregrind/valgrind.in #1.28.2.2:1.28.2.3
@@ -111,17 +111,41 @@
fi
-# Ensure the program isn't statically linked.
+# Check that the program looks ok
+is_prog=0
+
if [ $# != 0 ] ; then
- which_prog="`which $1`"
- case `file "$which_prog"` in
- *"statically linked"*)
- echo "\`$which_prog' is statically linked"
- echo "Valgrind only works on dynamically linked executables; your"
- echo "program must rely on at least one shared object for Valgrind"
- echo "to work with it. Read FAQ #5 for more information."
- exit 1 ;;
- esac
+
+ # Ensure the program exists. Ignore any error messages from 'which'.
+ which_prog=`which $1 2> /dev/null`
+ if [ z$which_prog = z ] ; then
+ echo "$0: '$1' not found in \$PATH, aborting."
+ exit
+ fi
+
+ if [ $# != 0 ] ; then
+ case `file -L "$which_prog"` in # must follow symlinks, hence -L
+ # Ensure the program isn't statically linked.
+ *"statically linked"*)
+ echo "\`$which_prog' is statically linked"
+ echo "Valgrind only works on dynamically linked executables; your"
+ echo "program must rely on at least one shared object for Valgrind"
+ echo "to work with it. Read FAQ #5 for more information."
+ exit 1 ;;
+ # Ensure that there are no setuid or gid flags
+ *:\ set?id\ ELF*)
+ echo "\`$which_prog' is suid/sgid."
+ echo "Valgrind can't handle these executables, as it"
+ echo "requires the LD_PRELOAD feature in order to work."
+ echo ""
+ echo "Remove those flags and try again."
+ echo ""
+ exit 1
+ ;;
+ esac
+ fi
+
+ is_prog=1
fi
-
+
# A bit subtle. The LD_PRELOAD added entry must be absolute
# and not depend on LD_LIBRARY_PATH. This is so that we can
@@ -140,11 +164,12 @@
#export LD_DEBUG
-# If no command given, act like -h was given so vg_main.c prints out
-# the usage string. And pass to 'exec' tha name of any program -- it doesn't
-# matter which -- because it won't be run anyway (we use 'true').
-if [ $# != 0 ] ; then
+# Actually run the program, under Valgrind's control
+if [ $is_prog = 1 ] ; then
exec "$@"
else
- VG_ARGS="$VG_ARGS -h"
+ # If no command given, act like -h was given so vg_main.c prints out the
+ # usage string. And pass to 'exec' the name of any program -- it doesn't
+ # matter which -- because it won't be run anyway (we use 'true').
+ VG_ARGS="$VG_ARGS -h"
exec true
fi
|
|
From: Dirk M. <mu...@kd...> - 2003-11-04 11:49:39
|
CVS commit by mueller:
add a horrible kludge to fix "make dist"
M +1 -1 Makefile.am 1.55.2.1
M +1 -1 vg_startup.S 1.16.2.2
--- valgrind/coregrind/Makefile.am #1.55:1.55.2.1
@@ -7,5 +7,5 @@
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
-AM_CCASFLAGS = $(add_includes)
+AM_CCASFLAGS = -I$(top_builddir) -I$(top_srcdir) $(add_includes)
valdir = $(libdir)/valgrind
--- valgrind/coregrind/vg_startup.S #1.16.2.1:1.16.2.2
@@ -31,5 +31,5 @@
#include "vg_constants.h"
-#include "../config.h"
+#include "config.h"
|
|
From: Helio C. de C. <he...@co...> - 2003-11-04 12:32:34
|
CVS commit by helio: - Fix for kernel 2.6. __user need definition. M +3 -0 vg_intercept.c 1.18.2.2 --- valgrind/coregrind/vg_intercept.c #1.18.2.1:1.18.2.2 @@ -63,4 +63,7 @@ #include <sys/ipc.h> #include <sys/msg.h> +#ifdef KERNEL_2_6 +#include <linux/compiler.h> +#endif #include <asm/ipc.h> /* for ipc_kludge */ #include <sys/poll.h> |
|
From: Jeremy F. <je...@go...> - 2003-11-04 19:05:46
|
On Tue, 2003-11-04 at 04:32, Helio Chissini de Castro wrote: > CVS commit by helio: > > - Fix for kernel 2.6. __user need definition. Rather than adding yet another dependency on a kernel header file, wouldn't #define __user do the job? J |
|
From: Helio C. de C. <he...@co...> - 2003-11-04 12:50:28
|
CVS commit by helio: - Fix for kernel 2.6. __user need definition. M +3 -0 vg_unsafe.h 1.14.2.2 --- valgrind/coregrind/vg_unsafe.h #1.14.2.1:1.14.2.2 @@ -47,4 +47,7 @@ #include <net/if_arp.h> /* for struct arpreq */ #include <net/route.h> /* for struct rtentry */ +#ifdef KERNEL_2_6 +#include <linux/compiler.h> +#endif #include <asm/ipc.h> /* for struct ipc_kludge */ #include <linux/msg.h> /* for struct msgbuf */ |
|
From: Julian S. <js...@ac...> - 2003-11-04 22:30:04
|
CVS commit by jseward: Back out revs coregrind/vg_unsafe.h 1.42.2.2 coregrind/vg_intercept.c 1.18.2.2 We don't want dependencies on kernel headers, esp in the stable branch. Leave it in head for now; see if anybody yelps there. M +0 -3 vg_intercept.c 1.18.2.3 M +0 -3 vg_unsafe.h 1.14.2.3 --- valgrind/coregrind/vg_intercept.c #1.18.2.2:1.18.2.3 @@ -63,7 +63,4 @@ #include <sys/ipc.h> #include <sys/msg.h> -#ifdef KERNEL_2_6 -#include <linux/compiler.h> -#endif #include <asm/ipc.h> /* for ipc_kludge */ #include <sys/poll.h> --- valgrind/coregrind/vg_unsafe.h #1.14.2.2:1.14.2.3 @@ -47,7 +47,4 @@ #include <net/if_arp.h> /* for struct arpreq */ #include <net/route.h> /* for struct rtentry */ -#ifdef KERNEL_2_6 -#include <linux/compiler.h> -#endif #include <asm/ipc.h> /* for struct ipc_kludge */ #include <linux/msg.h> /* for struct msgbuf */ |
|
From: Dirk M. <mu...@kd...> - 2003-11-14 14:20:59
|
CVS commit by mueller:
its getting annoying.
M +4 -0 vg_ldt.c 1.10.2.1
--- valgrind/coregrind/vg_ldt.c #1.10:1.10.2.1
@@ -165,4 +165,8 @@ Addr VG_(do_useseg) ( UInt seg_selector,
that RPL=11b (least privilege). These form the bottom 3 bits
of the selector. */
+ if ((seg_selector & 7) != 7) {
+ VG_(message)(Vg_UserMsg, "Warning: NPTL active. did you forget to "
+ "export LD_ASSUME_KERNEL=2.2.5 ?" );
+ }
vg_assert((seg_selector & 7) == 7);
|
|
From: Nicholas N. <nj...@ca...> - 2003-11-15 19:25:01
|
CVS commit by nethercote:
Support posix_memalign properly.
M +4 -0 vg_replace_malloc.c 1.9.2.2
--- valgrind/coregrind/vg_replace_malloc.c #1.9.2.1:1.9.2.2
@@ -374,4 +374,8 @@ int __posix_memalign ( void **memptr, UI
}
+# define weak_alias(name, aliasname) \
+ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
+weak_alias(__posix_memalign, posix_memalign);
+
Int malloc_usable_size ( void* p )
{
|
|
From: Dirk M. <mu...@kd...> - 2003-11-19 00:57:16
|
CVS commit by mueller:
implement utimes, fstat64
M +23 -0 vg_syscalls.c 1.40.2.8
M +2 -1 vg_unsafe.h 1.14.2.4
--- valgrind/coregrind/vg_syscalls.c #1.40.2.7:1.40.2.8
@@ -3257,4 +3257,27 @@ void VG_(perform_assumed_nonblocking_sys
break;
+# if defined(__NR_statfs64)
+ case __NR_statfs64: /* syscall 268 */
+ /* int statfs64(const char *path, struct statfs64 *buf); */
+ MAYBE_PRINTF("statfs64 ( %s, %p )\n", arg1,arg2);
+ SYSCALL_TRACK( pre_mem_read_asciiz, tid, "statfs64(path)", arg1 );
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ VG_TRACK( post_mem_write,arg2, sizeof(struct statfs64) );
+ break;
+# endif
+
+# if defined(__NR_utimes)
+ case __NR_utimes: /* syscall 271 */
+ /* int utimes(const char *filename, struct timeval *tvp); */
+ MAYBE_PRINTF("utimes ( %p, %p )\n", arg1,arg2);
+ SYSCALL_TRACK( pre_mem_read_asciiz, tid, "utimes(filename)", arg1 );
+ if (arg2 != (UInt)NULL)
+ SYSCALL_TRACK( pre_mem_read, tid, "utimes(tvp)", arg2,
+ sizeof(struct timeval) );
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+# endif
+
case __NR_symlink: /* syscall 83 */
/* int symlink(const char *oldpath, const char *newpath); */
--- valgrind/coregrind/vg_unsafe.h #1.14.2.3:1.14.2.4
@@ -84,5 +84,6 @@
#include <sys/types.h>
-#include <sys/statfs.h>
+#include <asm/statfs.h>
+#undef statfs
#include <sys/sysinfo.h>
|
|
From: Dirk M. <mu...@kd...> - 2003-11-19 00:57:44
|
CVS commit by mueller:
raise sanity check to pass coreutils testsuite
M +2 -2 vg_main.c 1.110.2.4
--- valgrind/coregrind/vg_main.c #1.110.2.3:1.110.2.4
@@ -860,7 +860,7 @@ static void process_cmd_line_options ( v
sp --;
if (*sp == 0) break;
- if (++ctr >= 1000)
+ if (++ctr >= 2000)
args_grok_error(
- "suspiciously many (1000) env[] entries; giving up");
+ "suspiciously many (2000) env[] entries; giving up");
}
|
|
From: Dirk M. <mu...@kd...> - 2003-11-19 00:58:29
|
CVS commit by mueller:
be more silent by default
M +4 -3 vg_symtab2.c 1.48.2.3
--- valgrind/coregrind/vg_symtab2.c #1.48.2.2:1.48.2.3
@@ -2300,4 +2300,5 @@ void VG_(unload_symbols) ( Addr start, U
return;
+ if (VG_(clo_verbosity) > 0)
VG_(message)(Vg_UserMsg,
"discard syms in %s due to munmap()",
|
|
From: Nicholas N. <nj...@ca...> - 2003-11-27 09:29:09
|
CVS commit by nethercote:
Added some missing instructions, from HEAD:
SCAS{l,w}
REPE SCAS
CVTPD2PS
MOV imm,eSP
M +75 -3 vg_to_ucode.c 1.87.2.11
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.10:1.87.2.11
@@ -1916,4 +1916,54 @@ void codegen_REPNE_SCAS ( UCodeBlock* cb
}
+/* Template for REPE SCAS<sz>. Assumes this insn is the last one in
+ the basic block, and so emits a jump to the next insn. */
+static
+void codegen_REPE_SCAS ( UCodeBlock* cb, Int sz, Addr eip, Addr eip_next )
+{
+ Int ta /* EAX */, tc /* ECX */, td /* EDI */, tv;
+ ta = newTemp(cb);
+ tc = newTemp(cb);
+ tv = newTemp(cb);
+ td = newTemp(cb);
+
+ uInstr2(cb, GET, 4, ArchReg, R_ECX, TempReg, tc);
+ uInstr2(cb, JIFZ, 4, TempReg, tc, Literal, 0);
+ uLiteral(cb, eip_next);
+ uInstr1(cb, DEC, 4, TempReg, tc);
+ uInstr2(cb, PUT, 4, TempReg, tc, ArchReg, R_ECX);
+
+ uInstr2(cb, GET, sz, ArchReg, R_EAX, TempReg, ta);
+ uInstr2(cb, GET, 4, ArchReg, R_EDI, TempReg, td);
+ uInstr2(cb, LOAD, sz, TempReg, td, TempReg, tv);
+ /* next uinstr kills ta, but that's ok -- don't need it again */
+ uInstr2(cb, SUB, sz, TempReg, tv, TempReg, ta);
+ setFlagsFromUOpcode(cb, SUB);
+
+ uInstr0(cb, CALLM_S, 0);
+ uInstr2(cb, MOV, 4, Literal, 0, TempReg, tv);
+ uLiteral(cb, 0);
+ uInstr1(cb, PUSH, 4, TempReg, tv);
+
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_get_dirflag));
+ uFlagsRWU(cb, FlagD, FlagsEmpty, FlagsEmpty);
+
+ uInstr1(cb, POP, 4, TempReg, tv);
+ uInstr0(cb, CALLM_E, 0);
+
+ if (sz == 4 || sz == 2) {
+ uInstr2(cb, SHL, 4, Literal, 0, TempReg, tv);
+ uLiteral(cb, sz/2);
+ }
+ uInstr2(cb, ADD, 4, TempReg, tv, TempReg, td);
+ uInstr2(cb, PUT, 4, TempReg, td, ArchReg, R_EDI);
+ uInstr1(cb, JMP, 0, Literal, 0);
+ uLiteral(cb, eip);
+ uCond(cb, CondZ);
+ uFlagsRWU(cb, FlagsOSZACP, FlagsEmpty, FlagsEmpty);
+ uInstr1(cb, JMP, 0, Literal, 0);
+ uLiteral(cb, eip_next);
+ uCond(cb, CondAlways);
+}
+
/* Template for REPE MOVS<sz>. Assumes this insn is the last one in
@@ -2157,5 +2207,5 @@ void codegen_LODS ( UCodeBlock* cb, Int
-/* Template for REPNE SCAS<sz>, _not_ preceded by a REP prefix. */
+/* Template for SCAS<sz>, _not_ preceded by a REP prefix. */
static
void codegen_SCAS ( UCodeBlock* cb, Int sz )
@@ -4743,4 +4793,12 @@ static Addr disInstr ( UCodeBlock* cb, A
}
+ /* CVTPD2PS -- convert two doubles to two floats. */
+ if (sz == 2 &&
+ insn[0] == 0x0F && insn[1] == 0x5A) {
+ eip = dis_SSE3_reg_or_mem ( cb, sorb, eip+2, 16, "cvtpd2ps",
+ 0x66, insn[0], insn[1] );
+ goto decode_success;
+ }
+
/* SQRTPD: square root of packed double. */
if (sz == 2
@@ -5202,4 +5260,5 @@ static Addr disInstr ( UCodeBlock* cb, A
case 0xBA: /* MOV imm,eDX */
case 0xBB: /* MOV imm,eBX */
+ case 0xBC: /* MOV imm,eSP */
case 0xBD: /* MOV imm,eBP */
case 0xBE: /* MOV imm,eSI */
@@ -5711,4 +5770,10 @@ static Addr disInstr ( UCodeBlock* cb, A
break;
+ case 0xAF: /* SCASl, no REP prefix */
+ vg_assert(sorb == 0);
+ codegen_SCAS ( cb, sz );
+ if (dis) VG_(printf)("scas;\n");
+ break;
+
case 0xFC: /* CLD */
uInstr0(cb, CALLM_S, 0);
@@ -5786,4 +5851,11 @@ static Addr disInstr ( UCodeBlock* cb, A
*isEnd = True;
if (dis) VG_(printf)("repe stos%c\n", nameISize(sz));
+ }
+ else
+ if (abyte == 0xAE || abyte == 0xAF) { /* REPE SCAS<sz> */
+ if (abyte == 0xAE) sz = 1;
+ codegen_REPE_SCAS ( cb, sz, eip_orig, eip );
+ *isEnd = True;
+ if (dis) VG_(printf)("repe scas%c\n", nameISize(sz));
}
else
|
|
From: Dirk M. <mu...@kd...> - 2003-11-28 00:17:42
|
CVS commit by mueller:
fix posix memalign alignment check.
M +2 -2 vg_replace_malloc.c 1.9.2.3
--- valgrind/coregrind/vg_replace_malloc.c #1.9.2.2:1.9.2.3
@@ -359,7 +359,7 @@ int __posix_memalign ( void **memptr, UI
void *mem;
- /* Test whether the SIZE argument is valid. It must be a power of
+ /* Test whether the alignment argument is valid. It must be a power of
two multiple of sizeof (void *). */
- if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0)
+ if (alignment % sizeof (void *) != 0 || (alignment & (alignment - 1)) != 0)
return VKI_EINVAL /*22*/ /*EINVAL*/;
|
|
From: Nicholas N. <nj...@ca...> - 2003-11-28 09:44:27
|
CVS commit by nethercote:
Added support for LOOP{E,NE}
M +9 -1 vg_to_ucode.c 1.87.2.12
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.11:1.87.2.12
@@ -5136,4 +5136,6 @@ static Addr disInstr ( UCodeBlock* cb, A
break;
+ case 0xE0: /* LOOPNE disp8 */
+ case 0xE1: /* LOOPE disp8 */
case 0xE2: /* LOOP disp8 */
/* Again, the docs say this uses ECX/CX as a count depending on
@@ -5148,4 +5150,10 @@ static Addr disInstr ( UCodeBlock* cb, A
uInstr2(cb, JIFZ, 4, TempReg, t1, Literal, 0);
uLiteral(cb, eip);
+ if (opc == 0xE0 || opc == 0xE1) { /* LOOPE/LOOPNE */
+ uInstr1(cb, JMP, 0, Literal, 0);
+ uLiteral(cb, eip);
+ uCond(cb, (opc == 0xE1 ? CondNZ : CondZ));
+ uFlagsRWU(cb, FlagsOSZACP, FlagsEmpty, FlagsEmpty);
+ }
uInstr1(cb, JMP, 0, Literal, 0);
uLiteral(cb, d32);
|
|
From: Nicholas N. <nj...@ca...> - 2003-12-01 14:01:55
|
CVS commit by nethercote:
Add gettid() syscall.
M +8 -0 vg_syscalls.c 1.40.2.10
--- valgrind/coregrind/vg_syscalls.c #1.40.2.9:1.40.2.10
@@ -1646,4 +1646,12 @@ void VG_(perform_assumed_nonblocking_sys
break;
+#if defined(__NR_gettid)
+ case __NR_gettid: /* syscall 224 */
+ /* pid_t gettid(void); */
+ MAYBE_PRINTF("gettid ()\n");
+ KERNEL_DO_SYSCALL(tid, res);
+ break;
+#endif
+
case __NR_getpgid: /* syscall 132 */
/* pid_t getpgid(pid_t pid); */
|
|
From: Nicholas N. <nj...@ca...> - 2003-12-02 09:35:06
|
CVS commit by nethercote:
Backing out bogus support for gettid() I added yesterday.
M +0 -8 vg_syscalls.c 1.40.2.11
--- valgrind/coregrind/vg_syscalls.c #1.40.2.10:1.40.2.11
@@ -1646,12 +1646,4 @@ void VG_(perform_assumed_nonblocking_sys
break;
-#if defined(__NR_gettid)
- case __NR_gettid: /* syscall 224 */
- /* pid_t gettid(void); */
- MAYBE_PRINTF("gettid ()\n");
- KERNEL_DO_SYSCALL(tid, res);
- break;
-#endif
-
case __NR_getpgid: /* syscall 132 */
/* pid_t getpgid(pid_t pid); */
|
|
From: Nicholas N. <nj...@ca...> - 2003-12-02 15:26:22
|
CVS commit by nethercote:
Patch from Tom Hughes:
This patch extends the SFENCE support that is already present to include
support for LFENCE and MFENCE as well. It also stops CLFLUSH being mistaken
for SFENCE by checking the top two bits of the MODRM byte.
MERGE TO HEAD
M +5 -3 vg_to_ucode.c 1.87.2.13
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.12:1.87.2.13
@@ -3791,7 +3791,9 @@ static Addr disInstr ( UCodeBlock* cb, A
}
- /* SFENCE -- flush all pending store operations to memory */
+ /* LFENCE/MFENCE/SFENCE -- flush pending operations to memory */
if (insn[0] == 0x0F && insn[1] == 0xAE
- && (gregOfRM(insn[2]) == 7)) {
+ && (epartIsReg(insn[2]))
+ && (gregOfRM(insn[2]) >= 5 && gregOfRM(insn[2]) <= 7))
+ {
vg_assert(sz == 4);
eip += 3;
|
|
From: Dirk M. <mu...@kd...> - 2003-12-07 23:12:35
|
CVS commit by mueller:
fix stupid typo
M +2 -2 vg_syscalls.c 1.40.2.12
--- valgrind/coregrind/vg_syscalls.c #1.40.2.11:1.40.2.12
@@ -2390,5 +2390,5 @@ void VG_(perform_assumed_nonblocking_sys
arg3, sizeof(struct rtc_time));
KERNEL_DO_SYSCALL(tid,res);
- if (!VG_(is_kerror) && res == 0)
+ if (!VG_(is_kerror)(res) && res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct rtc_time));
break;
@@ -2402,5 +2402,5 @@ void VG_(perform_assumed_nonblocking_sys
sizeof(unsigned long));
KERNEL_DO_SYSCALL(tid,res);
- if(!VG_(is_kerror) && res == 0)
+ if(!VG_(is_kerror)(res) && res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:46:01
|
CVS commit by mueller:
backport shufpd support
M +7 -0 vg_to_ucode.c 1.87.2.14
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.13:1.87.2.14
@@ -3961,4 +3961,11 @@ static Addr disInstr ( UCodeBlock* cb, A
}
+ /* SHUFPD */
+ if (sz == 2 && insn[0] == 0x0F && insn[1] == 0xC6) {
+ eip = dis_SSE3_reg_or_mem_Imm8 ( cb, sorb, eip+2, 16, "shufpd",
+ 0x66, insn[0], insn[1] );
+ goto decode_success;
+ }
+
/* SHUFPS */
if (insn[0] == 0x0F && insn[1] == 0xC6) {
|