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: <ZoQX8uxqww6Zkq2C@zx2c4.com>
Date: Tue, 2 Jul 2024 17:08:34 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
	tglx@...utronix.de, linux-crypto@...r.kernel.org,
	linux-api@...r.kernel.org, x86@...nel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Adhemerval Zanella Netto <adhemerval.zanella@...aro.org>,
	Carlos O'Donell <carlos@...hat.com>,
	Florian Weimer <fweimer@...hat.com>, Arnd Bergmann <arnd@...db.de>,
	Jann Horn <jannh@...gle.com>,
	Christian Brauner <brauner@...nel.org>,
	David Hildenbrand <dhildenb@...hat.com>, linux-mm@...ck.org
Subject: Re: [PATCH v19 1/5] mm: add VM_DROPPABLE for designating always
 lazily freeable mappings

Hey Andrew,

On Tue, Jul 02, 2024 at 12:42:54AM -0700, Andrew Morton wrote:
> The patch is impressively comment-free.  It is a little harsh to make
> readers go poking around in the git history to figure out what
> VM_DROPPABLE is, and why it exists.

Sure, I'll add some comments to the conditionals added to make it more
clear.

> Seems hard to test that this mode is working correctly.  Can you think
> of a way for userspace to check this?  And if so, add it to selftests?

I've got a pretty straight forward test I've been using during my own
testing that I can add to the vgetrandom_alloc() selftest (which exposes
these code paths). It works fairly reliably. Basically, one process
keeps checking to see if the memory has been dropped, while the other
consumes memory a page at a time. Pretty soon (depending on how much ram
you have), the memory gets dropped, and this is detected, and the test
completes with a pass. I'll have this in v+1 of this series.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ