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: <306a53a5-0b99-4e5a-810b-5aa4e86a72d1@amd.com>
Date: Tue, 27 Jan 2026 12:00:48 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Wangyang Guo <wangyang.guo@...el.com>, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann
	<dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, Ben Segall
	<bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, Valentin Schneider
	<vschneid@...hat.com>
CC: <linux-kernel@...r.kernel.org>, Shrikanth Hegde <sshegde@...ux.ibm.com>,
	Benjamin Lei <benjamin.lei@...el.com>, Tim Chen <tim.c.chen@...ux.intel.com>,
	Tianyou Li <tianyou.li@...el.com>
Subject: Re: [PATCH v6] sched/clock: Avoid false sharing for
 sched_clock_irqtime

Hello Wangyang,

On 1/27/2026 10:11 AM, Wangyang Guo wrote:
> --- a/kernel/sched/clock.c
> +++ b/kernel/sched/clock.c
> @@ -173,6 +173,7 @@ notrace static void __sched_clock_work(struct work_struct *work)
>  			scd->tick_gtod, __gtod_offset,
>  			scd->tick_raw,  __sched_clock_offset);
>  
> +	disable_sched_clock_irqtime();

We can come here with !irqtime_enabled() but this is a slowpath so I
don't really mind calling disable_sched_clock_irqtime() unconditionally
here. Feel free to include:

Reviewed-by: K Prateek Nayak <kprateek.nayak@....com>
Tested-by: K Prateek Nayak <kprateek.nayak@....com>

Tested with a bunch of fake cases of sched_clock going unstable by
hacking the kernel and the irqtime was disabled correctly in both cases
- pre-lateinit and post-lateinit.

>  	static_branch_disable(&__sched_clock_stable);
>  }
>  
-- 
Thanks and Regards,
Prateek


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ