[Bug breakpoints/34381] Emit an error message when CONFIG_PROC_MEM_NO_FORCE=y causes attach failure
"adrian.ratiu at collabora dot com via Gdb-prs" <[email protected]>
| Newsgroups | gmane.comp.gdb.bugs.discuss |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34381 --- Comment #4 from Adrian Ratiu <adrian.ratiu at collabora dot com> --- > I don't know what this really means. > What would gdb have to do here? At a very high level, because it's been a while since I last looked at it: GDB and a few other projects [1] "abuse" the kernel /proc/mem interface to modify instrumented child process behavior via FOLL_FORCE, which is a widely known security hole that has known exploits in the wild. That is why consumer security conscious Linux distributions turn it off by default and break projects like GDB, which rely on FOLL_FORCE. Last I spoke with upstream maintainers about FOLL_FORCE, they're happy to move off it, someone just needs to write the patches, though in particular for GDB it might be a lot of work (sorry I haven't looked into it too deeply). Kernel maintainers are also happy to remove the FOLL_FORCE flag, but only after nobody uses it anymore, because it turned into this weird known problematic userspace interface. :) [1] also R and Julia IIRC, but they are certainly just a minority, not LLVM / lldb which do things properly IIRC, though again it's been some years since I last looked at this. -- You are receiving this mail because: You are on the CC list for the bug.