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: <wvqotmnk2kad3lyigbsc5vtq4ymdtaxqcjijaj2f5mdcp6m742@ltmazfge3eu4>
Date: Wed, 11 Dec 2024 14:56:22 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Yafang Shao <laoar.shao@...il.com>
Cc: mingo@...hat.com, peterz@...radead.org, hannes@...xchg.org, 
	juri.lelli@...hat.com, vincent.guittot@...aro.org, dietmar.eggemann@....com, 
	rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com, 
	surenb@...gle.com, linux-kernel@...r.kernel.org, cgroups@...r.kernel.org
Subject: Re: [PATCH v6 3/4] sched, psi: Don't account irq time if
 sched_clock_irqtime is disabled

On Wed, Dec 11, 2024 at 09:17:28PM GMT, Yafang Shao <laoar.shao@...il.com> wrote:
> @@ -1286,7 +1286,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group, char *buf,
>  	bool privileged;
>  	u32 window_us;
>  
> -	if (static_branch_likely(&psi_disabled))
> +	if (static_branch_likely(&psi_disabled) || !irqtime_enabled())
>  		return ERR_PTR(-EOPNOTSUPP);

Beware this jumps out for _any_ PSI metric when only irq is disabled.
I meant to add a guard to psi_show() (this is psi_trigger_create()).

Michal

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ