Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp164340rdh; Wed, 22 Nov 2023 23:37:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvOu/KCcXvkUA4KdQNqS6KWgYfHxNomn6Ff9+vI04N1RJBgVEHtlfm6RxBSW7LdlJAa3di X-Received: by 2002:a05:6a20:a128:b0:187:7ca4:c71f with SMTP id q40-20020a056a20a12800b001877ca4c71fmr2414504pzk.28.1700725043294; Wed, 22 Nov 2023 23:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700725043; cv=none; d=google.com; s=arc-20160816; b=b26mItmKOYFiqVsH9vmKNIVtr49IY2PBWGU2cG19fK+I6h4Ys35eDs0u/DYxqpUTWL KYsRMEAbTYTW654IDHVJpJLlrXk8zsy/HNY5PSOksXuXETsCID0keQquoS1ygrpnfHN7 An/77EwBu9NkPLcDgflO/z19b1rUmIB660JW1ke7zLQcsPtk8dWGRK5LSrsiipU1vhba GDB7wd0AanDczUTB5TT0SONnwjcmwSK9C5TdiRwhVbEyiYvuotrQ36x3A5luxnWkvpA/ kEemXXz7CaKux5JHwXM4ZKDfdC5mT9XKHyPn7Pg6LjYocNVcibNLOpoZD8/5XW+A3VZv M/Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sXRKoO9zAkgm8b+Bxr4SCC+gEy3bcdHacUdRqCwlROA=; fh=vL7x4bgFLl4JXLQ25ukDrYi2Fznm1zAkzIBXuJ1+XwQ=; b=N424jHESnSHwpshvRx/sZgJrykHFYw2/G6dwSX+DWigO54PHlq/vlWYFvgVOeNooSe p6Y6gqY8cx+y9Qj0LCiyaZcxIXLgWbcBQbhNhpasW+gGkOtNvBFa+YTLwxpZXiwW0d1M EGf+byU2NFC6UaTC/+UyAAEz2HzuZ9srP7cdaQ3zSnTNmnGAVLZkhtRceDKl6BSk88dN U99yQntxpRdwy/HPwyyJSYjOrXz31aajYLoooa7Am9ahvC+BduYURayrlDVflDY3NVlz bka/3kEvlsuFZTQt6aGniKsswoHgmsmWizly/r7S8+5p/8Mw4QpOZsuQcSDVIRqgk+HT uq9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hzPaCQ5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k31-20020a63ff1f000000b005ace065e52csi815758pgi.336.2023.11.22.23.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 23:37:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hzPaCQ5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 84682826BB8C; Wed, 22 Nov 2023 23:37:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344879AbjKWHhD (ORCPT + 99 others); Thu, 23 Nov 2023 02:37:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbjKWHhA (ORCPT ); Thu, 23 Nov 2023 02:37:00 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E89E7 for ; Wed, 22 Nov 2023 23:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700725026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sXRKoO9zAkgm8b+Bxr4SCC+gEy3bcdHacUdRqCwlROA=; b=hzPaCQ5m+c2WSBW2op7RVgyGbknmBDyKSa6a2u/OKJn+cFLnxM1AvsbwSmdP65kFsVKw7R RBKOVzZ81Qxmx0vm5RolW2svqihBQVo3z6MLH+kBwNtL34ims0xCVurapMlwAdXEsAkt4g 5eFZl4QtzkuD6TCwJ/F07aCDpZ9Gwfo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-25x3cXZyO_GiQ874kgA9UQ-1; Thu, 23 Nov 2023 02:37:03 -0500 X-MC-Unique: 25x3cXZyO_GiQ874kgA9UQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A890F82DFE8; Thu, 23 Nov 2023 07:37:02 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 893CA492BFA; Thu, 23 Nov 2023 07:36:59 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, akpm@linux-foundation.org, ignat@cloudflare.com, eric_devolder@yahoo.com, Baoquan He Subject: [PATCH 1/3] kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP Date: Thu, 23 Nov 2023 15:36:50 +0800 Message-ID: <20231123073652.507034-2-bhe@redhat.com> In-Reply-To: <20231123073652.507034-1-bhe@redhat.com> References: <20231123073652.507034-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 23:37:20 -0800 (PST) Ignat Korchagin complained that a potential config regression was introduced by commit 89cde455915f ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec"). Before the commit, CONFIG_CRASH_DUMP has no dependency on CONFIG_KEXEC. After the commit, CRASH_DUMP selects KEXEC. That enforces system to have CONFIG_KEXEC=y as long as CONFIG_CRASH_DUMP=Y which people may not want. In Ignat's case, he sets CONFIG_CRASH_DUMP=y, CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=n because kexec_load interface could have security issue if kernel/initrd has no chance to be signed and verified. CRASH_DUMP has select of KEXEC because Eric, author of above commit, met a LKP report of build failure when posting patch of earlier version. Please see below link to get detail of the LKP report: https://lore.kernel.org/all/3e8eecd1-a277-2cfb-690e-5de2eb7b988e@oracle.com/T/#u In fact, that LKP report is triggered because arm's is wrapped in CONFIG_KEXEC ifdeffery scope. That is wrong. CONFIG_KEXEC controls the enabling/disabling of kexec_load interface, but not kexec feature. Removing the wrongly added CONFIG_KEXEC ifdeffery scope in of arm allows us to drop the select KEXEC for CRASH_DUMP. Signed-off-by: Baoquan He --- arch/arm/include/asm/kexec.h | 4 ---- kernel/Kconfig.kexec | 1 - 2 files changed, 5 deletions(-) diff --git a/arch/arm/include/asm/kexec.h b/arch/arm/include/asm/kexec.h index e62832dcba76..a8287e7ab9d4 100644 --- a/arch/arm/include/asm/kexec.h +++ b/arch/arm/include/asm/kexec.h @@ -2,8 +2,6 @@ #ifndef _ARM_KEXEC_H #define _ARM_KEXEC_H -#ifdef CONFIG_KEXEC - /* Maximum physical address we can use pages from */ #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) /* Maximum address we can reach in physical address mode */ @@ -82,6 +80,4 @@ static inline struct page *boot_pfn_to_page(unsigned long boot_pfn) #endif /* __ASSEMBLY__ */ -#endif /* CONFIG_KEXEC */ - #endif /* _ARM_KEXEC_H */ diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec index 7aff28ded2f4..1cc3b1c595d7 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -97,7 +97,6 @@ config CRASH_DUMP depends on ARCH_SUPPORTS_KEXEC select CRASH_CORE select KEXEC_CORE - select KEXEC help Generate crash dump after being started by kexec. This should be normally only set in special crash dump kernels -- 2.41.0