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: <CAMgjq7Bw9Ascd5FdTg=wf8dHtQN2n=cJPqREsatBJPoDLJVG=Q@mail.gmail.com>
Date: Mon, 19 Jan 2026 11:17:12 +0800
From: Kairui Song <ryncsn@...il.com>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: linux-mm@...ck.org, Hugh Dickins <hughd@...gle.com>, 
	Andrew Morton <akpm@...ux-foundation.org>, Kemeng Shi <shikemeng@...weicloud.com>, 
	Nhat Pham <nphamcs@...il.com>, Chris Li <chrisl@...nel.org>, Baoquan He <bhe@...hat.com>, 
	Barry Song <baohua@...nel.org>, linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] mm/shmem, swap: fix race of truncate and swap entry split

On Mon, Jan 19, 2026 at 11:04 AM Baolin Wang
<baolin.wang@...ux.alibaba.com> wrote:
> On 1/19/26 12:55 AM, Kairui Song wrote:
> > From: Kairui Song <kasong@...cent.com>
> >
> >                               if (!swaps_freed) {
> > +                                     /*
> > +                                      * If found a large swap entry cross the end border,
> > +                                      * skip it as the truncate_inode_partial_folio above
> > +                                      * should have at least zerod its content once.
> > +                                      */
> > +                                     order = shmem_confirm_swap(mapping, indices[i],
> > +                                                                radix_to_swp_entry(folio));
> > +                                     if (order > 0 && indices[i] + order > end)
> > +                                             continue;
>
> The latter check shoud be 'indices[i] + 1 << order > end', right?

Yes, you are right, it should be 1 << order, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ