From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by gnuweeb.org (Postfix) with ESMTPS id 063C47E582 for ; Mon, 6 Jun 2022 19:48:16 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=TD3VNjXX; dkim-atps=neutral Received: by mail-ed1-f43.google.com with SMTP id b8so3527930edj.11 for ; Mon, 06 Jun 2022 12:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DT6839JbDy2yIdEYMFoTCSnqwzHXVdWj4aG9+gbEJ94=; b=TD3VNjXXe98Co3b86I6MMAPvAqs7GFH9zK5G2EFMl80w/4jTsLDTJTlvJaPlCJ165s hN2+7BnMlwCh8SH5aG2nXEF9n5Jn6LQtN4zAVq5mmshHyYzYyDJZcnSBlQSMRFduucv2 UlPhDYoxVlqwIbAP7DMLZrAx/ovYm8t7HBN8I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DT6839JbDy2yIdEYMFoTCSnqwzHXVdWj4aG9+gbEJ94=; b=vIDcg6t3nSxD1r617hZm5oRswm6EqOC9GKemcKR+gmrHlDBT8hUahW2+qL4fdPOVj9 X5NhbPfQb6+EH8UfJyCAPuK8KT0ahXiSQjRyFBg0JSp35Jxamvzwfl/dqprCz0yMJDEE LeAb0OzWdMdzTe4Hp2gLwc7WDQznJg0wZq+o+6opOZr7gHzTrYuYfw8JSxIZ7fUrbN+T eQJxEeDDOXB+bnmdNnuDpNw/SB0Cft7IbaQHtZ+/QcUFipKtOstZkk409RN+sHcrRLS/ 7W515v4U/DrDn6yQxZSXis+xDTVrKJxopiap9segVCEBH3uWvDh3OUYRcrEIABN8PYe6 w0SQ== X-Gm-Message-State: AOAM532Zp1h7np87SkQ/5gGa7XCazss1UEmcZelE8JpckzOKlAkiqnGU ghE4qXDI5ytzzVVpIL8/95vKeA5BiyQDQCPHPKU= X-Google-Smtp-Source: ABdhPJwU4m9lAxVZHZtH9nYLjEIpHrgUqIyQBOzZ7/IYuiASSX/FGxNM69t6gNEIqPeKa7FXFIw33A== X-Received: by 2002:a05:6402:1d4a:b0:42e:93de:17f4 with SMTP id dz10-20020a0564021d4a00b0042e93de17f4mr20919945edb.8.1654544894075; Mon, 06 Jun 2022 12:48:14 -0700 (PDT) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com. [209.85.221.47]) by smtp.gmail.com with ESMTPSA id cx12-20020a05640222ac00b0042bd6630a14sm9388901edb.87.2022.06.06.12.48.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 12:48:12 -0700 (PDT) Received: by mail-wr1-f47.google.com with SMTP id q26so10836491wra.1 for ; Mon, 06 Jun 2022 12:48:11 -0700 (PDT) X-Received: by 2002:a05:6000:16c4:b0:20f:cd5d:4797 with SMTP id h4-20020a05600016c400b0020fcd5d4797mr23878066wrf.193.1654544891292; Mon, 06 Jun 2022 12:48:11 -0700 (PDT) MIME-Version: 1.0 References: <226cee6a-6ca1-b603-db08-8500cd8f77b7@gnuweeb.org> <87r1414y5v.fsf@email.froward.int.ebiederm.org> <266e648a-c537-66bc-455b-37105567c942@canonical.com> In-Reply-To: <266e648a-c537-66bc-455b-37105567c942@canonical.com> From: Linus Torvalds Date: Mon, 6 Jun 2022 12:47:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Linux 5.18-rc4 To: John Johansen , Thomas Gleixner Cc: "Eric W. Biederman" , Ammar Faizi , James Morris , LSM List , Linux Kernel Mailing List , Al Viro , Kees Cook , linux-fsdevel , Linux-MM , gwml@vger.gnuweeb.org Content-Type: text/plain; charset="UTF-8" List-Id: On Mon, Jun 6, 2022 at 12:19 PM John Johansen wrote: > > > I suspect that part is that both Apparmor and IPC use the idr local lock. > > bingo, > > apparmor moved its secids allocation from a custom radix tree to idr in > > 99cc45e48678 apparmor: Use an IDR to allocate apparmor secids > > and ipc is using the idr for its id allocation as well The thing is, I'm not entirely convinced you can deadlock on a local lock. A local lock is per-cpu, so one CPU holding that lock won't actually block another CPU holding it. Even on RT, I think. I *think* local locks are useful for lockdep not because of any lock chains they introduce, but because of how lockdep catches irq mis-use (where they *can* deadlock). But I may be entirely wrong, and maybe that lock chain through the local lock actually does matter. Let's bring in people who actually know what they are doing, rather than my wild speculation. Thomas? Linus