lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK1f24n8foqH7HoTjthgcutU1yo=uGU3-r1ps-s4NKNscvZqSg@mail.gmail.com>
Date: Tue, 21 Jan 2025 10:28:34 +0800
From: Lance Yang <ioworker0@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, akpm@...ux-foundation.org, 
	21cnbao@...il.com, ryan.roberts@....com, dev.jain@....com, 
	shy828301@...il.com, ziy@...dia.com, libang.li@...group.com, 
	baolin.wang@...ux.alibaba.com, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org, Liam.Howlett@...cle.com, vbabka@...e.cz, jannh@...gle.com, 
	Jason@...c4.com, Mingzhe Yang <mingzhe.yang@...com>
Subject: Re: [RFC 1/1] mm/madvise: fail MADV_PAGEOUT on VM_DROPPABLE VMA

On Mon, Jan 20, 2025 at 9:57 PM David Hildenbrand <david@...hat.com> wrote:
>
> On 20.01.25 14:47, Lance Yang wrote:
> > Hi Barry, David and Lorenzo,
> >
> > Thanks a lot for taking time to review!
> >
> > On Mon, Jan 20, 2025 at 6:45 PM Lorenzo Stoakes
> > <lorenzo.stoakes@...cle.com> wrote:
> >>
> >> Sorry but NACK again on this :(
> >>
> >> On Mon, Jan 20, 2025 at 09:30:38AM +0800, Lance Yang wrote:
> >>> MADV_PAGEOUT should fail on VMAs with the VM_DROPPABLE flag. While
> >>> MADV_PAGEOUT is intended to move anonymous pages to swap, VM_DROPPABLE
> >>> should not be swapped out.
> >>>
> >>> There is an issue where using MADV_PAGEOUT on a VMA with the VM_DROPPABLE
> >>> flag behaves like MADV_DONTNEED, causing the pages to be dropped. This
> >>> could break the semantics of MADV_PAGEOUT, IMO.
> >>>
> >>> So, let's add a check to detect the VM_DROPPABLE flag before doing
> >>> MADV_PAGEOUT and returns -EINVAL.
> >>
> >> No, let's not.
> >
> > I think I completely got it wrong. Learning so much from your patient responses!
>
> Maybe you can make the documentation (man pages?) clearer in that
> regard? Thanks!

Of course, I will give it a try ASAP ;)

Thanks for your suggestion!
Lance

>
> --
> Cheers,
>
> David / dhildenb
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ