https://bugs.kde.org/show_bug.cgi?id=309554
Mark Wielaard <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #7 from Mark Wielaard <[email protected]> --- (In reply to Paul Floyd from comment #6) > In this needed? > > + if (!ML_(safe_to_deref)((void*)(Addr)ARG1, ARG2)) > + PRE_MEM_READ("sys_remap_file_pages(addr)", ARG1, ARG2); > > My understanding of the manpage is that this syscall just rearranges the > order of the mapping between pages in a file and pages in memory. I don't > think that it reads or writes any memory. The PRE_MEM_READ("sys_remap_file_pages(addr)", ARG1, ARG2) should always be done unconditionally. We want to warn if any addr in the array provided to the kernel contains undefined bits We only need the ML_(safe_to_deref) check after that if we are going to use those addresses ourselves. But I am not fully clear on whether we want to track any of this through the address manager and/or call notify_core_and_tool_of_mmap and notify_core_and_tool_of_mprotect. But it says "The prot argument must be specified as 0" so the protection doesn't change. And for flags it says "all flags other than MAP_NONBLOCK are ignored". If I understand things correctly all remap_file_pages does is move the file mapping around inside an already existing mmap for a file. Then we don't really care I guess. All we are interested in is the original mmap of the fd? If so, then I think the patch is ok, except for the if (!ML_(safe_to_deref)((void*)(Addr)ARG1, ARG2)). Just drop that and do the PRE_MEM_READ("sys_remap_file_pages(addr)", ARG1, ARG2); unconditionally. -- You are receiving this mail because: You are watching all bug changes.
