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: <20230901065028.GG8103@alberich>
Date:   Fri, 1 Sep 2023 08:50:28 +0200
From:   Andreas Herrmann <aherrmann@...e.de>
To:     Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Cc:     x86@...nel.org, Andreas Herrmann <aherrmann@...e.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Chen Yu <yu.c.chen@...el.com>, Len Brown <len.brown@...el.com>,
        Radu Rendec <rrendec@...hat.com>,
        Pierre Gondois <Pierre.Gondois@....com>,
        Pu Wen <puwen@...on.cn>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Sudeep Holla <sudeep.holla@....com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Will Deacon <will@...nel.org>, Zhang Rui <rui.zhang@...el.com>,
        stable@...r.kernel.org, Ricardo Neri <ricardo.neri@...el.com>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 0/3] x86/cacheinfo: Set the number of leaves per CPU

On Fri, Aug 04, 2023 at 06:24:18PM -0700, Ricardo Neri wrote:
> Hi,

Hi Ricardo,

> This is v3 of a patchset to set the number of cache leaves independently
> for each CPU. v1 and v2 can be found here [1] and here [2].

I am on CC of your patch set and glanced through it.
Long ago I've touched related code but now I am not really up-to-date
to do a qualified review in this area. First, I would have to look
into documentation to refresh my memory etc. pp.

I've not seen (or it escaped me) information that this was tested on a
variety of machines that might be affected by this change. And there
are no Tested-by-tags.

Even if changes look simple and reasonable they can cause issues.

Thus from my POV it would be good to have some information what tests
were done. I am not asking to test on all possible systems but just
knowing which system(s) was (were) used for functional testing is of
value.

> Changes since v2:
>   * This version uncovered a NULL-pointer dereference in recent changes to
>     cacheinfo[3]. This dereference is observed when the system does not
>     configure cacheinfo early during boot nor makes corrections later
>     during CPU hotplug; as is the case in x86. Patch 1 fixes this issue.
> 
> Changes since v1:
>   * Dave Hansen suggested to use the existing per-CPU ci_cpu_cacheinfo
>     variable. Now the global variable num_cache_leaves became useless.
>   * While here, I noticed that init_cache_level() also became useless:
>     x86 does not need ci_cpu_cacheinfo::num_levels.
> 
> [1]. https://lore.kernel.org/lkml/20230314231658.30169-1-ricardo.neri-calderon@linux.intel.com/
> [2]. https://lore.kernel.org/all/20230424001956.21434-1-ricardo.neri-calderon@linux.intel.com/
> [3]. https://lore.kernel.org/all/20230412185759.755408-1-rrendec@redhat.com/
> 
> Ricardo Neri (3):
>   cacheinfo: Allocate memory for memory if not done from the primary CPU
>   x86/cacheinfo: Delete global num_cache_leaves
>   x86/cacheinfo: Clean out init_cache_level()
> 
>  arch/x86/kernel/cpu/cacheinfo.c | 50 ++++++++++++++++-----------------
>  drivers/base/cacheinfo.c        |  6 +++-
>  2 files changed, 30 insertions(+), 26 deletions(-)
> 
> -- 
> 2.25.1
> 

-- 
Regards,
Andreas

SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nürnberg, Germany
GF: Ivo Totev, Andrew McDonald, Werner Knoblich
(HRB 36809, AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ