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: <b87f4c98-ef7b-44e7-ad25-8b2003bea5c3@intel.com>
Date: Thu, 17 Apr 2025 15:46:54 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: James Morse <james.morse@....com>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>, Babu Moger
	<Babu.Moger@....com>, <shameerali.kolothum.thodi@...wei.com>, "D Scott
 Phillips OS" <scott@...amperecomputing.com>, <carl@...amperecomputing.com>,
	<lcherian@...vell.com>, <bobo.shaobowang@...wei.com>,
	<tan.shaopeng@...itsu.com>, <baolin.wang@...ux.alibaba.com>, Jamie Iles
	<quic_jiles@...cinc.com>, Xin Hao <xhao@...ux.alibaba.com>,
	<peternewman@...gle.com>, <dfustini@...libre.com>, <amitsinght@...vell.com>,
	David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
	"Dave Martin" <dave.martin@....com>, Koba Ko <kobak@...dia.com>, Shanker
 Donthineni <sdonthineni@...dia.com>, <fenghuay@...dia.com>, Shaopeng Tan
	<tan.shaopeng@...fujitsu.com>, Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH v8 12/21] x86/resctrl: Move the filesystem bits to headers
 visible to fs/resctrl

Hi James,

> diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h
> index 7a39728b0743..6eb7d5c94c7a 100644
> --- a/arch/x86/include/asm/resctrl.h
> +++ b/arch/x86/include/asm/resctrl.h
> @@ -210,6 +210,9 @@ int resctrl_arch_measure_l2_residency(void *_plr);
>  int resctrl_arch_measure_l3_residency(void *_plr);
>  void resctrl_cpu_detect(struct cpuinfo_x86 *c);
>  
> +bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l);
> +int resctrl_arch_set_cdp_enabled(enum resctrl_res_level l, bool enable);
> +
>  #else


I noticed this while reading through the telemetry work ... the custom
appears to be for all arch helpers to be declared in include/linux/resctrl.h
making these two stand out. What motivated their inclusion into
arch/x86/include/asm/resctrl.h?

If they move to include/linux/resctrl.h it looks like enum resctrl_res_level is
no longer required to be in include/linux/resctrl_types.h.

Looking further, from commit f16adbaf9272 ("x86/resctrl: Move resctrl types to a separate header")
the motivation for including enum resctrl_event_id is to support 
resctrl_arch_mon_ctx_alloc() and resctrl_arch_mon_ctx_free(), but looking
at their definitions in arch/x86/include/asm/resctrl.h they are using "int evtid"
instead of enum resctrl_event_id. Looks like their definitions need to
change?

I assume the pseudo-locking arch helpers are placed in arch/x86/include/asm/resctrl.h
with the implicit knowledge that only x86 will set CONFIG_RESCTRL_FS_PSEUDO_LOCK so
avoiding that extra handling in include/linux/resctrl.h?

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ