Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3807502pxy; Tue, 4 May 2021 10:19:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbvTVmDg45jz0jMpnuER4Hg+v+i728ORFcFLBEHxNKfOxxzyvcpY/jNXlWZkFsD9+Zota2 X-Received: by 2002:a17:903:3106:b029:e9:15e8:250e with SMTP id w6-20020a1709033106b02900e915e8250emr27021620plc.33.1620148755899; Tue, 04 May 2021 10:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620148755; cv=none; d=google.com; s=arc-20160816; b=J8ubUfcveJSO2SW9DR4RSuBBGNxG2XUPGadhRGtl+NReNegUE3e/fW28fJzq9LbCA6 pk+RsTdffNe2D4N4ND5Ls4Ucl9jz0lZjCZ+03NagL1VTyXaVBTjir7nAEHndzKPtjLHz tf9d0Gfat6lJfFKvftucl27QDOASxX7FoaFSiDfnwhNQb2Bknm//3MOsgP5DVlS2aJ3P bOxJgA282Js1omOpVEnQZlpLYFNcoZ8eoNW/dONFj315LVtFRGv6zJeFLnAgGiVRMuBB Z1qsvZPqhwVZ60lfYy61ljY+pehWH5rSk9OFOvWSR7tHswzwaDgG63jnAm1nMJSkyCjf lzFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4RwyehG38JsKD/EL1cHF9aUCKECHFf4iXyx7IfSeRco=; b=x/099vPYeUzpV5rD2wHM+WZe3RkWPu673sEbFPEg5Uofjxwi8ClY1m3yzUpy13GxEh umYQXd2xQDAbkcRiHNlIeBgEm1A/tFZbAsYjwyPWHOVV8Lp9mCbl3WYCuxn3/CCiQfXG 51rdeIlpGON0RfZswxgEPJ4AiNT5cWhhbhaEXd4WkwN1D/KIktxyz8DJXVcYSgsbPnpj rgs0Wgebz3evV4IXtr+NV0uq5/e+EXIngRmoemPoAGlB6HUzqtm/WALl/lNQIVUvNY1V LG4VgVkV9Uqnq7gMR9/jA9PO+fL5MPkSpuk0P/Bc7c5CnoGjaRwOSE15Ba0sYwOuIvmr IXJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lV9pNu1A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si4295023plr.271.2021.05.04.10.19.03; Tue, 04 May 2021 10:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lV9pNu1A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232047AbhEDRSk (ORCPT + 99 others); Tue, 4 May 2021 13:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232043AbhEDRSj (ORCPT ); Tue, 4 May 2021 13:18:39 -0400 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27BFC061574 for ; Tue, 4 May 2021 10:17:44 -0700 (PDT) Received: by mail-qk1-x72d.google.com with SMTP id u20so9298702qku.10 for ; Tue, 04 May 2021 10:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4RwyehG38JsKD/EL1cHF9aUCKECHFf4iXyx7IfSeRco=; b=lV9pNu1ALFgRJuH/a8BPUcC7sm4Cr3vz7ftGYoqy4deMX7Y/v2pj4Dp4Lvsbg8aFlP sj/JAdjnrJ31J3yfRabtpEb1MLTmH6Aq16boUMdmZZByMy+13P3eQcUo8rUdK7ELXj25 x9vmtxFSyoLE48wzUosIZpewe1kZJ+C20WwdD1wU6NzsId5rI1RFYIvkY1klKbiAicbC LrAdqAvJ0ybDqvPIxytGPyZqTI3yf+qXVjPNDAQOQcarZZOVriVWpi85U20k00g/z6eR +7QzKffzEExlgvNdjZlU1Bym0YWn6Cum833brbZi0EKren2GD3knxzJRyw25gvhOV9NV /zWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4RwyehG38JsKD/EL1cHF9aUCKECHFf4iXyx7IfSeRco=; b=XUP3xLmJwIirm2Ao11W4XFOFLuATRne6yZqvQ5Hz+zXdJx3RRBgiA31aTHbniTllJ+ jgkcVxVx0cA6EnGd+LyJSnhwPrHz0YEjmF4PcRIqg6UsTsc6Ufg0TtubcQxlH5W5vAfo wQoLq7fmaPhf6t8+Ob2wzyiNcyj1eGXjo+POfOIwBuEc3ddNr8TqSwfdrogSFi1BNTWn c98B4kAqgbNuuYsDOPoxTrhtNau0HtfV0XCYOYJdJ1f/MlFccoV9+l0mCo+0+xKD+bYJ buk+roO88i3TE30VVSQv9rncuD9Iia/iuDelFvhPzPyyS6xnsWNqmozuiWeYS8KvEXK+ EXgA== X-Gm-Message-State: AOAM532eEUfjKb+FXxTgwKexYJoLlfZ/htbHxPvBlTNFgdfZ9HaaH/kf ZYcBxaB1LZ+tzrBrV+YGtzgmUjHgw+qaLp1Bc9/okw== X-Received: by 2002:a05:620a:89d:: with SMTP id b29mr27216870qka.231.1620148663606; Tue, 04 May 2021 10:17:43 -0700 (PDT) MIME-Version: 1.0 References: <20210504024358.894950-1-ak@linux.intel.com> <77634a8e-74ab-4e95-530e-c2c46db8baa7@linux.intel.com> In-Reply-To: <77634a8e-74ab-4e95-530e-c2c46db8baa7@linux.intel.com> From: Dmitry Vyukov Date: Tue, 4 May 2021 19:17:31 +0200 Message-ID: Subject: Re: [PATCH] stackdepot: Use a raw spinlock in stack depot To: Andi Kleen Cc: LKML , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Peter Zijlstra , Andrew Morton , kasan-dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 4, 2021 at 5:34 PM Andi Kleen wrote: > > So why is this a false positive that we just need to silence? > > I see LOCKDEP is saying we are doing something wrong, and your > > description just describes how we are doing something wrong :) > > If this is a special false positive case, it would be good to have a > > comment on DEFINE_RAW_SPINLOCK explaining why we are using it. > > > > I wonder why we never saw this on syzbot. Is it an RT kernel or some > > other special config? > > This happened in a special configuration that triggered ACPI errors at > boot time. > > It's probably not something that is normally executed, as well as syzbot is > > probably not exercising bootup anyways. > > > A similar issue was discussed recently for RT kernel: > > https://groups.google.com/g/kasan-dev/c/MyHh8ov-ciU/m/nahiuqFLAQAJ > > And I think it may be fixable in the same way -- make stackdepot not > > allocate in contexts where it's not OK to allocate. > > > Yes that's a good idea. I've seen also other errors about the allocator > triggered > > by stack depot being in the wrong context. Probably doing that would be > the right > > fix. But I actually tried to switch depot to GFP_ATOMIC allocations > (from GFP_NOWAIT), > > but it didn't help, so I'm not fully sure what needs to be changed. We may not allocate at all, see may_prealloc idea here: https://groups.google.com/g/kasan-dev/c/MyHh8ov-ciU/m/k1LXBmonAQAJ