Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3461780pxy; Tue, 4 May 2021 02:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrvYy0EvgKbO7LsJwMTPSIHmKsqBUyJn9c9Z5AlGyQ5xODZKC0Le08WLqjXQ//x/NrmU+m X-Received: by 2002:a17:90a:c298:: with SMTP id f24mr3968928pjt.38.1620121824413; Tue, 04 May 2021 02:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620121824; cv=none; d=google.com; s=arc-20160816; b=EoPrfitj6FNYoiZpdxYyInC4FaW52eM9T3YpT05W3IRBX8aY7U81fxlejdZGAZs0px HoszzE8GlwDban0+IxFCuvlZ91RUvGpUSOTrwqJe0vnt/VDQX1XFzFeSryWetxUGSQEf 49ob4hyqpJ49Ppsd3U9UwVfKYpbwV5Cao7H7dM742iKO8K0uTJ76CNcO4bjbmi3sUCNo kMuZyQxfjLCf4hdfXTHlL9JaNd/+CZlGuQRG2ShUOs4OZmEmiASmiPL8sfkPlzSJPozE WeTgGWYCsYTBIHSABBWUsLY2uvlhIA3aoVTxCCvhGyF2Ahs/4ixrPXsFYOLq9MuwS1hx 2yMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v3J7n0hMzc3/Uwkfxm+uPhLPqR/xUmsvFlQQlOHA4BQ=; b=EwA+QCqvADa7YRXvqMGqvXBjLpGZJZRike0HN4jEidMtjvbuU1cCPjvJF/t2XzGFez S2EzZJ0C+13qeerCktXudZoIbyGkQMPuowWMPIfFENguFU43746TJr3mODxyNJcRITCb 00Ql7YmQy90OaHw4hdyE/VLsevp7izPxA7pi8azftGxj5aIBJ0LK+1/y+HzBgdSGo/ru kSJ4ikvab9Fb2IX4yhmr1oL9YFiezLGhw+AqFMZpWk8wYIrzLzewPuD+xIh8EnB8Nlrg djCMICOBSyGvhPll0erZxGAPhPxqZXgbsOlD1g5e2uzFX0+V+Uj2ImHGezelzUXNN1NX Ubnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=ZF3tmLP+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si17957552pjc.45.2021.05.04.02.50.10; Tue, 04 May 2021 02:50:24 -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=@infradead.org header.s=desiato.20200630 header.b=ZF3tmLP+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230100AbhEDJuI (ORCPT + 99 others); Tue, 4 May 2021 05:50:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbhEDJuI (ORCPT ); Tue, 4 May 2021 05:50:08 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58E88C061574 for ; Tue, 4 May 2021 02:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=v3J7n0hMzc3/Uwkfxm+uPhLPqR/xUmsvFlQQlOHA4BQ=; b=ZF3tmLP+ojR8CRA9/luv0dP0CN gFCKteEbOlbaK71zAm74XEikY61qWY5gRdfVEjq6XvHDxrH9G4R+5lJrchZ1kxqg94HFxzbME8/7C zDlDSSxX/yMksEGN4/NLBJH2pfwfW2ha8jE2VeLGhIudxIBAN3bbbG8XZu08GKjcxmH13NZaXvJCf NleyOy0rycCz4gXGXNcLYNVd9li9S5jUuTHcEvmUMDQgbf3drHWg6tMuST4vpuGXOcUnxw56wCCGs 5diH8vsIjZzdreWyCGya9IWRuFYfvNoxNRvf/tuwRBHdNyZXMWwUM5No0PhbcWzjsUtVnTLrdYbCS pzUZ9fvg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1ldrfx-00FuWt-9T; Tue, 04 May 2021 09:49:09 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8464830022A; Tue, 4 May 2021 11:49:08 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6B9A1207C950B; Tue, 4 May 2021 11:49:08 +0200 (CEST) Date: Tue, 4 May 2021 11:49:08 +0200 From: Peter Zijlstra To: Dmitry Vyukov Cc: Andi Kleen , LKML , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Andrew Morton , kasan-dev Subject: Re: [PATCH] stackdepot: Use a raw spinlock in stack depot Message-ID: References: <20210504024358.894950-1-ak@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 09:23:34AM +0200, Dmitry Vyukov wrote: > So why is this a false positive that we just need to silence? No, it's a correctness issue for PREEMPT_RT. > 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. Documentation/locking/locktypes.rst has the low-down IIRC > I wonder why we never saw this on syzbot. Is it an RT kernel or some > other special config? IIRC the kernel isn't really PROVE_RAW_LOCK_NESTING=y clean yet, so mostly these checks aren't on by default. printk() used to be a common offender, but I've not checked the very latest printk status to see if that got fixed meanwhile. > 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. That would be preferable I think.