Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2737278pxb; Mon, 31 Jan 2022 03:15:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9YSUOqzwsMpxKfYmUjbfxlF9QDaNFTKv6cUApi2xJTxwn0yJdI9r8b+RsBMoOXFOgrysN X-Received: by 2002:a17:906:c105:: with SMTP id do5mr16631423ejc.165.1643627729373; Mon, 31 Jan 2022 03:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643627729; cv=none; d=google.com; s=arc-20160816; b=vyNLf5v5grC0Qk6xbQPkkYrxHYxBeLccMZGD/JEUxkEVrB3bd+PiG2Zz3UYMLdct0M SsVkZaUuGvB4rFfu18ocVqE96TEABAhMd5KuaDpcmANER6Z+M5ZKzmn+Dr/EUEojgf5D 2KM0hTnvYvB4S0dzhzH6OXlQcC/aQQB8sVZb97KL6a1y9dj1fSLV3y5JhAVR8lQ+iLZe fYumq1AVoPqCxTxpeiUm1hocpa03LqTCc2qh0Be++Wpy46B0a4ci0C04dDAqEZK8YV7M /zOF9LobodpQ5gHRlVbyEZJ38q3xCowxBNG0GVopZxbURWnNl1//A0tk/19xZ8rqQTzA qwHw== 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=7FKobJhoy7WUzr8IQkz4Rgy6lr68RmX0KGYKnV3Jq7A=; b=VvYn/rCzQozjnEhIRT6Z1qPOFKhPk4j/1KfSsphVhnUj7ZtJX1gg8RVDKfHWYP3CMK KsJqD2bIC7/y4BEzZqzDQwDNfyLPeez6dOzOK+vFCZcmcj3z9HxNpSw663K3+fPhjdH4 PeTekTAS7Va85mINoNw0wfwExcTscYgGhqiMcCfe/62Wg0I144RUuSCN4adEwxTyjWu6 D1cu9e2s3Zn0Sn2/kXuBw+Mj/CTa0WatxuZpXdJ2sqKicA980+zmr47mvw/FloA/Z2mF 6qQOblETMiyq5IVth/nvopKcmCypgLqOCOMw+Vb8swmB92AMLLs7NonHmfd5xd8xydvI H5vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=CdJcfcLO; 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=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sd1si8719111ejc.860.2022.01.31.03.15.04; Mon, 31 Jan 2022 03:15:29 -0800 (PST) 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=@zx2c4.com header.s=20210105 header.b=CdJcfcLO; 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=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349906AbiA1QEc (ORCPT + 99 others); Fri, 28 Jan 2022 11:04:32 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:47730 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbiA1QEb (ORCPT ); Fri, 28 Jan 2022 11:04:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D9AA461EE0 for ; Fri, 28 Jan 2022 16:04:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31E5FC340E6 for ; Fri, 28 Jan 2022 16:04:30 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="CdJcfcLO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1643385867; 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=7FKobJhoy7WUzr8IQkz4Rgy6lr68RmX0KGYKnV3Jq7A=; b=CdJcfcLOfzJ5JEQ/fL6px0XaBMVQJ1QF8rReA5bzI5xJo3ryKXdsfBXzjn1kmtbpJHrEqB 1udybHl1Z1HityIxnFgmhHG9iOqbzww27iykrtAPjak0dz42s///dMUnqNSJrD0bwgDhhN Cnld6iFAOvk0c8oxQccrVHeExW6mAwQ= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 3223b17e (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Fri, 28 Jan 2022 16:04:27 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id g14so19772291ybs.8 for ; Fri, 28 Jan 2022 08:04:26 -0800 (PST) X-Gm-Message-State: AOAM5301q/iJ3G4ozOxlfo2yZBPa305LFlgkcZPB4KfYfFPhbMFJgRJw L9coOMpm08ysCraLmx4FHQdEpjz/l4XJnsfU7Tw= X-Received: by 2002:a25:bd08:: with SMTP id f8mr6053390ybk.121.1643385864960; Fri, 28 Jan 2022 08:04:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 28 Jan 2022 17:04:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: "BUG: Invalid wait context" in invalidate_batched_entropy To: Sebastian Andrzej Siewior Cc: =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= , Andy Lutomirski , LKML , "Theodore Ts'o" , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian/Jonathan, On Fri, Jan 28, 2022 at 9:35 AM Sebastian Andrzej Siewior wrote: > This report is due to CONFIG_PROVE_LOCKING=y _and_ > CONFIG_PROVE_RAW_LOCK_NESTING=y. It reports a nesting problem > (raw_spinlock_t -> spinlock_t lock ordering) which becomes a real > problem on PREEMPT_RT. Hmm, I'm still having a tough time reproducing this. I'm trying to understand your intuition. Is the problem you see that something else in the IRQ path uses a raw_spinlock_t, and then with that lock still held, we call invalidate_batched_entropy(), which takes an ordinary spinlock_t, non-raw? And taking a spinlock-t while holding a raw_spinlock_t is illegal? Jason