Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1346794pxb; Fri, 20 Nov 2020 07:23:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqF5H2+8z1Wih24Ca1qZ452F42WfJvh5LXOJVQOT6f8XH8ExLGEJwjFSEKuB3ZMzquL33T X-Received: by 2002:a05:6402:1456:: with SMTP id d22mr35081581edx.77.1605885826980; Fri, 20 Nov 2020 07:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605885826; cv=none; d=google.com; s=arc-20160816; b=F8+G+p6AHDB/HxUDgG+JZQ8cn8YQLBVJPsOpqZeJh47Ywof+hup11cysWqb3N7A3/q rUeccWJJGdfEWUXXrSIBO9CAQ614P82mxMEQPtskHfRTyuELJbOx6H342eeSMYg77diN uBaaWK7O9K4MHWMR/h7BG4FiFfL6uygjx9eMQQVpO0ZyCB9Luy7XD9jnU/UCYlh7qmt6 QfYSHplb8Dm0PklOhfiNygxzj9YlIjpblJKM7Oaz5qF9SoYCuTdwqutDAGNL7TVcYTyU Gfs2jCFdWRN2TN7DpRMIkTj15CCxHEEPfHqlLeUdy9LRcYofA0e3mdcep2Me2fODN9hr igEw== 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; bh=aCwdjyN5gAVYtfqY72qL/6aQo8bMVDUYRuEp9vgIvkE=; b=iw88T0Xq6aellz02GoX6FyVcwKcv48bTW71VY1TkGTKntSLD6LFo5d6Ar2VSYwDNlZ brp2RAJypfLGaVz35fpuecXVxUatKE5fFo234mE4BnU7wKN6TOAyQCq71djkUAwA3KJa SxJQIY9hesrHP4Djc82e1g3lfYNsUUYZG43AOxMmkpa7A4XjuIyyo64ZldQnD5SbN8TE 5Tu5rC/qia7w0lOozbPiB6yiz5EgxC71nu2f1QSz6/6F40+/EOlakMJojpB85r4kltFB zgnSCq1EczlS0fSSrzp0Un1Lmz0BJJaALd9+5SVbY8rXbunVKiLV5DE0OjFl/2quwQvR GqYA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si1768882ejb.687.2020.11.20.07.23.22; Fri, 20 Nov 2020 07:23:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729668AbgKTPWH (ORCPT + 99 others); Fri, 20 Nov 2020 10:22:07 -0500 Received: from foss.arm.com ([217.140.110.172]:50946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729579AbgKTPWH (ORCPT ); Fri, 20 Nov 2020 10:22:07 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C1C0311D4; Fri, 20 Nov 2020 07:22:06 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.27.176]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DEEF3F70D; Fri, 20 Nov 2020 07:22:02 -0800 (PST) Date: Fri, 20 Nov 2020 15:22:00 +0000 From: Mark Rutland To: "Paul E. McKenney" Cc: Marco Elver , Steven Rostedt , Anders Roxell , Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Jann Horn , Linux Kernel Mailing List , Linux-MM , kasan-dev , rcu@vger.kernel.org, Peter Zijlstra , Tejun Heo , Lai Jiangshan , linux-arm-kernel@lists.infradead.org Subject: Re: linux-next: stall warnings and deadlock on Arm64 (was: [PATCH] kfence: Avoid stalling...) Message-ID: <20201120152200.GD2328@C02TD0UTHF1T.local> References: <20201118225621.GA1770130@elver.google.com> <20201118233841.GS1437@paulmck-ThinkPad-P72> <20201119125357.GA2084963@elver.google.com> <20201119151409.GU1437@paulmck-ThinkPad-P72> <20201119170259.GA2134472@elver.google.com> <20201119184854.GY1437@paulmck-ThinkPad-P72> <20201119193819.GA2601289@elver.google.com> <20201119213512.GB1437@paulmck-ThinkPad-P72> <20201120141928.GB3120165@elver.google.com> <20201120143928.GH1437@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120143928.GH1437@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 06:39:28AM -0800, Paul E. McKenney wrote: > On Fri, Nov 20, 2020 at 03:19:28PM +0100, Marco Elver wrote: > > I found that disabling ftrace for some of kernel/rcu (see below) solved > > the stalls (and any mention of deadlocks as a side-effect I assume), > > resulting in successful boot. > > > > Does that provide any additional clues? I tried to narrow it down to 1-2 > > files, but that doesn't seem to work. > > There were similar issues during the x86/entry work. Are the ARM guys > doing arm64/entry work now? I'm currently looking at it. I had been trying to shift things to C for a while, and right now I'm trying to fix the lockdep state tracking, which is requiring untangling lockdep/rcu/tracing. The main issue I see remaining atm is that we don't save/restore the lockdep state over exceptions taken from kernel to kernel. That could result in lockdep thinking IRQs are disabled when they're actually enabled (because code in the nested context might do a save/restore while IRQs are disabled, then return to a context where IRQs are enabled), but AFAICT shouldn't result in the inverse in most cases since the non-NMI handlers all call lockdep_hardirqs_disabled(). I'm at a loss to explaim the rcu vs ftrace bits, so if you have any pointers to the issuies ween with the x86 rework that'd be quite handy. Thanks, Mark. > > Thanx, Paul > > > Thanks, > > -- Marco > > > > ------ >8 ------ > > > > diff --git a/kernel/rcu/Makefile b/kernel/rcu/Makefile > > index 0cfb009a99b9..678b4b094f94 100644 > > --- a/kernel/rcu/Makefile > > +++ b/kernel/rcu/Makefile > > @@ -3,6 +3,13 @@ > > # and is generally not a function of system call inputs. > > KCOV_INSTRUMENT := n > > > > +ifdef CONFIG_FUNCTION_TRACER > > +CFLAGS_REMOVE_update.o = $(CC_FLAGS_FTRACE) > > +CFLAGS_REMOVE_sync.o = $(CC_FLAGS_FTRACE) > > +CFLAGS_REMOVE_srcutree.o = $(CC_FLAGS_FTRACE) > > +CFLAGS_REMOVE_tree.o = $(CC_FLAGS_FTRACE) > > +endif > > + > > ifeq ($(CONFIG_KCSAN),y) > > KBUILD_CFLAGS += -g -fno-omit-frame-pointer > > endif