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] [day] [month] [year] [list]
Message-ID: <20230104133459.5yaflf3yicpmhbbh@ava.usersys.com>
Date:   Wed, 4 Jan 2023 13:34:59 +0000
From:   Aaron Tomlin <atomlin@...mlin.com>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     Marcelo Tosatti <mtosatti@...hat.com>, cl@...ux.com,
        tglx@...utronix.de, mingo@...nel.org, peterz@...radead.org,
        pauld@...hat.com, neelx@...hat.com, oleksandr@...alenko.name,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v12 2/6] mm/vmstat: Use vmstat_dirty to track
 CPU-specific vmstat discrepancies

On Fri 2022-12-30 14:21 +0100, Frederic Weisbecker wrote:
> On Tue, Dec 27, 2022 at 09:11:39AM -0300, Marcelo Tosatti wrote:
> > @@ -606,6 +608,7 @@ static inline void mod_zone_state(struct
> >  
> >  	if (z)
> >  		zone_page_state_add(z, zone, item);
> > +	vmstat_mark_dirty();
> >  }
> >  
> >  void mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
> > @@ -674,6 +677,7 @@ static inline void mod_node_state(struct
> >  
> >  	if (z)
> >  		node_page_state_add(z, pgdat, item);
> > +	vmstat_mark_dirty();
> 
> Looking at this further, about the two above chunks, there is a risk to
> mark the wrong CPU dirty because those functions are preemptible and rely
> on this_cpu_cmpxchg() to deal with preemption.

Hi Frederic,

Agreed.


Kind regards,

-- 
Aaron Tomlin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ