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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 DF560C4332F for ; Wed, 22 Sep 2021 06:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C75DC61184 for ; Wed, 22 Sep 2021 06:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232832AbhIVGdl (ORCPT ); Wed, 22 Sep 2021 02:33:41 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:53416 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232710AbhIVGdk (ORCPT ); Wed, 22 Sep 2021 02:33:40 -0400 Date: Wed, 22 Sep 2021 08:32:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632292329; 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=LHGvGMeI0MChbmKlKUQjDfvhqjuQaXlro5jHJuiZF4w=; b=AFVjxbaCU1HStARR3s5GptNPD2J5/N0DhTmeIwza4KWjgE+XUqWjrBrxHbQGi7hd7Zc7js BHFE42pswXTDMhQasgTwaXzYu1Z5U7vQqOUkhQxJkwL44gOvnvS936y1q6EXfoP6eSvqAj Zm5RWUWQjozxlGg1uiJx4q+3169rv57mrbiYxUk/p882wbSwK6BZFw6qvBGh3REOZ+X1XY /SBVb/7v658z3MqITZma+6RAWuLc8OqTz8T9jLfSEy2wlmX5hWZmrIpyBGhvNr5mDfW2wD JkAea82CIUY8rNHK5VEh5oHqy1BhWnhx1QTf4WpFKkSKUgGysTJnwsKbugSQ3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632292329; 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=LHGvGMeI0MChbmKlKUQjDfvhqjuQaXlro5jHJuiZF4w=; b=XOSDGiTQMoMm+wYlF4/FhKR/TW81atLKv4UkTrp7RxxMkfUED2spl7KHV32imSzOmG+EnO gY3q8TF3EL5ks0CA== From: Sebastian Andrzej Siewior To: Frederic Weisbecker Cc: Thomas Gleixner , Valentin Schneider , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Daniel Bristot de Oliveira , "Paul E. McKenney" , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: rcu/tree: Protect rcu_rdp_is_offloaded() invocations on RT Message-ID: <20210922063208.ltf7sdou4tr5yrnc@linutronix.de> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-4-valentin.schneider@arm.com> <874kae6n3g.ffs@tglx> <87pmt163al.ffs@tglx> <20210921234518.GB100318@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210921234518.GB100318@lothringen> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-09-22 01:45:18 [+0200], Frederic Weisbecker wrote: > > Also while at it, I'm asking again: traditionally softirqs could assume that > manipulating a local state was safe against !irq_count() code fiddling with > the same state on the same CPU. > > Now with preemptible softirqs, that assumption can be broken anytime. RCU was > fortunate enough to have a warning for that. But who knows how many issues like > this are lurking? If "local state" is modified then it is safe as long as it is modified within a local_bh_disable() section. And we are in this section while invoking a forced-threaded interrupt. The special part about RCU is that it is used in_irq() as part of core-code. > Thanks. Sebastian 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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 E3F42C433EF for ; Wed, 22 Sep 2021 06:35:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B372961178 for ; Wed, 22 Sep 2021 06:35:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B372961178 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PUuuUc6yLZSIcDtg92dUVIXOVvDJrqylJtwF09/faGo=; b=IdrmpGt4vBZJs3 VvKX/08driUr6jvmkJQUNjl2wg9q1T2VXjlwxSAaEtCm0lbjU9Rm967rZGUZiOA5JepH0for0GYL/ UjIoOVqK2Jh8+2EWqreTi9HEm1patDmuqoIw9DaaY6aw4A2ylSMY7WcERmcfqFgfwRsFOV/YxK58T A30fh+Zp8fggpjhY6CiXun1ps4waJp+XJEMd0GXE0rqB4iS8QTJyPMsG7QzXjA/7crYiTiKzWrtSF VVcgk8uynY18O0LV7Rxd7S8ldkaYAXitw5G0v+ssN7r3B03uv5NVPgq8Ugx9oF6UfTJ4j0slJsWj1 s79hGRaN1oA/XlkKduvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSvny-0074Qz-GW; Wed, 22 Sep 2021 06:32:31 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSvns-0074KT-0K for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 06:32:25 +0000 Date: Wed, 22 Sep 2021 08:32:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632292329; 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=LHGvGMeI0MChbmKlKUQjDfvhqjuQaXlro5jHJuiZF4w=; b=AFVjxbaCU1HStARR3s5GptNPD2J5/N0DhTmeIwza4KWjgE+XUqWjrBrxHbQGi7hd7Zc7js BHFE42pswXTDMhQasgTwaXzYu1Z5U7vQqOUkhQxJkwL44gOvnvS936y1q6EXfoP6eSvqAj Zm5RWUWQjozxlGg1uiJx4q+3169rv57mrbiYxUk/p882wbSwK6BZFw6qvBGh3REOZ+X1XY /SBVb/7v658z3MqITZma+6RAWuLc8OqTz8T9jLfSEy2wlmX5hWZmrIpyBGhvNr5mDfW2wD JkAea82CIUY8rNHK5VEh5oHqy1BhWnhx1QTf4WpFKkSKUgGysTJnwsKbugSQ3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632292329; 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=LHGvGMeI0MChbmKlKUQjDfvhqjuQaXlro5jHJuiZF4w=; b=XOSDGiTQMoMm+wYlF4/FhKR/TW81atLKv4UkTrp7RxxMkfUED2spl7KHV32imSzOmG+EnO gY3q8TF3EL5ks0CA== From: Sebastian Andrzej Siewior To: Frederic Weisbecker Cc: Thomas Gleixner , Valentin Schneider , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Daniel Bristot de Oliveira , "Paul E. McKenney" , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: rcu/tree: Protect rcu_rdp_is_offloaded() invocations on RT Message-ID: <20210922063208.ltf7sdou4tr5yrnc@linutronix.de> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-4-valentin.schneider@arm.com> <874kae6n3g.ffs@tglx> <87pmt163al.ffs@tglx> <20210921234518.GB100318@lothringen> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210921234518.GB100318@lothringen> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_233224_236028_A3413834 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-09-22 01:45:18 [+0200], Frederic Weisbecker wrote: > > Also while at it, I'm asking again: traditionally softirqs could assume that > manipulating a local state was safe against !irq_count() code fiddling with > the same state on the same CPU. > > Now with preemptible softirqs, that assumption can be broken anytime. RCU was > fortunate enough to have a warning for that. But who knows how many issues like > this are lurking? If "local state" is modified then it is safe as long as it is modified within a local_bh_disable() section. And we are in this section while invoking a forced-threaded interrupt. The special part about RCU is that it is used in_irq() as part of core-code. > Thanks. Sebastian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel