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] [day] [month] [year] [list]
Message-ID: <bda280c2-8eb2-4e09-8f46-6ec7951a09cd@os.amperecomputing.com>
Date: Fri, 26 Sep 2025 10:51:52 -0700
From: Yang Shi <yang@...amperecomputing.com>
To: Catalin Marinas <catalin.marinas@....com>,
 "Christoph Lameter (Ampere)" <cl@...two.org>
Cc: muchun.song@...ux.dev, osalvador@...e.de, david@...hat.com,
 akpm@...ux-foundation.org, will@...nel.org, carl@...amperecomputing.com,
 linux-mm@...ck.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: hugetlb: avoid soft lockup when mprotect with
 PROT_MTE



On 9/26/25 9:56 AM, Catalin Marinas wrote:
> On Fri, Sep 26, 2025 at 09:29:54AM -0700, Christoph Lameter (Ampere) wrote:
>> On Fri, 26 Sep 2025, Yang Shi wrote:
>>> When calling mprotect() with PROT_MTE, kernel will initialize MTE tags
>>> for every single page in the affected area. Soft lockup was observed
>>> when doing this for large HugeTLB memory area in our customer's workload
>>> (~300GB memory):
>> AFAICT this is a bug fix. The hugetlb path should be doing a
>> cond_resched() like the base page code does.
>>
>> It is not MTE specific. If other processing takes a long time in the loop
>> (setting up terabyte size mappings for hugetlb for example) then the
>> softlockup could also be triggered on non MTE workloads.
> Yeah, with MTE set_huge_pte_at() isn't just setting a pte but also
> clearing the tags. So it can take considerable time.
>
> The fix is indeed not related to MTE, so I don't think the Fixes tag
> should mention MTE (but I'm fine with a cc stable). Let's say we change
> a hugetlb from RW to RX and have to do cache maintenance, we'd trigger a
> similar soft lockup, depending on how fast the system is.
>
> Reviewed-by: Catalin Marinas <catalin.marinas@....com>

Thank you. Yes, I agree this should be not MTE specific although it was 
triggered by MTE in certain workload. I will remove the fix tag and make 
the commit message more generic.

Yang



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ