Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp580333ybz; Wed, 15 Apr 2020 14:28:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLzHcRYjKSiStHfKKtHQyrr/ybpo6C7qoZNpOS6eMo86DdSxVgQDfD+PpUPC2S61WxFnSfj X-Received: by 2002:a05:6402:705:: with SMTP id w5mr24761600edx.379.1586986095933; Wed, 15 Apr 2020 14:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586986095; cv=none; d=google.com; s=arc-20160816; b=R+wQ7kKLj1iPpFaRDp2s1ZCVTPL8S+y/zge0e3PraTGlegJPjdZXp2Rd13t12Tq6hR ThlbjDRBr+lB6ABzr3KvqGxd1XnF5sPVNkgFwYvNoBom0XMPzlCv3NUOT/wfcmy5wxv8 zxOrTTQtaS1gl7GPyXnvSukSwU9g0ICyl3pAIDoNPb+xq6OFJAxC6B428aTyybYDzI7B mgIN4QJ/PZZ+YXr42B7s+C2rBaNCXfj1Wo+V8aGB8jobITyZ1xBefASGzxC51lV1iyFz J0JX6C9bjqE/ZKHhKGSouwEzDwBOmCqGEEY7ntZbOY8dRkPi+dnDaq84WhetUWNzsv42 Mrpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=OlnCXOrteoGPoUqPlxuyG2Ch/yJpcdLQB3LGYMQdOo8=; b=uqmiSFm134AZgSdQMMenyHMg2WG41YRv1rPR9Tmav1UO117iaxXAY+70x8xRUpaGny Z88wJ41ekDVERxVMiKZGKBBXl4zMEG3LA5Uk2iMuK349U87ak0mBGnAr/JIFW5U5LkGS n1qsXcW+OO19J/P3vQ+y5sKtb65j5z2/Un9IbDkhMXVG9Iiv6FxfsKXKhl2uPZZogrI3 PCo4/n4lCF/bzfJkZZkJze2100ptSN2qu1IJc/z6ZcVNXP2uuSHo0HljPLr+HKNzuX7x SpNj5OPSLuS2P0yeFTRGb3+6mpEI5VRUOQjYzLkEgrQcKoL6d26UCFwz5mDdOdLbfWjX 8qHA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si8594328eja.298.2020.04.15.14.27.52; Wed, 15 Apr 2020 14:28:15 -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; 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 S2439970AbgDNMQY (ORCPT + 99 others); Tue, 14 Apr 2020 08:16:24 -0400 Received: from foss.arm.com ([217.140.110.172]:54178 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729799AbgDNMQT (ORCPT ); Tue, 14 Apr 2020 08:16:19 -0400 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 8E1C11FB; Tue, 14 Apr 2020 05:16:18 -0700 (PDT) Received: from [192.168.0.14] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2AA2C3F6C4; Tue, 14 Apr 2020 05:16:17 -0700 (PDT) Subject: Re: [PATCH] arm64: panic on synchronous external abort in kernel context To: Mark Rutland , Xie XiuQi Cc: catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, tanxiaofei@huawei.com, wangxiongfeng2@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20200410015245.23230-1-xiexiuqi@huawei.com> <20200414105923.GA2486@C02TD0UTHF1T.local> From: James Morse Message-ID: Date: Tue, 14 Apr 2020 13:16:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200414105923.GA2486@C02TD0UTHF1T.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xie, On 14/04/2020 11:59, Mark Rutland wrote: > On Fri, Apr 10, 2020 at 09:52:45AM +0800, Xie XiuQi wrote: >> We should panic even panic_on_oops is not set, when we can't recover >> from synchronous external abort in kernel context. Hmm, fault-from-kernel-context doesn't mean the fault affects the kernel. If the kernel is reading or writing from user-space memory for a syscall, its the user-space memory that is affected. This thread can't make progress, so we kill it. If its a kernel thread or we were in irq context, we panic(). I don't think you really want all faults that happen as a result of a kernel access to be fatal! [...] > What exactly are you trying to catch here? If you are seeing a problem > in practice, can you please share your log from a crash? Yes please! I suspect you want to make memory_failure() smarter about faults that affect the kernel text or data. If so, please do it in memory_failure() where it benefits all architectures, and all methods of reporting errors. (we may need a 'synchronous' hint to memory_failure(), it expects everything to be asynchronous). If its not memory, we should extend the RAS handling to know what this error is, and that it is fatal. (e.g. PE state is infected) Thanks, James