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: <32503f17-ab9e-480f-9921-72f20e3e4c4f@lucifer.local>
Date: Fri, 12 Sep 2025 10:47:34 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Kairui Song <ryncsn@...il.com>
Cc: Lance Yang <lance.yang@...ux.dev>, linux-mm@...ck.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>, Hugh Dickins <hughd@...gle.com>,
        Chris Li <chrisl@...nel.org>, Barry Song <baohua@...nel.org>,
        Baoquan He <bhe@...hat.com>, Nhat Pham <nphamcs@...il.com>,
        Kemeng Shi <shikemeng@...weicloud.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Ying Huang <ying.huang@...ux.alibaba.com>,
        Johannes Weiner <hannes@...xchg.org>,
        David Hildenbrand <david@...hat.com>,
        Yosry Ahmed <yosryahmed@...gle.com>, Zi Yan <ziy@...dia.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 11/15] mm, swap: use the swap table for the swap cache
 and switch API

On Fri, Sep 12, 2025 at 05:42:53PM +0800, Kairui Song wrote:
> Thanks for the info. But I think V3 should be good?
>
> CONFIG_SWAP depends on CONFIG_MMU so if you have !CONFIG_MMU, you must
> have !CONFIG_SWAP.
>
> I didn't adjust the header in V3 and fixed it differently from what
> Lance is suggesting, V3 wraps swp_offset with CONFIG_SWAP. It should
> covers !CONFIG_MMU case too.
>
> The folio_index in V3 (this patch) looks like this:
>
> static inline pgoff_t folio_index(struct folio *folio)
> {
> #ifdef CONFIG_SWAP
>         if (unlikely(folio_test_swapcache(folio)))
>                return swp_offset(folio->swap);
> #endif
>         return folio->index;
> }
>
> I just tested !MMU and it seems fine.

Yup my bad, it's because mm-new is not actually up-to-date properly. So
mm-new build is broken until v3 is taken.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ