From patchwork Wed Nov 29 22:04:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ignat Korchagin X-Patchwork-Id: 13473575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DBF5C4167B for ; Wed, 29 Nov 2023 22:04:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XiUCCbR5An97AcD6Ujxdvmqo8nXHtbHQzea0YYid9UE=; b=AdvYcWzVf25oT5 Ojgu1pDUEToUq9cXiI/Zr8SErzXLC0JDWveII7c2pXlFc1zqtfgRVuYNpfm27FuZRh1MGT9J/lfve 8LW+aSiGA6jlln2VQHNHFWZ+OypoQfAYcZo5yEnOZ2J2MCTKjXRTYtce5HDFtPiUK9yC4s/odWoOR jO4/7RZe6UfZpJBOs7RnYWPWqgEh9fr8MHE0YvHTjRm9IN9EeC9ZU3ZIEEkfQK0ReItrVGdGz/gn8 pjCiZIZEiNxigQ6sO2czomSjwa8OgbKSuEk4C7KqfoHR8VVptWX5d/xOZgOZhnE62I7oAmTPlTOjw zwTEDQoyazc5oVVfQy0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8SfS-009P2z-2q; Wed, 29 Nov 2023 22:04:26 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8SfP-009P25-30 for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2023 22:04:25 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c9b5c12898so3898881fa.2 for ; Wed, 29 Nov 2023 14:04:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1701295457; x=1701900257; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=oKHPDx2HvAschhAT4t+Helg6cS13lBVJniqEfNCvja0=; b=G4f6ohiLYrJLGOTvATLgWgNCqyXy1UIBJeGWaRcEi77vnfTDyHbKtfhBATnVRHVhUW B49jNrKLKlPDBrIFEG41Ir+xf9OZa4dddi5AzGTtKRj4TH7rGDmEIuVSb9kKAqZDe1nc AznwW4lCcH/bIW8sUULMNoIsDaXcFzqZsyHn5C64nCSVfVH1k+cwHvSRhBxetQFFkci5 axi1btAFk3D1puqd40a8tx1OP69t9y1kroGn6fgTBFw5R+HCMhJwP6zzqP6uoFrl1yBO vGb5O6FoezvXNL0bZa1N+ouHoGx9V4Sxt0nZE8IaVhQr4RhwS4U6Ga48LGtDU7TdiMJR QiQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701295457; x=1701900257; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oKHPDx2HvAschhAT4t+Helg6cS13lBVJniqEfNCvja0=; b=l9NFkUdUGXdkAuh/xYVDuH2wJDF+HZuEmB8LFNMfWhG52eW0nL6Tjk4JnjCULjKDWA vQnp3Lf496CeqyGuL+gjJEoa+w72Sh1AZgkl0PFF2Bo4lMMB2gXplD2LjBG6wcwwapjl y8u0j4UgXGIztczvcRQuAKWETh9B88HT4UhipwCkO9tkFGUyvj7KtEOfc63H0eT710DN JGXoTJu3ru/38H2vIfC6guZSaZvznrqjOm6jYcNuykDkuRWqNBx3jTa2+7AbR4rWBK9P zS+fBkw4cwhQQ7aSytzCWeTNNON9KLP88Pt1lk0hJrMBWT4gc853aGpiiQW83VgOkawg JYeA== X-Gm-Message-State: AOJu0YzZu1/du7wa82eQUlJg80P9Zbd9Y4+B1tAIUCq98xcDHdg682uy ZxbGJ/dKZ2f8xQR+SxaTZr02rw== X-Google-Smtp-Source: AGHT+IFWmrAg+Dmzq8QmUy4K/ehWB+QhXz+6IfdJ+KHqnDjELCrzZyOeBmO1dxt06NCK8MJSCiWOMQ== X-Received: by 2002:a2e:b815:0:b0:2c9:95f3:d71f with SMTP id u21-20020a2eb815000000b002c995f3d71fmr8576365ljo.16.1701295457093; Wed, 29 Nov 2023 14:04:17 -0800 (PST) Received: from localhost.localdomain ([87.74.204.186]) by smtp.gmail.com with ESMTPSA id hg11-20020a05600c538b00b0040b48690c49sm3531673wmb.6.2023.11.29.14.04.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 29 Nov 2023 14:04:16 -0800 (PST) From: Ignat Korchagin To: linux-kernel@vger.kernel.org Cc: Ignat Korchagin , kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, eric_devolder@yahoo.com, agordeev@linux.ibm.com, bhe@redhat.com, kernel-team@cloudflare.com, stable@vger.kernel.org Subject: [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP Date: Wed, 29 Nov 2023 22:04:09 +0000 Message-Id: <20231129220409.55006-1-ignat@cloudflare.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_140423_967600_C65A65B6 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In commit f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP") we tried to fix a config regression, where CONFIG_CRASH_DUMP required CONFIG_KEXEC. However, it was not enough at least for arm64 platforms. While further testing the patch with our arm64 config I noticed that CONFIG_CRASH_DUMP is unavailable in menuconfig. This is because CONFIG_CRASH_DUMP still depends on the new CONFIG_ARCH_SUPPORTS_KEXEC introduced in commit 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec") and on arm64 CONFIG_ARCH_SUPPORTS_KEXEC requires CONFIG_PM_SLEEP_SMP=y, which in turn requires either CONFIG_SUSPEND=y or CONFIG_HIBERNATION=y neither of which are set in our config. Given that we already established that CONFIG_KEXEC (which is a switch for kexec system call itself) is not required for CONFIG_CRASH_DUMP drop CONFIG_ARCH_SUPPORTS_KEXEC dependency as well. The arm64 kernel builds just fine with CONFIG_CRASH_DUMP=y and with both CONFIG_KEXEC=n and CONFIG_KEXEC_FILE=n after f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP") and this patch are applied given that the necessary shared bits are included via CONFIG_KEXEC_CORE dependency. Fixes: 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec") Cc: stable@vger.kernel.org # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP Cc: stable@vger.kernel.org # 6.6+ Signed-off-by: Ignat Korchagin Acked-by: Baoquan He --- kernel/Kconfig.kexec | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec index fc38f1ae3a30..946dffa048b7 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -96,7 +96,6 @@ config KEXEC_JUMP config CRASH_DUMP bool "kernel crash dumps" depends on ARCH_SUPPORTS_CRASH_DUMP - depends on ARCH_SUPPORTS_KEXEC select CRASH_CORE select KEXEC_CORE help