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]
Date:   Fri, 5 Apr 2019 20:29:32 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Len Brown <lenb@...nel.org>
cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Zhang Rui <rui.zhang@...el.com>,
        Len Brown <len.brown@...el.com>
Subject: Re: [PATCH 09/14] thermal/x86_pkg_temp_thermal: Support
 multi-die/package

On Tue, 26 Feb 2019, Len Brown wrote:
>  static int __init pkg_temp_thermal_init(void)
>  {
>  	int ret;
> +	struct cpuinfo_x86 *c = &cpu_data(0);
>  
>  	if (!x86_match_cpu(pkg_temp_thermal_ids))
>  		return -ENODEV;
>  
> -	max_packages = topology_max_packages();
> +	max_packages = topology_max_packages() * c->x86_max_dies;

This is really a sloppy hack. Just because cpuinfo is accessible it's not a
good idea to fiddle with it in a driver. We went great length to abstract
that stuff. So please add a new helper function topology_max_dies() and
retrieve it from that.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ