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: <50b3316b-aed0-2ef1-a7ff-69aa3991d7e4@microchip.com>
Date:   Thu, 14 Jul 2022 16:10:36 +0000
From:   <Conor.Dooley@...rochip.com>
To:     <sudeep.holla@....com>
CC:     <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>,
        <vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
        <ionela.voinescu@....com>, <pierre.gondois@....com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH -next] arch_topology: Fix cache attributes detection in
 the CPU hotplug path

On 14/07/2022 17:00, Sudeep Holla wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, Jul 14, 2022 at 03:27:09PM +0000, Conor.Dooley@...rochip.com wrote:
>> On 14/07/2022 16:01, Sudeep Holla wrote:
>>>
>>> Interesting, need to check if it is not in atomic context on arm64.
>>> Wonder if some configs are disabled and making this bug hidden. Let me
>>> check.
>>>
> 
> OK, it turns I didn't have necessary config options enabled. Enabling
> them, I did see the BUG splat and changing allocation to GFP_ATOMIC
> fixed the same. Can you try that please so that you can test if other
> things are fine.
> 
>>> One possible solution is to add GFP_ATOMIC to the allocation but I want
>>> to make sure if it is legal to be in atomic context when calling
>>> update_siblings_masks.
>>>
> 
> So I take is as legal and needs to be fixed to push my patch.
> 

With the GFP_ATOMIC, behaviour is the same as before for me.

Therefore, with the following diff & for RISC-V/DT:

Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>

diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index 65d566ff24c4..4b5cd08c5a65 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -356,7 +356,7 @@ int detect_cache_attributes(unsigned int cpu)
                return -ENOENT;
 
        per_cpu_cacheinfo(cpu) = kcalloc(cache_leaves(cpu),
-                                        sizeof(struct cacheinfo), GFP_KERNEL);
+                                        sizeof(struct cacheinfo), GFP_ATOMIC);
        if (per_cpu_cacheinfo(cpu) == NULL) {
                cache_leaves(cpu) = 0;
                return -ENOMEM;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ