From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 777D6C433EF for ; Fri, 10 Sep 2021 15:28:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E2CD6611C9 for ; Fri, 10 Sep 2021 15:28:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E2CD6611C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2DFE46B0071; Fri, 10 Sep 2021 11:28:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28F966B0072; Fri, 10 Sep 2021 11:28:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 156EC6B0073; Fri, 10 Sep 2021 11:28:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0208.hostedemail.com [216.40.44.208]) by kanga.kvack.org (Postfix) with ESMTP id 085F96B0071 for ; Fri, 10 Sep 2021 11:28:24 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B02B12CFFB for ; Fri, 10 Sep 2021 15:28:23 +0000 (UTC) X-FDA: 78572045286.14.3505B0E Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf03.hostedemail.com (Postfix) with ESMTP id 0EB7230000A9 for ; Fri, 10 Sep 2021 15:28:22 +0000 (UTC) Date: Fri, 10 Sep 2021 17:28:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631287700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EI3QVBpMpmvzHjzxfllWn6UuMbjPLIo79cBtSieAgwY=; b=ol31PPlDXDfl+M5gSmepoP9EKuJUmJsp8JJkOV05HaEFdXil1HBYXUccnaSkldCpGVSMwv 2m8so64VziRj+v4bYNBow7z+MoMwEWytH2gwip8XuwRa7fQwlCfVqMmq3J8nvMmNnQfXUJ GB3bRwAAnQfl+NGZV4OBfnBzY7fwV8h1LVrHpJoFfOi9tk6AmvWKpBAVrV6wHJR62EB1oo 4VoBvHzrj5LUWih47DumUm3N/rsGGmaTG2MV4CCs1oOzg+h8ZFiBiJVqbJOektAnR6tzn1 XF1khQe5YB1upskf7gQ70gMZhsF5Cul6RtPus5Ob4bqbfRGiWn6fVKSF3NAeIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631287700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EI3QVBpMpmvzHjzxfllWn6UuMbjPLIo79cBtSieAgwY=; b=CTBuqRuz3Txo5V8Vb1FWxUyua1rQ2Bn2petDtwbDPd8lPf/aFLi22NPSg+P8fz5CeUVGde HuHq2ya8kCWcvZCA== From: Sebastian Andrzej Siewior To: Vlastimil Babka Cc: Shuah Khan , Marco Elver , Andrew Morton , Tejun Heo , Lai Jiangshan , Andrey Konovalov , Walter Wu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Vijayanand Jitta , Vinayak Menon , "Gustavo A. R. Silva" , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Aleksandr Nogikh , Taras Madan , Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH 0/6] stackdepot, kasan, workqueue: Avoid expanding stackdepot slabs when holding raw_spin_lock Message-ID: <20210910152819.ir5b2yijkqly3o6l@linutronix.de> References: <20210907141307.1437816-1-elver@google.com> <69f98dbd-e754-c34a-72cf-a62c858bcd2f@linuxfoundation.org> <1b1569ac-1144-4f9c-6938-b9d79c6743de@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1b1569ac-1144-4f9c-6938-b9d79c6743de@suse.cz> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0EB7230000A9 X-Stat-Signature: 55o3zb7n1hfjch3jhbbc8ig81orcetxy Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=ol31PPlD; dkim=pass header.d=linutronix.de header.s=2020e header.b=CTBuqRuz; spf=pass (imf03.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de X-HE-Tag: 1631287702-334913 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2021-09-10 12:50:51 [+0200], Vlastimil Babka wrote: > > Thank you. Tested all the 6 patches in this series on Linux 5.14. This problem > > exists in 5.13 and needs to be marked for both 5.14 and 5.13 stable releases. > > I think if this problem manifests only with CONFIG_PROVE_RAW_LOCK_NESTING > then it shouldn't be backported to stable. CONFIG_PROVE_RAW_LOCK_NESTING is > an experimental/development option to earlier discover what will collide > with RT lock semantics, without needing the full RT tree. > Thus, good to fix going forward, but not necessary to stable backport. Acked-by: Sebastian Andrzej Siewior for the series. Thank you. As for the backport I agree here with Vlastimil. I pulled it into my RT tree for some testing and it looked good. I had to --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3030,7 +3030,7 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func) head->func = func; head->next = NULL; local_irq_save(flags); - kasan_record_aux_stack(head); + kasan_record_aux_stack_noalloc(head); rdp = this_cpu_ptr(&rcu_data); /* Add the callback to our list. */ We could move kasan_record_aux_stack() before that local_irq_save() but then call_rcu() can be called preempt-disabled section so we would have the same problem. The second warning came from kasan_quarantine_remove_cache(). At the end per_cpu_remove_cache() -> qlist_free_all() will free memory with disabled interrupts (due to that smp-function call). Moving it to kworker would solve the problem. I don't mind keeping that smp_function call assuming that it is all debug-code and it increases overall latency anyway. But then could we maybe move all those objects to a single list which freed after on_each_cpu()? Otherwise I haven't seen any new warnings showing up with KASAN enabled. Sebastian