Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1630573pxb; Mon, 8 Mar 2021 02:23:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJy57yZBZlsLNDFKt8HfDHuoZdZr7/6gcnymg5A/plSetgVDZVksDMDbn9nQ6BtAY7dxQLD/ X-Received: by 2002:a05:6402:170f:: with SMTP id y15mr15932029edu.127.1615199002869; Mon, 08 Mar 2021 02:23:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615199002; cv=none; d=google.com; s=arc-20160816; b=ZerGRfVvxhNIO1lCQ1vtzXxZUyb5QU80FuCncHbUpzF3THsCEqgwbmSZylVv3/FSh+ Nc0HiB0g+4r5jD/8WQ/VHYG9xPOk7TgJSmYHB+vnFb6xRrWf665XTZS1mGeok+5wWNIk qfhxe+AkY8Spng6TGcUkoFTjso6E32QpZnLOiLfpcZJNcho8HsLyyDCc/4cqVb6w/yWc RU1wxJfkujw5dgowCjtH7Sj2hOBbqMGgYnxxgiwUofG29/Z0I3wwnQSdWNZfeR2pd5hl aktnGzhqE/R1gmEFxaIrPzrsiiqcHfDQACLk1pUZxUWe6Co6ab275Y+yh+WoSLicTyCD +Skg== 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=LlhsyFIGrgMxSo2/x4YKU1x5PIBdNBFH99i/q3Xbx4Q=; b=hUvMGq8p1zgmSlHN2uD3rZWsIVxl+nwwKNDjQfnagNEuXvBD8aIchQFOQtl+oTmPej h54fgbqzH2s3iOBR8VdBw1rnmHwRe3+mg25Qmg8E8Ww3jsc1asJj0tdrGeryjaWqQdrM nvOG84JMcktBke0YI089xnF8LDmaMLKQntyT+JO0WLJrluNspxqXEza/PzC8tQ1CqkQU BIj4W+127gSL0MP8A4uVLRRsXZg6VqtGRPXLca5rO0kf/C+SngjHt5KNm+ohNcO6Wif5 KRc8h/kAejv8qgy/nmGSLIuPP4juA/WveD0/ORfox9FSHGnv+OzA+ftyd5Jhfmid8rL6 TLiA== 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 c11si6950378ede.102.2021.03.08.02.23.00; Mon, 08 Mar 2021 02:23:22 -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 S231877AbhCHKOT (ORCPT + 99 others); Mon, 8 Mar 2021 05:14:19 -0500 Received: from foss.arm.com ([217.140.110.172]:35374 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231866AbhCHKNv (ORCPT ); Mon, 8 Mar 2021 05:13:51 -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 4642531B; Mon, 8 Mar 2021 02:13:51 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 201D53F73C; Mon, 8 Mar 2021 02:13:49 -0800 (PST) Date: Mon, 8 Mar 2021 10:13:47 +0000 From: Mark Rutland To: Andy Lutomirski Cc: x86@kernel.org, LKML , Sven Schnelle Subject: Re: [PATCH v3 08/11] entry: Make CONFIG_DEBUG_ENTRY available outside x86 Message-ID: <20210308101347.GD7951@C02TD0UTHF1T.local> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 04, 2021 at 11:06:01AM -0800, Andy Lutomirski wrote: > In principle, the generic entry code is generic, and the goal is to use it > in many architectures once it settles down more. Move CONFIG_DEBUG_ENTRY > to the generic config so that it can be used in the generic entry code and > not just in arch/x86. > > Disable it on arm64. arm64 uses some but not all of the kentry > code, and trying to debug the resulting state machine will be painful. > arm64 can turn it back on when it starts using the entire generic > path. Can we make this depend on CONFIG_GENERIC_ENTRY instead of !ARM64? That'd be more in line with "use the generic entry code, get the generic functionality". Note that arm64 doesn't select CONFIG_GENERIC_ENTRY today. I see that s390 selects CONFIG_GENERIC_ENTRY, and either way this will enable DEBUG_ENTRY for them, so it'd ve worth checking whether this is ok for them. Sven, thoughts? Thanks, Mark. > > Signed-off-by: Andy Lutomirski > --- > arch/x86/Kconfig.debug | 10 ---------- > lib/Kconfig.debug | 11 +++++++++++ > 2 files changed, 11 insertions(+), 10 deletions(-) > > diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug > index 80b57e7f4947..a5a52133730c 100644 > --- a/arch/x86/Kconfig.debug > +++ b/arch/x86/Kconfig.debug > @@ -170,16 +170,6 @@ config CPA_DEBUG > help > Do change_page_attr() self-tests every 30 seconds. > > -config DEBUG_ENTRY > - bool "Debug low-level entry code" > - depends on DEBUG_KERNEL > - help > - This option enables sanity checks in x86's low-level entry code. > - Some of these sanity checks may slow down kernel entries and > - exits or otherwise impact performance. > - > - If unsure, say N. > - > config DEBUG_NMI_SELFTEST > bool "NMI Selftest" > depends on DEBUG_KERNEL && X86_LOCAL_APIC > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 7937265ef879..76549c8afa8a 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1411,6 +1411,17 @@ config CSD_LOCK_WAIT_DEBUG > > endmenu # lock debugging > > +config DEBUG_ENTRY > + bool "Debug low-level entry code" > + depends on DEBUG_KERNEL > + depends on !ARM64 > + help > + This option enables sanity checks in the low-level entry code. > + Some of these sanity checks may slow down kernel entries and > + exits or otherwise impact performance. > + > + If unsure, say N. > + > config TRACE_IRQFLAGS > depends on TRACE_IRQFLAGS_SUPPORT > bool > -- > 2.29.2 >