|
From: Mark W. <ma...@so...> - 2022-03-21 11:57:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=957339db27f7d1603a7217a0f891d91d204d64aa commit 957339db27f7d1603a7217a0f891d91d204d64aa Author: Mark Wielaard <ma...@kl...> Date: Sat Mar 19 01:06:40 2022 +0100 bpf attr->raw_tracepoint.name may be NULL for BPF_RAW_TRACEPOINT_OPEN. For BPF_RAW_TRACEPOINT_OPEN attr->raw_tracepoint.name may be NULL. Otherwise it should point to a valid (max 128 char) string. Only raw_tracepoint.prog_fd needs to be set. https://bugs.kde.org/show_bug.cgi?id=451626 Diff: --- NEWS | 1 + coregrind/m_syswrap/syswrap-linux.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 8ed4898aab..404467180e 100644 --- a/NEWS +++ b/NEWS @@ -71,6 +71,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 450025 Powerc: ACC file not implemented as a logical overlay of the VSR registers. 450536 Powerpc: valgrind throws 'facility scv unavailable exception' +451626 Syscall param bpf(attr->raw_tracepoint.name) points to unaddressable byte(s) To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index b9d531de38..38edccc983 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -12920,8 +12920,9 @@ PRE(sys_bpf) break; } /* Name is limited to 128 characters in kernel/bpf/syscall.c. */ - pre_asciiz_str(tid, attr->raw_tracepoint.name, 128, - "bpf(attr->raw_tracepoint.name)"); + if (attr->raw_tracepoint.name != NULL) + pre_asciiz_str(tid, attr->raw_tracepoint.name, 128, + "bpf(attr->raw_tracepoint.name)"); } break; case VKI_BPF_BTF_LOAD: |