Received: by 10.213.65.68 with SMTP id h4csp903510imn; Fri, 6 Apr 2018 10:53:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZvNux1X4VjZ1wak7N8Zp7HqiWKvRIMZggK5lOVOZttwAoQN9g6pUWxD0t57jeGmUwbkD8 X-Received: by 2002:a17:902:7b81:: with SMTP id w1-v6mr7251223pll.235.1523037231991; Fri, 06 Apr 2018 10:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523037231; cv=none; d=google.com; s=arc-20160816; b=mdFWQoMdCZ9onqoRU0+vl2azfh8+C6/j9bWoLoIHythlJQaV5Aehl4LRauQUOmBEGj EgLUCdsQHCkxNcp3fiNYwTTIyPygYhJvZifAy9C3soOiv1LM1uwz5xJLQR+GO5fOrHL2 Z6iuy08lnbDblaiBOfZZy4EhNAlAjG7jDlrltDAlWbx9sB4PIDSG0QrAHxMyGMhqCmuk wgOyBiqZAJPNMDyu96SeKXFhcc5E0iL52MUtpgv+jMWaH1fJ2bh61wEf3sDxTT7RnUhW JothAykpiptxGVMJL3TjVbhCd1KpnXZMgNMhBjQeXhdOtp3y9twZqIN4+wzbvYUkUy7N QPeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=SoUDkcRSZKDAXXZWqMKkRM0TjOvDV6Ba4rZeehbzMbs=; b=SKywa1IvUH0nWB3bCS1j6AM2O2kKRlyVLDUd3KF2d5djAQWn3Jrkpb24FkCoIrIwCn TCcIWEU0aWw0/npmH93Y600rFEmXyK4bZh0jj7HOO+UH4S7eKT9a9bh9vss5nPFTtCBF uTGEj3U4W/5JUWv15Jz7Fu6hZlPP0lLumO9LWs+Pw4meANEr5Z77ahWFndM20TpmO8FL KJucVXfPmNMoEHljoKlSqOo2yBtq1B5I5qFAVzkgF55sBHx9bAEpjzbo7+f/4qlAGb9t ylgZe7dBcq3Fffdm+Mt3YPTCrobBjIw6p8dmOep22XB5uT7gLi+BSE2lDMvlgTPSsqGg BKnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m190si5802181pga.710.2018.04.06.10.53.11; Fri, 06 Apr 2018 10:53:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751412AbeDFRuf (ORCPT + 99 others); Fri, 6 Apr 2018 13:50:35 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40570 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbeDFRue (ORCPT ); Fri, 6 Apr 2018 13:50:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8C3280D; Fri, 6 Apr 2018 10:50:33 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 27E3B3F587; Fri, 6 Apr 2018 10:50:30 -0700 (PDT) Date: Fri, 6 Apr 2018 18:50:27 +0100 From: Mark Rutland To: Yury Norov Cc: James Morse , "Paul E. McKenney" , Will Deacon , Chris Metcalf , Christopher Lameter , Russell King - ARM Linux , Steven Rostedt , Mathieu Desnoyers , Catalin Marinas , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Alexey Klimov , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] arm64: entry: isb in el1_irq Message-ID: <20180406175027.oxaru6r3zptct7vb@lakrids.cambridge.arm.com> References: <20180405171800.5648-1-ynorov@caviumnetworks.com> <20180405171800.5648-2-ynorov@caviumnetworks.com> <5036b99a-9faa-c220-27dd-e0d73f8b3fc7@arm.com> <20180406165402.nq3sabeku2mp3hpb@yury-thinkpad> <20180406172211.r42reit2bnpocab2@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180406172211.r42reit2bnpocab2@lakrids.cambridge.arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 06, 2018 at 06:22:11PM +0100, Mark Rutland wrote: > Digging a bit, I also thing that our ct_user_exit and ct_user_enter > usage is on dodgy ground today. > > For example, in el0_dbg we call do_debug_exception() *before* calling > ct_user_exit. Which I believe means we'd use RCU while supposedly in an > extended quiescent period, which would be bad. It seems this is the case. I can trigger the following by having GDB place a SW breakpoint: [ 51.217947] ============================= [ 51.217953] WARNING: suspicious RCU usage [ 51.217961] 4.16.0 #4 Not tainted [ 51.217966] ----------------------------- [ 51.217974] ./include/linux/rcupdate.h:632 rcu_read_lock() used illegally while idle! [ 51.217980] [ 51.217980] other info that might help us debug this: [ 51.217980] [ 51.217987] [ 51.217987] RCU used illegally from idle CPU! [ 51.217987] rcu_scheduler_active = 2, debug_locks = 1 [ 51.217992] RCU used illegally from extended quiescent state! [ 51.217999] 1 lock held by ls/2412: [ 51.218004] #0: (rcu_read_lock){....}, at: [<0000000092efbdd5>] brk_handler+0x0/0x198 [ 51.218041] [ 51.218041] stack backtrace: [ 51.218049] CPU: 2 PID: 2412 Comm: ls Not tainted 4.16.0 #4 [ 51.218055] Hardware name: ARM Juno development board (r1) (DT) [ 51.218061] Call trace: [ 51.218070] dump_backtrace+0x0/0x1c8 [ 51.218078] show_stack+0x14/0x20 [ 51.218087] dump_stack+0xac/0xe4 [ 51.218096] lockdep_rcu_suspicious+0xcc/0x110 [ 51.218103] brk_handler+0x144/0x198 [ 51.218110] do_debug_exception+0x9c/0x190 [ 51.218116] el0_dbg+0x14/0x20 We will need to fix this before we can fiddle with kick_all_cpus_sync(). Thanks, Mark.