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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whb2rMUCGsaNQC4pkCikJ7iX2_Tc1ye5_a6R9-vAkd2Cg@mail.gmail.com>
Date: Tue, 3 Jun 2025 10:54:49 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Matthew Wilcox <willy@...radead.org>, Hugh Dickins <hughd@...gle.com>, 
	LKML <linux-kernel@...r.kernel.org>, linux-mm@...ck.org, 
	Andrew Morton <akpm@...ux-foundation.org>, Christian Koenig <christian.koenig@....com>, 
	Huang Rui <ray.huang@....com>, Matthew Auld <matthew.auld@...el.com>, 
	Matthew Brost <matthew.brost@...el.com>, dri-devel@...ts.freedesktop.org, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set

On Tue, 3 Jun 2025 at 10:26, Steven Rostedt <rostedt@...dmis.org> wrote:
>
>  config DRM_TTM
>         tristate
> -       depends on DRM && MMU
> +       depends on DRM && MMU && SHMEM

Yeah, except I think you should just make it be

          depends on DRM && SHMEM

because SHMEM already depends on MMU.

That said, our docs already say that if you disable SHMEM, it gets
replaced by RAMFS, so maybe just having a ramfs version is the
RightThing(tm).

I don't think such a ramfs version should just return 0 - much less an
error. I think it should always redirty the page.

IOW, I think the "ramfs" version should look something like

        folio_mark_dirty(folio);
        if (wbc->for_reclaim)
                return AOP_WRITEPAGE_ACTIVATE;  /* Return with folio locked */
        folio_unlock(folio);
        return 0;

which is what shmem does for the "page is locked" case.

            Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ