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: <20240528101906.ts4NjHvU@linutronix.de>
Date: Tue, 28 May 2024 12:19:06 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: "Vlastimil Babka (SUSE)" <vbabka@...nel.org>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...nel.org>,
	Roman Gushchin <roman.gushchin@...ux.dev>,
	Muchun Song <muchun.song@...ux.dev>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2] memcg: simple cleanup of stats update functions

On 2024-05-28 10:10:50 [+0200], Vlastimil Babka (SUSE) wrote:
> > I don't mind sending a patch. I'm just not sure if the lock is the right
> > thing to do. However it should ensure that interrupts are disabled on
> > !RT for the sake of the counter update (if observed in IRQ context).
> 
> Looks like some places there use VM_WARN_ON_IRQS_ENABLED() that's turned off
> for PREEMPT_RT, so maybe that's what should replace the current
> lockdep_assert, perhaps together with
> lockdep_assert_held(this_cpu_ptr(&memcg_stock.stock_lock));
> 
> But also __mod_memcg_lruvec_state() already has that VM_WARN_ON.

This "VM_WARN_ON_IRQS_ENABLED" is the initial assert for "interrupts
must be disabled while change the counter".
You want to replace it with lockdep? Part of its requirement was that it
yells with lockdep disabled.

Currently I am leaning towards removing the
lockdep_assert_irqs_disabled() from __mod_objcg_mlstate(). Nothing but
the counter need it and they have their own check. So?

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ