[valgrind] [Bug 140178] open("/proc/self/exe, ...); doesn't quite work

2021-02-06 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=140178

Mark Wielaard  changed:

   What|Removed |Added

 CC||m...@klomp.org

--- Comment #4 from Mark Wielaard  ---
Created attachment 135468
  --> https://bugs.kde.org/attachment.cgi?id=135468&action=edit
Handle open /proc/self/exe

Also reported at https://bugzilla.redhat.com/show_bug.cgi?id=1925786

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 140178] open("/proc/self/exe, ...); doesn't quite work

2021-02-06 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=140178

--- Comment #5 from Mark Wielaard  ---
Created attachment 135476
  --> https://bugs.kde.org/attachment.cgi?id=135476&action=edit
Updated patch that also handle openat

The fix needs to handle both the open and openat syscalls.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 140178] open("/proc/self/exe, ...); doesn't quite work

2021-02-07 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=140178

Mark Wielaard  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Mark Wielaard  ---
Tested as part of https://bugzilla.redhat.com/show_bug.cgi?id=1925786

commit 57c823aefea32e1fba3af47d29e66313d0bc13cd
Author: Mark Wielaard 
Date:   Sat Feb 6 22:02:56 2021 +0100

PR140178 Support opening /proc/self/exe

Some programs open /proc/self/exe to read some data. Currently valgrind
supports following the /proc/self/exe link (to the original binary, so you
could then open that), but directly opening /proc/self/exe will open the
valgrind tool, not the executable file itself.

Add ML_(handle_self_exe_open) which dups VG_(cl_exec_fd) if the file
to open is /proc/self/exe or /proc//exe. And do the same for openat.

https://bugs.kde.org/show_bug.cgi?id=140178

-- 
You are receiving this mail because:
You are watching all bug changes.