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: <20161008205722.fixddvp7bfu7wv5u@pd.tnic>
Date:   Sat, 8 Oct 2016 22:57:22 +0200
From:   Borislav Petkov <bp@...e.de>
To:     Fenghua Yu <fenghua.yu@...el.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        "H. Peter Anvin" <h.peter.anvin@...el.com>,
        Ingo Molnar <mingo@...e.hu>, Tony Luck <tony.luck@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Stephane Eranian <eranian@...gle.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Nilay Vaish <nilayvaish@...il.com>, Shaohua Li <shli@...com>,
        David Carrillo-Cisneros <davidcc@...gle.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Sai Prakhya <sai.praneeth.prakhya@...el.com>,
        Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v3 06/18] x86/intel_rdt: Add CONFIG, Makefile, and basic
 initialization

On Fri, Oct 07, 2016 at 07:45:51PM -0700, Fenghua Yu wrote:
> From: Fenghua Yu <fenghua.yu@...el.com>
> 
> Introduce CONFIG_INTEL_RDT (default: no, dependent on X86 and
> CPU_SUP_INTEL) to control inclusion of Resource Director Technology in
> the build.
> 
> Simple init() routine just checks which features are present. If they are
> pr_info() one line summary for each feature.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
>  arch/x86/Kconfig                | 12 +++++++++
>  arch/x86/kernel/cpu/Makefile    |  2 ++
>  arch/x86/kernel/cpu/intel_rdt.c | 56 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 70 insertions(+)
>  create mode 100644 arch/x86/kernel/cpu/intel_rdt.c

...

> +static inline bool get_rdt_resources(struct cpuinfo_x86 *c)
> +{
> +	bool ret = false;
> +
> +	if (!cpu_has(c, X86_FEATURE_RDT_A))
> +		return false;
> +	if (cpu_has(c, X86_FEATURE_CAT_L3))
> +		ret = true;
> +
> +	return ret;
> +}
> +
> +static int __init intel_rdt_late_init(void)
> +{
> +	struct cpuinfo_x86 *c = &boot_cpu_data;

No need for that - you can do directly

	if (boot_cpu_has(...))

in get_rdt_resources() and here.

> +
> +	if (!get_rdt_resources(c))
> +		return -ENODEV;
> +
> +	pr_info("Intel cache allocation detected\n");

So this reads stupid: Intel cache allocation? Reads like Intel can do
cache allocation. But it does already, even before that RDT stuff.

So you need to think of a more sensible name for it: "Intel cache
partitioning support detected" or some descriptive name which actually
denotes what the technology is.

Everybody can allocate lines in the cache :)

> +	if (cpu_has(c, X86_FEATURE_CDP_L3))
> +		pr_info("Intel code data prioritization detected\n");

Ditto.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ