rpms/valgrind/devel valgrind-3.1.1-robust-list.patch, NONE, 1.1 valgrind-3.1.1-syscall-updates2.patch, NONE, 1.1 valgrind.spec, 1.31, 1.32
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri May 26 16:28:45 UTC 2006
Author: jakub
Update of /cvs/dist/rpms/valgrind/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32252
Modified Files:
valgrind.spec
Added Files:
valgrind-3.1.1-robust-list.patch
valgrind-3.1.1-syscall-updates2.patch
Log Message:
3.1.1-3
valgrind-3.1.1-robust-list.patch:
0 files changed
--- NEW FILE valgrind-3.1.1-robust-list.patch ---
--- valgrind-3.1.1/include/vki-linux.h (revision 5904)
+++ valgrind-3.1.1/include/vki-linux.h (revision 5905)
@@ -1126,6 +1126,37 @@ struct vki_seminfo {
#define VKI_FUTEX_REQUEUE (3)
#define VKI_FUTEX_CMP_REQUEUE (4)
+struct vki_robust_list {
+ struct vki_robust_list __user *next;
+};
+
+struct vki_robust_list_head {
+ /*
+ * The head of the list. Points back to itself if empty:
+ */
+ struct vki_robust_list list;
+
+ /*
+ * This relative offset is set by user-space, it gives the kernel
+ * the relative position of the futex field to examine. This way
+ * we keep userspace flexible, to freely shape its data-structure,
+ * without hardcoding any particular offset into the kernel:
+ */
+ long futex_offset;
+
+ /*
+ * The death of the thread may race with userspace setting
+ * up a lock's links. So to handle this race, userspace first
+ * sets this field to the address of the to-be-taken lock,
+ * then does the lock acquire, and then adds itself to the
+ * list, and then clears this field. Hence the kernel will
+ * always have full knowledge of all locks that the thread
+ * _might_ have taken. We check the owner TID in any case,
+ * so only truly owned locks will be handled.
+ */
+ struct vki_robust_list __user *list_op_pending;
+};
+
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/errno.h
//----------------------------------------------------------------------
--- valgrind-3.1.1/coregrind/m_syswrap/syswrap-linux.c (revision 5904)
+++ valgrind-3.1.1/coregrind/m_syswrap/syswrap-linux.c (revision 5905)
@@ -799,6 +799,37 @@ POST(sys_futex)
}
}
+PRE(sys_set_robust_list)
+{
+ PRINT("sys_set_robust_list ( %p, %d )", ARG1,ARG2);
+ PRE_REG_READ2(long, "set_robust_list",
+ struct vki_robust_list_head *, head, vki_size_t, len);
+
+ /* Just check the robust_list_head structure is readable - don't
+ try and chase the list as the kernel will only read it when
+ the thread exits so the current contents is irrelevant. */
+ if (ARG1 != 0)
+ PRE_MEM_READ("set_robust_list(head)", ARG1, ARG2);
+}
+
+PRE(sys_get_robust_list)
+{
+ PRINT("sys_get_robust_list ( %d, %p, %d )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "get_robust_list",
+ int, pid,
+ struct vki_robust_list_head **, head_ptr,
+ vki_size_t *, len_ptr);
+ PRE_MEM_WRITE("get_robust_list(head_ptr)",
+ ARG2, sizeof(struct vki_robust_list_head *));
+ PRE_MEM_WRITE("get_robust_list(len_ptr)",
+ ARG3, sizeof(struct vki_size_t *));
+}
+POST(sys_get_robust_list)
+{
+ POST_MEM_WRITE(ARG2, sizeof(struct vki_robust_list_head *));
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_size_t *));
+}
+
PRE(sys_pselect6)
{
*flags |= SfMayBlock;
--- valgrind-3.1.1/coregrind/m_syswrap/priv_syswrap-linux.h (revision 5904)
+++ valgrind-3.1.1/coregrind/m_syswrap/priv_syswrap-linux.h (revision 5905)
@@ -74,6 +74,8 @@ DECL_TEMPLATE(linux, sys_prctl);
DECL_TEMPLATE(linux, sys_sendfile);
DECL_TEMPLATE(linux, sys_sendfile64);
DECL_TEMPLATE(linux, sys_futex);
+DECL_TEMPLATE(linux, sys_set_robust_list);
+DECL_TEMPLATE(linux, sys_get_robust_list);
DECL_TEMPLATE(linux, sys_pselect6);
DECL_TEMPLATE(linux, sys_ppoll);
--- valgrind-3.1.1/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 5904)
+++ valgrind-3.1.1/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 5905)
@@ -1328,6 +1328,8 @@ const SyscallTableEntry ML_(syscall_tabl
// LINX_(__NR_pselect6, sys_ni_syscall), // 270
// LINXY(__NR_ppoll, sys_ni_syscall), // 271
// LINX_(__NR_unshare, sys_unshare), // 272
+ LINX_(__NR_set_robust_list, sys_set_robust_list), // 273
+ LINXY(__NR_get_robust_list, sys_get_robust_list), // 274
};
const UInt ML_(syscall_table_size) =
--- valgrind-3.1.1/coregrind/m_syswrap/syswrap-x86-linux.c (revision 5904)
+++ valgrind-3.1.1/coregrind/m_syswrap/syswrap-x86-linux.c (revision 5905)
@@ -2172,6 +2172,8 @@ const SyscallTableEntry ML_(syscall_tabl
LINXY(__NR_ppoll, sys_ppoll), // 309
// LINX_(__NR_unshare, sys_unshare), // 310
+ LINX_(__NR_set_robust_list, sys_set_robust_list), // 311
+ LINXY(__NR_get_robust_list, sys_get_robust_list), // 312
};
const UInt ML_(syscall_table_size) =
valgrind-3.1.1-syscall-updates2.patch:
m_syswrap/syswrap-ppc32-linux.c | 30 ++++++++++++++++++++++++++++++
vki_unistd-amd64-linux.h | 9 ++++++++-
vki_unistd-ppc32-linux.h | 18 +++++++++++++++++-
vki_unistd-x86-linux.h | 9 ++++++++-
4 files changed, 63 insertions(+), 3 deletions(-)
--- NEW FILE valgrind-3.1.1-syscall-updates2.patch ---
--- valgrind-3.1.1/coregrind/m_syswrap/syswrap-ppc32-linux.c.jj3 2006-05-26 12:20:57.000000000 -0400
+++ valgrind-3.1.1/coregrind/m_syswrap/syswrap-ppc32-linux.c 2006-05-26 12:25:33.000000000 -0400
@@ -386,6 +386,7 @@ DECL_TEMPLATE(ppc32_linux, sys_mmap);
DECL_TEMPLATE(ppc32_linux, sys_mmap2);
DECL_TEMPLATE(ppc32_linux, sys_stat64);
DECL_TEMPLATE(ppc32_linux, sys_lstat64);
+DECL_TEMPLATE(ppc32_linux, sys_fstatat64);
DECL_TEMPLATE(ppc32_linux, sys_fstat64);
DECL_TEMPLATE(ppc32_linux, sys_ipc);
DECL_TEMPLATE(ppc32_linux, sys_clone);
@@ -719,6 +720,20 @@ POST(sys_lstat64)
}
}
+PRE(sys_fstatat64)
+{
+ PRINT("sys_fstatat64 ( %d, %p(%s), %p )",ARG1,ARG2,ARG2,ARG3);
+ PRE_REG_READ3(long, "fstatat64",
+ int, dfd, char *, file_name, struct stat64 *, buf);
+ PRE_MEM_RASCIIZ( "fstatat64(file_name)", ARG2 );
+ PRE_MEM_WRITE( "fstatat64(buf)", ARG3, sizeof(struct vki_stat64) );
+}
+
+POST(sys_fstatat64)
+{
+ POST_MEM_WRITE( ARG3, sizeof(struct vki_stat64) );
+}
+
PRE(sys_fstat64)
{
PRINT("sys_fstat64 ( %d, %p )",ARG1,ARG2);
@@ -1798,6 +1813,21 @@ const SyscallTableEntry ML_(syscall_tabl
LINX_(__NR_inotify_init, sys_inotify_init), // 275
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 276
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 277
+
+ LINXY(__NR_openat, sys_openat), // 286
+ LINX_(__NR_mkdirat, sys_mkdirat), // 287
+ LINX_(__NR_mknodat, sys_mknodat), // 288
+ LINX_(__NR_fchownat, sys_fchownat), // 289
+ LINX_(__NR_futimesat, sys_futimesat), // 290
+ PLAXY(__NR_fstatat64, sys_fstatat64), // 291
+ LINX_(__NR_unlinkat, sys_unlinkat), // 292
+ LINX_(__NR_renameat, sys_renameat), // 293
+ LINX_(__NR_linkat, sys_linkat), // 294
+ LINX_(__NR_symlinkat, sys_symlinkat), // 295
+ LINX_(__NR_readlinkat, sys_readlinkat), // 296
+ LINX_(__NR_fchmodat, sys_fchmodat), // 297
+ LINX_(__NR_faccessat, sys_faccessat), // 298
+
};
const UInt ML_(syscall_table_size) =
--- valgrind-3.1.1/coregrind/vki_unistd-amd64-linux.h.jj3 2006-05-26 12:20:48.000000000 -0400
+++ valgrind-3.1.1/coregrind/vki_unistd-amd64-linux.h 2006-05-26 12:22:10.000000000 -0400
@@ -348,5 +348,12 @@
#define __NR_faccessat 269
#define __NR_pselect6 270
#define __NR_ppoll 271
-
+#define __NR_unshare 272
+#define __NR_set_robust_list 273
+#define __NR_get_robust_list 274
+#define __NR_splice 275
+#define __NR_tee 276
+#define __NR_sync_file_range 277
+#define __NR_vmsplice 278
+
#endif /* __VKI_UNISTD_AMD64_LINUX_H */
--- valgrind-3.1.1/coregrind/vki_unistd-ppc32-linux.h.jj3 2006-02-28 08:12:26.000000000 -0500
+++ valgrind-3.1.1/coregrind/vki_unistd-ppc32-linux.h 2006-05-26 12:23:43.000000000 -0400
@@ -319,7 +319,23 @@
#define __NR_pselect6 280
#define __NR_ppoll 281
#define __NR_unshare 282
+#define __NR_splice 283
+#define __NR_tee 284
+#define __NR_vmsplice 285
+#define __NR_openat 286
+#define __NR_mkdirat 287
+#define __NR_mknodat 288
+#define __NR_fchownat 289
+#define __NR_futimesat 290
+#define __NR_fstatat64 291
+#define __NR_unlinkat 292
+#define __NR_renameat 293
+#define __NR_linkat 294
+#define __NR_symlinkat 295
+#define __NR_readlinkat 296
+#define __NR_fchmodat 297
+#define __NR_faccessat 298
-#define __NR_syscalls 283
+#define __NR_syscalls 299
#endif /* __VKI_UNISTD_PPC32_LINUX_H */
--- valgrind-3.1.1/coregrind/vki_unistd-x86-linux.h.jj3 2006-05-26 12:20:48.000000000 -0400
+++ valgrind-3.1.1/coregrind/vki_unistd-x86-linux.h 2006-05-26 12:24:30.000000000 -0400
@@ -339,5 +339,12 @@
#define __NR_faccessat 307
#define __NR_pselect6 308
#define __NR_ppoll 309
-
+#define __NR_unshare 310
+#define __NR_set_robust_list 311
+#define __NR_get_robust_list 312
+#define __NR_splice 313
+#define __NR_sync_file_range 314
+#define __NR_tee 315
+#define __NR_vmsplice 316
+
#endif /* __VKI_UNISTD_X86_LINUX_H */
Index: valgrind.spec
===================================================================
RCS file: /cvs/dist/rpms/valgrind/devel/valgrind.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- valgrind.spec 13 Apr 2006 11:33:18 -0000 1.31
+++ valgrind.spec 26 May 2006 16:28:42 -0000 1.32
@@ -1,7 +1,7 @@
Summary: Tool for finding memory management bugs in programs
Name: valgrind
Version: 3.1.1
-Release: 2
+Release: 3
Epoch: 1
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
Patch1: valgrind-3.1.1-valgrind_h.patch
@@ -10,10 +10,16 @@
Patch4: valgrind-3.1.1-glibc24.patch
Patch5: valgrind-3.1.1-syscall-updates-from-trunk.patch
Patch6: valgrind-3.1.1-syscall-updates.patch
+Patch7: valgrind-3.1.1-robust-list.patch
+Patch8: valgrind-3.1.1-syscall-updates2.patch
License: GPL
URL: http://www.valgrind.org/
Group: Development/Debuggers
BuildRoot: %{_tmppath}/%{name}-root
+%ifarch x86_64
+# Ensure glibc{,-devel} is installed for both multilib arches
+BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
+%endif
ExclusiveArch: %{ix86} x86_64 ppc
# Disable build root strip policy
@@ -38,6 +44,8 @@
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
%ifarch x86_64
@@ -116,6 +124,12 @@
%{_mandir}/man1/valgrind*
%changelog
+* Fri May 26 2006 Jakub Jelinek <jakub at redhat.com> 3.1.1-3
+- handle [sg]et_robust_list syscalls on i?86/x86_64
+- handle *at syscalls on ppc
+- ensure on x86_64 both 32-bit and 64-bit glibc{,-devel} are
+ installed in the buildroot (#191820)
+
* Wed Apr 12 2006 Jakub Jelinek <jakub at redhat.com> 3.1.1-2
- handle many syscalls that were unhandled before, especially on ppc
More information about the fedora-cvs-commits
mailing list