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: <20241016155550.9ff2ab4625c7f19b6be8b7e1@linux-foundation.org>
Date: Wed, 16 Oct 2024 15:55:50 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Yu Zhao <yuzhao@...gle.com>
Cc: Wei Xu <weixugc@...gle.com>, Brian Geffon <bgeffon@...gle.com>, Jan
 Alexander Steffens <heftig@...hlinux.org>, Suleiman Souhlal
 <suleiman@...gle.com>, Axel Rasmussen <axelrasmussen@...gle.com>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/mglru: reset page lru tier bits when activating

On Tue, 15 Oct 2024 22:55:23 -0600 Yu Zhao <yuzhao@...gle.com> wrote:

> > @@ -257,7 +258,9 @@ static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio,
> >         gen = lru_gen_from_seq(seq);
> >         flags = (gen + 1UL) << LRU_GEN_PGOFF;
> >         /* see the comment on MIN_NR_GENS about PG_active */
> > -       set_mask_bits(&folio->flags, LRU_GEN_MASK | BIT(PG_active), flags);
> > +       mask = LRU_GEN_MASK | BIT(PG_active);
> > +       mask |= folio_test_active(folio) ? (LRU_REFS_MASK | LRU_REFS_FLAGS) : 0;
> 
> We shouldn't clear PG_workingset here because it can affect PSI
> accounting, if the activation is due to workingset refault.
> 
> Also, nit:
>   mask = LRU_GEN_MASK;
>   if (folio_test_active(folio))
>     mask |= LRU_REFS_MASK | BIT(PG_active) | BIT(PG_referenced);
> 

Thanks, I'll drop this version of this patch.

When resending, please include a full description of the userspace-visible
effects of the original flaw, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ