Re: [PATCH] mm/madvise: preserve uprobe breakpoints across MADV_DONTNEED

Jann Horn
2026-04-30T19:12:27Z

On Thu, Apr 30, 2026 at 8:47 PM Oleg Nesterov <oleg@redhat.com> wrote:
> _In that case_. Instead of this patch (which, rightly or not, I personally dislike
> in any case), can't MADV_DONTNEED paths check MMF_HAS_UPROBES or vma_has_uprobes()
> to decide whether .even_cows should be true?

The manpage currently essentially guarantees that MADV_DONTNEED
discards CoW pages. I think it would be a bad idea to change that
documented behavior without a strong reason, especially if that means
we'd have to add more special cases to the UAPI contract.