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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aD8iL4cFoXpIVK_0@casper.infradead.org>
Date: Tue, 3 Jun 2025 17:26:23 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Hugh Dickins <hughd@...gle.com>, LKML <linux-kernel@...r.kernel.org>,
	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set

On Tue, Jun 03, 2025 at 10:29:59AM -0400, Steven Rostedt wrote:
> On Tue, 3 Jun 2025 01:02:36 -0700 (PDT)
> Hugh Dickins <hughd@...gle.com> wrote:
> 
> > Agreed that ramfs does not use swap, so calling swap_writepage() would
> > be weird.  But, thanks for the build fix Steve, but it cannot be right
> > because return 0 says shmem_writeout() successfully sent the page to
> > swap, and that has unlocked the page (or soon will do so).  It should
> > return an error (-ENXIO?), but I haven't checked what the callers do with
> 
> Yeah, I figured it should return an error, but looking at the code I
> couldn't figure out what the proper error would be. Then I also noticed
> that the other stub functions just returned zero so I did the same.
> 
> Perhaps add a WARN_ON_ONCE() if it is called without CONFIG_SHMEM configured?

Or just make this module depend on SHMEM?  I don't think it makes much
sense to use it without being able to swap, and shmem can't swap ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ