Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp730077pxv; Thu, 8 Jul 2021 12:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS+/XKWrFcgmFjc88L1BPkztxDhyxobe+sn33m5kUwID2dD2DX0uVB0LfF7vfUK5a9AIgi X-Received: by 2002:a92:c80a:: with SMTP id v10mr22792831iln.251.1625773355201; Thu, 08 Jul 2021 12:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625773355; cv=none; d=google.com; s=arc-20160816; b=yxQZfZRUq7AIfJOLnrt8J9lRcpdQvMiVemUhwtPHO6IeICWGCPRjM0fD6o5XK5gRrn NIqtb5ZQeeCfMf6rS234nYRFam+2tS7s9vJ/QpzvPFTeQ1WbzVL7RUpoJokb8lz3cc/m jfCrUTl06IvgzimafyIaJy3C9zr9wHKWRnlwh6xHecYWQ82010vghQY2hp8k3MZxycYv 8mk8zRzfe55WTOJrS702nKjFKgqIJxTmqU1JoIute8gM+6jYjyKT941XUQsb/6WbyF0D 4faK4+jDKi8RexR1xTUWDPHYoghJyVGhOB0SD7rliL+xI/C4FfEBKiE/NOYbZ7Vp5doI WfYA== 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=Bj7dNjsPUKbHFxGqaGSxYHlxZLa3XC/EGhNU6JYPgJ4=; b=tLiYpdYWoyCxf9hpbQo1ZMDd06AQhCjnNdz5SP6yWIrelQSI2F0ZanY8zrz5CWHtPQ ehoYfGmmLoU8e8MXBg4dlvS2p1YRQZ8UjLzbWux3P07sia/xoFy5D8nUzo2nsbS/x/DZ qvMGUMLr5G0AYAOb5Vk3CJUMFjRmqb2+NvwJS5Elyo7N44YyvSfhkanndIZxkhfDGGYX qcsjg1Uqsh7t2dD4JG6FFymgK0awtoSBd3Quadz+/JPNvzdC4wQUfl+xZg+eMXEzIFdW 2Q+q0oLeJjro9pOojdFk0Cd80AwATMhpfZqRovdAZTYMYcmcsTnrAxBNzZjrrlWj3MQX oEzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kAA3brOx; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si2923905jaf.47.2021.07.08.12.42.22; Thu, 08 Jul 2021 12:42:35 -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=@gmail.com header.s=20161025 header.b=kAA3brOx; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230191AbhGHToe (ORCPT + 99 others); Thu, 8 Jul 2021 15:44:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbhGHToe (ORCPT ); Thu, 8 Jul 2021 15:44:34 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB9DC061574; Thu, 8 Jul 2021 12:41:51 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id v14so18497191lfb.4; Thu, 08 Jul 2021 12:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Bj7dNjsPUKbHFxGqaGSxYHlxZLa3XC/EGhNU6JYPgJ4=; b=kAA3brOxhuB1/yqrpzNZouQy6CJ0zmKFEhxkZAVwFNJu6QQ6Sv0jbZQ2IAwRVVup/E vcDvgJ7RZO+gIm7iKSCO1QyFr07bu+DM/n5Ypi96aoMqpsB9H+xTEAhnG2nAeHNFbNat OsKgkzTf+Uyz70gPGI5ynMa6lMKDDyV0uny9Yt5MngP6eD46ClZv3u1nA/JaoaMR4tHV kYRlWBsX66ZlOsEtevV13yqn6hk5OZB2um+MKofy5uyQHqPWU6JFmn0M42OfOhaXmDE+ H7FfccxoZHQkIQEPfHhpaD4Rb1xrfiTT7PLp8fxlGhOevIZE0L1Tcf0nY0yAgaPdLBla dYhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Bj7dNjsPUKbHFxGqaGSxYHlxZLa3XC/EGhNU6JYPgJ4=; b=AITtfZbsgh6qjGEPENUISecKc7++/L/fp1a5ErAFrnfB+HhmNuNb+nJ+kLEjUeJ+JM 3kpxJG1MyixsVa1vjsP2DkcotZ+0DqaYG/Le2T8uBD1aR1IyBYJIcJIXgxDI5DWkNjkk p46d4o5RNJcNevNGpgIzqjWnhArPZod2EVlnn4taGNIqpzgKoymbKnATw9REU8+UuiXx Py5L0oAdjp7l5CNibEK/FH8e5P0yKfoJNoOzi2WuRcWyrkUKDPfnw2lWI6SefBPz8iVw Oob8IQSa2ZVhYdqWJCwnNz/9JLIo76Q6XB01LUdjtMHPwTiH74sMkgYicczdFaoLaa2X eDng== X-Gm-Message-State: AOAM530hmPqt1UGlrE7pBVHUous5zDAKTPFQ1L4D/80FITH0alzmNnBx 3JS0S0g0pu55JBmKTB/2bLA= X-Received: by 2002:a19:6b14:: with SMTP id d20mr21042968lfa.562.1625773310197; Thu, 08 Jul 2021 12:41:50 -0700 (PDT) Received: from mobilestation ([95.79.127.110]) by smtp.gmail.com with ESMTPSA id u5sm325610ljh.29.2021.07.08.12.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 12:41:49 -0700 (PDT) Date: Thu, 8 Jul 2021 22:41:47 +0300 From: Serge Semin To: Marc Zyngier Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , kernel-team@android.com, Guenter Roeck , Thomas Bogendoerfer Subject: Re: [PATCH] irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry Message-ID: <20210708194147.a236rqwybgsugwe4@mobilestation> References: <20210706110647.3979002-1-maz@kernel.org> <20210708094608.anrgynyzu6h233pr@mobilestation> <87eec83glb.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eec83glb.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 08, 2021 at 05:39:28PM +0100, Marc Zyngier wrote: > Hi Sergey, > > On Thu, 08 Jul 2021 10:46:08 +0100, > Serge Semin wrote: > > > > Hi Marc, > > Thanks for the fix. > > > > On Tue, Jul 06, 2021 at 12:06:47PM +0100, Marc Zyngier wrote: > > > Since d4a45c68dc81 ("irqdomain: Protect the linear revmap with RCU"), > > > any irqdomain lookup requires the RCU read lock to be held. > > > > > > This assumes that the architecture code will be structured such as > > > irq_enter() will be called *before* the interrupt is looked up > > > in the irq domain. However, this isn't the case for MIPS, and a number > > > of drivers are structured to do it the other way around when handling > > > an interrupt in their root irqchip (secondary irqchips are OK by > > > construction). > > > > > > This results in a RCU splat on a lockdep-enabled kernel when the kernel > > > takes an interrupt from idle, as reported by Guenter Roeck. > > > > Alas I am still on 5.12-rc4, so can't test it out at the moment. Soon > > after getting further on the modern kernel version I'll give this > > patch a try on my hw and send a report. > > It is likely that I'll send a pull request to Thomas with this > shortly, given that it affects existing systems and that this patch > does address the issue (see Guenter's report). We can always amend > things once you've had the time to upgrade your kernel to the latest. Ok. I'll report the test status once my working branches are rebased on the latest version. It will be done in a few weeks from now then after I finished my current activity. -Sergey > > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible.