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
|
2
|
3
|
4
|
|
5
(2) |
6
|
7
(1) |
8
(1) |
9
|
10
(1) |
11
|
|
12
(3) |
13
(3) |
14
(3) |
15
(4) |
16
(3) |
17
|
18
(3) |
|
19
(1) |
20
(1) |
21
(3) |
22
|
23
|
24
(1) |
25
(3) |
|
26
|
27
(2) |
28
(10) |
29
|
30
(2) |
31
(2) |
|
|
From: Mark W. <ma...@so...> - 2019-05-05 14:24:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=bd27ad3ff31555484b7fdb310c4b033620882e44 commit bd27ad3ff31555484b7fdb310c4b033620882e44 Author: Mark Wielaard <ma...@kl...> Date: Sun May 5 16:01:41 2019 +0200 Hook linux copy_file_range syscall on arm. Diff: --- coregrind/m_syswrap/syswrap-arm-linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index 9f1bdab..9ba0665 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1016,6 +1016,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_getrandom, sys_getrandom), // 384 LINXY(__NR_memfd_create, sys_memfd_create), // 385 + LINX_(__NR_copy_file_range, sys_copy_file_range), // 391 + LINXY(__NR_statx, sys_statx), // 397 }; |
|
From: Mark W. <ma...@so...> - 2019-05-05 13:41:21
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5f00db054a6f59502e9deeeb59ace2261207ee31 commit 5f00db054a6f59502e9deeeb59ace2261207ee31 Author: Alexandra Hajkova <aha...@re...> Date: Thu May 2 08:24:02 2019 -0400 Add support for the copy_file_range syscall Support amd64, x86, arm64, ppc64, ppc32 and s390x architectures. Also add sys-copy_file_range test case. Diff: --- NEWS | 1 + configure.ac | 3 + coregrind/m_syswrap/priv_syswrap-linux.h | 1 + coregrind/m_syswrap/syswrap-amd64-linux.c | 2 + coregrind/m_syswrap/syswrap-arm64-linux.c | 2 +- coregrind/m_syswrap/syswrap-linux.c | 30 ++++++++++ coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 + coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 + coregrind/m_syswrap/syswrap-s390x-linux.c | 2 + coregrind/m_syswrap/syswrap-x86-linux.c | 2 + memcheck/tests/linux/Makefile.am | 5 ++ memcheck/tests/linux/sys-copy_file_range.c | 67 ++++++++++++++++++++++ .../tests/linux/sys-copy_file_range.stderr.exp | 21 +++++++ memcheck/tests/linux/sys-copy_file_range.vgtest | 2 + 14 files changed, 141 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4b5e044..5cbf336 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,7 @@ To see details of a given bug, visit where XXXXXX is the bug number as listed below. 406561 mcinfcallWSRU gdbserver_test fails on ppc64 +407218 Add support for the copy_file_range syscall n-i-bz Fix minor one time leaks in dhat. n-i-bz Add --run-cxx-freeres=no in outer args to avoid inner crashes. diff --git a/configure.ac b/configure.ac index d043ce3..3528925 100755 --- a/configure.ac +++ b/configure.ac @@ -4172,6 +4172,7 @@ AC_CHECK_FUNCS([ \ utimensat \ process_vm_readv \ process_vm_writev \ + copy_file_range \ ]) # AC_CHECK_LIB adds any library found to the variable LIBS, and links these @@ -4187,6 +4188,8 @@ AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK], [test x$ac_cv_func_pthread_spin_lock = xyes]) AM_CONDITIONAL([HAVE_PTHREAD_SETNAME_NP], [test x$ac_cv_func_pthread_setname_np = xyes]) +AM_CONDITIONAL([HAVE_COPY_FILE_RANGE], + [test x$ac_cv_func_copy_file_range = xyes]) if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX ; then diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index f76191a..1edf9eb 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -379,6 +379,7 @@ DECL_TEMPLATE(linux, sys_getsockname); DECL_TEMPLATE(linux, sys_getpeername); DECL_TEMPLATE(linux, sys_socketpair); DECL_TEMPLATE(linux, sys_kcmp); +DECL_TEMPLATE(linux, sys_copy_file_range); // Some arch specific functions called from syswrap-linux.c extern Int do_syscall_clone_x86_linux ( Word (*fn)(void *), diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 30e7d0e..0c1d8d1 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -863,6 +863,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_statx, sys_statx), // 332 LINX_(__NR_membarrier, sys_membarrier), // 324 + + LINX_(__NR_copy_file_range, sys_copy_file_range), // 326 }; SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index 290320a..f66be2d 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -819,7 +819,7 @@ static SyscallTableEntry syscall_main_table[] = { // (__NR_userfaultfd, sys_ni_syscall), // 282 LINX_(__NR_membarrier, sys_membarrier), // 283 // (__NR_mlock2, sys_ni_syscall), // 284 - // (__NR_copy_file_range, sys_ni_syscall), // 285 + LINX_(__NR_copy_file_range, sys_copy_file_range), // 285 // (__NR_preadv2, sys_ni_syscall), // 286 // (__NR_pwritev2, sys_ni_syscall), // 287 // (__NR_pkey_mprotect, sys_ni_syscall), // 288 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 73ef98d..cd0ee74 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -12093,6 +12093,36 @@ POST(sys_bpf) } } +PRE(sys_copy_file_range) +{ + PRINT("sys_copy_file_range (%lu, %lu, %lu, %lu, %lu, %lu)", ARG1, ARG2, ARG3, + ARG4, ARG5, ARG6); + + PRE_REG_READ6(vki_size_t, "copy_file_range", + int, "fd_in", + vki_loff_t *, "off_in", + int, "fd_out", + vki_loff_t *, "off_out", + vki_size_t, "len", + unsigned int, "flags"); + + /* File descriptors are "specially" tracked by valgrind. + valgrind itself uses some, so make sure someone didn't + put in one of our own... */ + if (!ML_(fd_allowed)(ARG1, "copy_file_range(fd_in)", tid, False) || + !ML_(fd_allowed)(ARG3, "copy_file_range(fd_in)", tid, False)) { + SET_STATUS_Failure( VKI_EBADF ); + } else { + /* Now see if the offsets are defined. PRE_MEM_READ will + double check it can dereference them. */ + if (ARG2 != 0) + PRE_MEM_READ( "copy_file_range(off_in)", ARG2, sizeof(vki_loff_t)); + if (ARG4 != 0) + PRE_MEM_READ( "copy_file_range(off_out)", ARG4, sizeof(vki_loff_t)); + } +} + + #undef PRE #undef POST diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index f812f1f..71f208d 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1021,6 +1021,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_getrandom, sys_getrandom), // 359 LINXY(__NR_memfd_create, sys_memfd_create), // 360 + LINX_(__NR_copy_file_range, sys_copy_file_range), // 379 + LINXY(__NR_statx, sys_statx), // 383 }; diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index eada099..1a42c1f 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1007,6 +1007,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_membarrier, sys_membarrier), // 365 + LINX_(__NR_copy_file_range, sys_copy_file_range), // 379 + LINXY(__NR_statx, sys_statx), // 383 }; diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index ad78384..41ada8d 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -854,6 +854,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_recvmsg, sys_recvmsg), // 372 LINX_(__NR_shutdown, sys_shutdown), // 373 + LINX_(__NR_copy_file_range, sys_copy_file_range), // 375 + LINXY(__NR_statx, sys_statx), // 379 }; diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index f05619e..f8d97ea 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1608,6 +1608,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_membarrier, sys_membarrier), // 375 + LINX_(__NR_copy_file_range, sys_copy_file_range), // 377 + LINXY(__NR_statx, sys_statx), // 383 /* Explicitly not supported on i386 yet. */ diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index d7515d9..00e99a5 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -20,6 +20,7 @@ EXTRA_DIST = \ stack_switch.stderr.exp stack_switch.vgtest \ syscalls-2007.vgtest syscalls-2007.stderr.exp \ syslog-syscall.vgtest syslog-syscall.stderr.exp \ + sys-copy_file_range.vgtest sys-copy_file_range.stderr.exp \ sys-openat.vgtest sys-openat.stderr.exp sys-openat.stdout.exp \ sys-statx.vgtest sys-statx.stderr.exp \ timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ @@ -49,6 +50,10 @@ if HAVE_AT_FDCWD check_PROGRAMS += sys-openat endif +if HAVE_COPY_FILE_RANGE + check_PROGRAMS += sys-copy_file_range +endif + AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/memcheck/tests/linux/sys-copy_file_range.c b/memcheck/tests/linux/sys-copy_file_range.c new file mode 100644 index 0000000..83981c6 --- /dev/null +++ b/memcheck/tests/linux/sys-copy_file_range.c @@ -0,0 +1,67 @@ +#define _GNU_SOURCE +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <sys/syscall.h> +#include <unistd.h> + +int main(int argc, char **argv) +{ + int fd_in, fd_out; + struct stat stat; + loff_t len, ret; + + fd_in = open("copy_file_range_source", O_CREAT | O_RDWR); + if (fd_in == -1) { + perror("open copy_file_range_source"); + exit(EXIT_FAILURE); + } + + if (write(fd_in, "foo bar\n", 8) != 8) { + perror("writing to the copy_file_range_source"); + exit(EXIT_FAILURE); + } + lseek(fd_in, 0, SEEK_SET); + + if (fstat(fd_in, &stat) == -1) { + perror("fstat"); + exit(EXIT_FAILURE); + } + + len = stat.st_size; + + fd_out = open("copy_file_range_dest", O_CREAT | O_WRONLY | O_TRUNC, 0644); + if (fd_out == -1) { + perror("open copy_file_range_dest"); + exit(EXIT_FAILURE); + } + + /* Check copy_file_range called with the correct arguments works. */ + do { + ret = copy_file_range(fd_in, NULL, fd_out, NULL, len, 0); + if (ret == -1) { + perror("copy_file_range"); + exit(EXIT_FAILURE); + } + + len -= ret; + } while (len > 0); + + /* Check valgrind will produce expected warnings for the + various wrong arguments. */ + do { + void *t; + void *z = (void *) -1; + + ret = copy_file_range(fd_in, t, fd_out, NULL, len, 0); + ret = copy_file_range(fd_in, NULL, fd_out, z, len, 0); + ret = copy_file_range(- 1, NULL, - 1, NULL, len, 0); + } while (0); + + close(fd_in); + close(fd_out); + unlink("copy_file_range_source"); + unlink("copy_file_range_dest"); + exit(EXIT_SUCCESS); +} diff --git a/memcheck/tests/linux/sys-copy_file_range.stderr.exp b/memcheck/tests/linux/sys-copy_file_range.stderr.exp new file mode 100644 index 0000000..1aa4dc2 --- /dev/null +++ b/memcheck/tests/linux/sys-copy_file_range.stderr.exp @@ -0,0 +1,21 @@ + +Syscall param copy_file_range("off_in") contains uninitialised byte(s) + ... + by 0x........: main (sys-copy_file_range.c:57) + +Syscall param copy_file_range(off_out) points to unaddressable byte(s) + ... + by 0x........: main (sys-copy_file_range.c:58) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Warning: invalid file descriptor -1 in syscall copy_file_range(fd_in)() + +HEAP SUMMARY: + in use at exit: 0 bytes in 0 blocks + total heap usage: 0 allocs, 0 frees, 0 bytes allocated + +For a detailed leak analysis, rerun with: --leak-check=full + +Use --track-origins=yes to see where uninitialised values come from +For lists of detected and suppressed errors, rerun with: -s +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/linux/sys-copy_file_range.vgtest b/memcheck/tests/linux/sys-copy_file_range.vgtest new file mode 100644 index 0000000..b7741e8 --- /dev/null +++ b/memcheck/tests/linux/sys-copy_file_range.vgtest @@ -0,0 +1,2 @@ +prereq: test -e sys-copy_file_range +prog: sys-copy_file_range |