Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp214675rdf; Mon, 20 Nov 2023 23:54:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsG6etUE7QUXbM1IaWSZkICNPYgNko4hRPirzfypK2guzW+an1W/9prA5JWjiDqx83hn0c X-Received: by 2002:a05:6358:3a1a:b0:16b:a950:8e3a with SMTP id g26-20020a0563583a1a00b0016ba9508e3amr13624926rwe.0.1700553263006; Mon, 20 Nov 2023 23:54:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700553262; cv=none; d=google.com; s=arc-20160816; b=FHxPU1eW5K0Xi0OcmKA+vYPxaK5YgQ29NpvgSvGlY40lTVGwI0OTITDieeABDvlp+4 opaSK5qVw0xN+NFBW72MztfD1hWPxv6YsuIrWhejuWkij2uvka8QL74rZ5Zoz2YFNAVL YN/Puepvs3CpzHripHirPDkkzCPERp/X3+CEgmLmPu9aSckKjR7zu81JMz1bDcPIQHXy S6WV4rcozoFUbAUEGUkWDCkr7IUY5cyURM4RPS3IVmT4Rn2EKRnGJWzE/L3Ab8AklmPH Rez6XE8rXEfvb/vOdEtRxYKGlTTaV58huiAQdCkq1pFYilV+rccO584CRTFGI19fadEP I4NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=n94+xDIkUOqQeszLqyF1GvL8Xx0iP7KzdJ36tDGQoLY=; fh=9tTaPO0wOQykTexayBS/1SHY28Y6yQwU4C1Q6Z5uOkA=; b=vUFoCIpmVVGq62+IquL1ejNe54zNWxcUcg2QlB1E5ovRL8aUKLeVD2qjtKIzV+xEPe cGwQ+wqLh/E23bIviIlbfiINnjMe/887tN+9RNilmKcDIGQ/hV3ApxIKBOeNW7WSf1Jx oQc3jhy7oGfjJwSz/OJwI6kupGXVsZpHjWggAcFZX0JSmEKcf+HA8APy0xrl985l/YJV bN05MJV49pTnVM76H7bfANcgIWJy34AuNl5dc2lctTBBFjDV/ho+EKQ+BC/zG4E5Rgah r4/z/ys8u9JiPTwh2adY+fkAJvo8gs5rEPHpDZlFuY5S12E22VDl9SMyY8qkLp2Dm6xJ mMhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=FYLLvUEw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ca23-20020a056a02069700b005be209ac7fesi10585210pgb.744.2023.11.20.23.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 23:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=FYLLvUEw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 700A9805FD5D; Mon, 20 Nov 2023 23:54:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229747AbjKUHyG (ORCPT + 99 others); Tue, 21 Nov 2023 02:54:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjKUHyD (ORCPT ); Tue, 21 Nov 2023 02:54:03 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49EBED9 for ; Mon, 20 Nov 2023 23:53:59 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-28397a2c402so2711622a91.2 for ; Mon, 20 Nov 2023 23:53:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1700553239; x=1701158039; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=n94+xDIkUOqQeszLqyF1GvL8Xx0iP7KzdJ36tDGQoLY=; b=FYLLvUEwsMqttI+5JckkwIMcCzZcBLvmmk50zS1nJV09DWpS7lCL8JiIBMFFT96/JI 4MgRhH8RL1aJu6n66ZZAK/2+c5C0dOkslLtBf3LNJdagfWKzZS3LWPd2f7oNhFz/gHr2 w/JXCPTDIiU4uIxF8RPUf6O2D7E6ssbHa7i4QdFmgCxqrzfyGg+MtmAqywZX3dx6q0b3 CfRm0F8+r304/BFzUeTnWMZPeaJfUCQ7HS4kBxlXg/o4mBBhi128XkCh2UHwG8KH7i3T HrqshIkW+TT/lr8x9GCwdhrkViRfXRwiCaEd2IXIRLa/tQwIJ4ba0esMlbWrCrLX6NJe blFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700553239; x=1701158039; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n94+xDIkUOqQeszLqyF1GvL8Xx0iP7KzdJ36tDGQoLY=; b=D+IKXwUe4Jgpym1u3XU6rcoGnDVE9FkWRuIoXRXGFuFNN0n0uybk93TatsVEj+iUJQ ct64wbintZkTHb5CD+hk4qS7kv8MWVS2QlGfuXyUn4iyCzlnXL5p40x4S+7+Vw29gc6g bggVjaqJA7oUl2sOyD702v9qdZUyJ4BP4v5cOtIx6oCOJj79sIhuHJ18m4gMeV4wRxPW DTdkMN64bt98W4XVbiEfSm2nK+pk5BYgBqIoExazfakQJW9N2HyQj/Gpy52RULltatf9 rvNYOUb6a0LdZ+mJqLq04FnDJ7vThSrXZnpaaK+XJNS0V+haPkuIRaCHDtZVka+f44iq ORoQ== X-Gm-Message-State: AOJu0YzgFburpO3TgPbrQmiGx39SJg434TYjFs0/9gViwXcpn6jq1SnC pB8s43YkTFRyZhSxStxkMW5wIZBFnh9i6iXBt1dI+Q== X-Received: by 2002:a17:90a:8b01:b0:280:f534:6b9c with SMTP id y1-20020a17090a8b0100b00280f5346b9cmr7974497pjn.21.1700553238477; Mon, 20 Nov 2023 23:53:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ignat Korchagin Date: Tue, 21 Nov 2023 07:53:47 +0000 Message-ID: Subject: Re: Potential config regression after 89cde455 ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec") To: Baoquan He , eric_devolder@yahoo.com Cc: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, chenhuacai@kernel.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James Bottomley , deller@gmx.de, ysato@users.sourceforge.jp, dalias@libc.org, glaubitz@physik.fu-berlin.de, Thomas Gleixner , Ingo Molnar , Borislav Petkov , dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel , linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, kernel@xen0n.name, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, hpa@zytor.com, keescook@chromium.org, paulmck@kernel.org, Peter Zijlstra , frederic@kernel.org, Andrew Morton , Ard Biesheuvel , samitolvanen@google.com, juerg.haefliger@canonical.com, arnd@arndb.de, rmk+kernel@armlinux.org.uk, linus.walleij@linaro.org, sebastian.reichel@collabora.com, rppt@kernel.org, kirill.shutemov@linux.intel.com, anshuman.khandual@arm.com, ziy@nvidia.com, masahiroy@kernel.org, ndesaulniers@google.com, mhiramat@kernel.org, ojeda@kernel.org, thunder.leizhen@huawei.com, xin3.li@intel.com, tj@kernel.org, Greg KH , tsi@tuyoix.net, hbathini@linux.ibm.com, sourabhjain@linux.ibm.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, kernel-team Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 23:54:19 -0800 (PST) On Tue, Nov 21, 2023 at 1:50=E2=80=AFAM Baoquan He wrote: > > Eric DeVolder's Oracle mail address is not available anymore, add his > current mail address he told me. Thank you! > On 11/20/23 at 10:52pm, Ignat Korchagin wrote: > > Good day! > > > > We have recently started to evaluate Linux 6.6 and noticed that we > > cannot disable CONFIG_KEXEC anymore, but keep CONFIG_CRASH_DUMP > > enabled. It seems to be related to commit 89cde455 ("kexec: > > consolidate kexec and crash options into kernel/Kconfig.kexec"), where > > a CONFIG_KEXEC dependency was added to CONFIG_CRASH_DUMP. > > > > In our current kernel (Linux 6.1) we only enable CONFIG_KEXEC_FILE > > with enforced signature check to support the kernel crash dumping > > functionality and would like to keep CONFIG_KEXEC disabled for > > security reasons [1]. > > > > I was reading the long commit message, but the reason for adding > > CONFIG_KEXEC as a dependency for CONFIG_CRASH_DUMP evaded me. And I > > believe from the implementation perspective CONFIG_KEXEC_FILE should > > suffice here (as we successfully used it for crashdumps on Linux 6.1). > > > > Is there a reason for adding this dependency or is it just an > > oversight? Would some solution of requiring either CONFIG_KEXEC or > > CONFIG_KEXEC_FILE work here? > > I searched the patch history, found Eric didn't add the dependency on > CONFIG_KEXEC at the beginning. Later a linux-next building failure with > randconfig was reported, in there CONFIG_CRASH_DUMP enabled, while > CONFIG_KEXEC is disabled. Finally Eric added the KEXEC dependency for > CRASH_DUMP. Please see below link for more details: > > https://lore.kernel.org/all/3e8eecd1-a277-2cfb-690e-5de2eb7b988e@oracle.c= om/T/#u Thank you for digging this up. However I'm still confused, because this is exactly how we configure Linux 6.1 (although we do have CONFIG_KEXEC_FILE enabled) and we don't have any problems. I believe we did not investigate this issue properly. > And besides, the newly added CONFIG_CRASH_HOTPLUG also needs > CONFIG_KEXEC if the elfcorehdr is allowed to be manipulated when > cpu/memory hotplug hapened. This still feels like a regression to me: any crash dump support should be independent of KEXEC syscalls being present. While probably the common case (including us) that the crashing kernel and recovery kernel are the same, they don't have to be. We need kexec syscall in the crashing kernel, but crashdump support in the recovery kernel (but the recovery kernel not having the kexec syscalls should be totally fine). If we do require some code definitions from kexec - at most we should put them under CONFIG_KEXEC_CORE. > Thanks > Baoquan >