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: <87o7d9iwdz.ffs@tglx>
Date: Thu, 25 Jan 2024 10:40:24 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Frederic Weisbecker <frederic@...nel.org>, LKML
 <linux-kernel@...r.kernel.org>
Cc: Frederic Weisbecker <frederic@...nel.org>, Ingo Molnar
 <mingo@...nel.org>, Anna-Maria Behnsen <anna-maria@...utronix.de>, Peng
 Liu <liupeng17@...ovo.com>, Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 11/15] tick: Move got_idle_tick away from common flags

On Wed, Jan 24 2024 at 18:04, Frederic Weisbecker wrote:
> tick_nohz_idle_got_tick() is called by cpuidle_reflect() within the idle
> loop with interrupts enabled. This function modifies the struct
> tick_sched's bitfield "got_idle_tick". However this bitfield is stored
> within the same mask as other bitfields that can be modified from
> interrupts.
>
> Fortunately so far it looks like the only race that can happen is while
> writing ->got_idle_tick to 0, an interrupt fires and writes the
> ->idle_active field to 0. It's then possible that the interrupted write
> to ->got_idle_tick writes back the old value of ->idle_active back to 1.
>
> However if that happens, the worst possible outcome is that the time
> spent between that interrupt and the upcoming call to
> tick_nohz_idle_exit() is accounted as idle, which is negligible quantity.
>
> Still all the bitfield writes within this struct tick_sched's shadow
> mask should be IRQ-safe. Therefore move this bitfield out to its own
> storage to avoid further suprises.
>
> Signed-off-by: Frederic Weisbecker <frederic@...nel.org>

Reviewed-by: Thomas Gleixner <tglx@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ