Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp260424rdf; Tue, 21 Nov 2023 01:44:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7PK/1Nk/3OShdzlcwpf4O5ltUKp/Nz5hKWSlZE5SUCAOBQAVDw0M/EkYQyEyN+Y3IcS0R X-Received: by 2002:a17:902:db06:b0:1cc:47e7:5d5e with SMTP id m6-20020a170902db0600b001cc47e75d5emr3511905plx.19.1700559874258; Tue, 21 Nov 2023 01:44:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700559874; cv=none; d=google.com; s=arc-20160816; b=XdONawIgb1ivLPQLu4tLYApmqcwoKWZolRqPjNGPtMzD4e8lGDMZC92G6636PLdCOF Nksi5HszqDPPlAxzMN4eyTjK4CE5kEXPqkJarEog/QppSXJLy90vscD6MrDynJErdMk5 2uErzFKOXtGx9ZJyiiqPvnCyxlXBpcSflHuBabekKax0GMJOAioZbrt5Hl5xWXzEINw7 bwDgYz8u+WHGdwY/XfGqdgAnA07IZ7Ea+toqhXWnZ4CuvzupwVkJUcW333Uc5lnjQgyG RZoe9f9yFlDVeMXu7UiOom9gPbolTNwuySzau0cuOoTgsei+tHmyEG4xEJIVK4M3f0SX 3ZVA== 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=zeX6LBtHobyx/lTsQiwAAEvgonswp+TnKesxqxWL11M=; fh=9tTaPO0wOQykTexayBS/1SHY28Y6yQwU4C1Q6Z5uOkA=; b=ywuPIemS8jxPLiKpRpWJ66S5RigCSZHTgwxKZZ1MLz27NgsJegeNkhRFNtME8Jo0FY 7ZA4L92KjSCEK9Y1+J3C8iBSBwhcnk17htadScVZI7X1BR2kR4Wk0rpb9cEAC31JmJtu S3eye5vcHm0blLrMJ2413uruvGYsIYIuGPH21821y2ldiK4AYfHgoiSSYRrWdGrDFb5d xywMofL3SoL8S2aYDkq40ywYmPFS20g5k+KcNPCx5h7ZDsWd89bXsgSnnAsaEsRBvo4+ saneTu7hmEo9ASI6IrowUw2L9sR93TVWbMQ0c4Rx9MhV5NIp2kK/k6HWaL/Kq/KmxzM+ pcIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=ZM9BUGKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id c6-20020a170902aa4600b001c5ff477ebcsi7200768plr.265.2023.11.21.01.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 01:44:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=ZM9BUGKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 6D2FB80C3A91; Tue, 21 Nov 2023 01:44:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233111AbjKUJoD (ORCPT + 99 others); Tue, 21 Nov 2023 04:44:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbjKUJoB (ORCPT ); Tue, 21 Nov 2023 04:44:01 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85C26D8 for ; Tue, 21 Nov 2023 01:43:57 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5c1acc1fa98so4699138a12.0 for ; Tue, 21 Nov 2023 01:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1700559837; x=1701164637; 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=zeX6LBtHobyx/lTsQiwAAEvgonswp+TnKesxqxWL11M=; b=ZM9BUGKhdZSiK9qSY+BRxnJvVs1TrFMGKlkSalxOYVhyIEoM9/kCkBWGGXg3OHv2K1 tzWrXbJinR5deBn2P/EN3S+6ll72ULDUty2DBc5jNYIAncsSvExgJCD7vI6X6O6amUPU P+b7lSrzrGIn26cfpBRXTEd0Q4/ddyXc0SxicqWu7CL4lS5bNufi12+ZhaFS0hD3mtd0 4XupWXqEmMyKFOJ1z8zCOyZHPorAvUvyIavcJg2WNPM8Hppfu4FvCc04wDxRMX4PYFgJ EZ9/2mCPfw2zM1KKT289uuMKSQfMR50Z126z3/A7P3DpZ0S06KSeG/j3B4fdTg6gkjcf jalg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700559837; x=1701164637; 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=zeX6LBtHobyx/lTsQiwAAEvgonswp+TnKesxqxWL11M=; b=YbJhBAlsJRTtLOYbYMzR9Srz5xiIvZ+0QRm4+kLxjKRk9Pn1m4EIajiZ3iczXZa+g5 kEjbjw1PMawL1ZrcQEPg6zHKzNhwJMy8nBG0Arr0Fi3cowYXxmCWUWQ+o7gOT41g2JEX WBJA/YVZ4Q4Zm/qFl0yvuJbCHQ/uo7PZEbKmV42Y6lSF6gxAiItkHdllYhsNVe6HEPH3 SHRZSWP7FXo1D3Q/eJaDenlO9Pm+j2vlTgIJtSRW3fWN8fDcalj9wvA3JSYiIP8TKKOa ijF5XrS+XYv8EwcQTveFO6jKt5VxpDmpSBDcnozdwP+AZfTZmyWsAqOCBrkyiiZXCruM LN1A== X-Gm-Message-State: AOJu0YzvugI72U5KDTylfCE16ZzyAkilVJKt8ypfE3nebAu6yhCHpxXm R4dfnFi9kfzZBNFgaZGAnmaHC+4cpyksvKq8AT3QCQ== X-Received: by 2002:a17:90b:4d0a:b0:283:2d65:f231 with SMTP id mw10-20020a17090b4d0a00b002832d65f231mr3047813pjb.22.1700559836764; Tue, 21 Nov 2023 01:43:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ignat Korchagin Date: Tue, 21 Nov 2023 09:43:45 +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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 01:44:18 -0800 (PST) On Tue, Nov 21, 2023 at 7:53=E2=80=AFAM Ignat Korchagin wrote: > > 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"), wher= e > > > 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= .com/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. I did some preliminary investigation for this. If I patch out the dependency on CONFIG_KEXEC the kernel builds just fine for x86 (without CONFIG_CRASH_HOTPLUG - which is probably another issue) - so this was the previous behaviour. I can see that the reported error is for arm architecture and was able to reproduce it with a simple cross compiler in Debian. However, I think it is still somehow related to this patchset as the previous kernels (up to 6.5) build fine with just CONFIG_CRASH_DUMP and without CONFIG_KEXEC for arm as well. So even for arm it was introduced in 6.6. > > 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 > > Ignat