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: <20128914-b270-4bda-a778-fed63594d04c@web.de>
Date: Sat, 13 Jul 2024 09:15:14 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Babu Moger <babu.moger@....com>, x86@...nel.org,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 Fenghua Yu <fenghua.yu@...el.com>, Ingo Molnar <mingo@...hat.com>,
 Jonathan Corbet <corbet@....net>, Reinette Chatre
 <reinette.chatre@...el.com>, Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-doc@...r.kernel.org,
 Breno Leitao <leitao@...ian.org>,
 Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
 "H. Peter Anvin" <hpa@...or.com>,
 Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 James Morse <james.morse@....com>, Jim Mattson <jmattson@...gle.com>,
 Jithu Joseph <jithu.joseph@...el.com>, Josh Poimboeuf <jpoimboe@...nel.org>,
 Julia Lawall <julia.lawall@...ia.fr>, Kai Huang <kai.huang@...el.com>,
 Kan Liang <kan.liang@...ux.intel.com>, Kim Phillips <kim.phillips@....com>,
 Lukas Bulwahn <lukas.bulwahn@...il.com>,
 Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>,
 Paolo Bonzini <pbonzini@...hat.com>, "Paul E. McKenney"
 <paulmck@...nel.org>, Peter Newman <peternewman@...gle.com>,
 Peter Zijlstra <peterz@...radead.org>, Randy Dunlap <rdunlap@...radead.org>,
 Rick Edgecombe <rick.p.edgecombe@...el.com>,
 Sandipan Das <sandipan.das@....com>, Sean Christopherson
 <seanjc@...gle.com>, Stephane Eranian <eranian@...gle.com>,
 Tejun Heo <tj@...nel.org>, Yan-Jie Wang <yanjiewtw@...il.com>
Subject: Re: [PATCH v5 17/20] x86/resctrl: Introduce the interface switch
 between monitor modes

…
> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> @@ -910,6 +910,40 @@ static int rdtgroup_num_mbm_cntrs_show(struct kernfs_open_file *of,
>  	return 0;
>  }
>
> +static ssize_t rdtgroup_mbm_mode_write(struct kernfs_open_file *of,
> +				       char *buf, size_t nbytes,
> +				       loff_t off)
> +{
…
> +	cpus_read_lock();
> +	mutex_lock(&rdtgroup_mutex);
> +
> +	rdt_last_cmd_clear();
…
> +	mutex_unlock(&rdtgroup_mutex);
> +	cpus_read_unlock();
> +
> +	return ret ?: nbytes;
> +}
…

Would you become interested to apply statements like the following?

* guard(cpus_read_lock)();
  https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/cleanup.h#L133

* guard(mutex)(&rdtgroup_mutex);
  https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/mutex.h#L196


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ