Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp265194rdf; Tue, 21 Nov 2023 01:57:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhZjec/nE6S/FKrPSZmyiZsN0WPacrv1KxZCd2WinqgkG66AiwaLy30iQZHBByQ5Mt1m6m X-Received: by 2002:a05:6358:2489:b0:16b:406c:a005 with SMTP id m9-20020a056358248900b0016b406ca005mr10271556rwc.28.1700560638192; Tue, 21 Nov 2023 01:57:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700560638; cv=none; d=google.com; s=arc-20160816; b=CP/fsLYkqlVrA+BwrBMYYCDDq5UCI1PNkZQFpM5UH7qUdrK2udt5ViSSFOuvGz1Wd/ EdY6Cj+LwxEO9vAFza/SdAlgEQk5hd6Br+6RS8dGkWGZv65/smenctdJmfop1d44Dvgt ZqiD7/Cjm9TwIzjRNjrDj9mYnkn2hT5mc6hDJBUWzOPwIiD3L9W8/mJpLlf80mqqrcxV 52a7pnPEuE4zd1hZji45Wvg1lgqu8J0lwack+cJVY+zzNEJcisQ/ZJbMYVeC8nlVaU99 5DA/AstV2DImufbsQAntVKJPsz3adeIMqXcI2b7qE2yhzNAULvTyB4YVRTwXT/QiU4oP 68vQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fPhHnmk39Y9ZPUQmNMZM/ZG0TQ3kydRNczl6JxMjmic=; fh=ltonKVugXFfkW2ftetTgl/Oa4zWreTeKDopFbuK8wRI=; b=SY5J7lKJwzCYNLS+omhk01N98nbTnQPKkB9Nuzba2GjuHhcIUpjhCWLMJs4TWasWLA tGyQbKUXd3UORQ4htaNkcbrg4LX2u2EY82WvcyKaq4TBk+HVopUcOLQvZuZIr1qghRvQ MOCsppTX/9WAE5C1tyf5tyWPmQIVUjZqefy2uEAt9FysblwZHhckzr+YBjmmwt1iYksZ A29zclmoXO3z/As7JB47/6tbxiuaIbL60TOfcXCJG4hpBRBSqfWMPFXbG7xw+GwoeHvV RvI7Qx38p0/YbbltOOZasYSJYaAQH8xotuK8UpK/vsaiDkBq0Y5HsRvhTKmPC4nqiJhd RrSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BrK97EPT; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 189-20020a6301c6000000b005bdb6daee0dsi10248834pgb.303.2023.11.21.01.57.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 01:57:18 -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=@redhat.com header.s=mimecast20190719 header.b=BrK97EPT; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 05B33804B2BE; Tue, 21 Nov 2023 01:57:12 -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 S234108AbjKUJ45 (ORCPT + 99 others); Tue, 21 Nov 2023 04:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234101AbjKUJ4z (ORCPT ); Tue, 21 Nov 2023 04:56:55 -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 D793A10E for ; Tue, 21 Nov 2023 01:56:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700560611; 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=fPhHnmk39Y9ZPUQmNMZM/ZG0TQ3kydRNczl6JxMjmic=; b=BrK97EPTcoWOIsSXhxD+pyl7+HZCnNyf8nTy31PodCOw8TujnJ9JNT/DRqpSgsWTBb0k/Z 7P5TB7Y7TKV5ORLyEnZA4w261ZgHufN3I/xyJu6eVRrHH6yYeg6sKfn/TV/C8qe55kImwU iBhNTZqe7V707c+Lxm2mKS2Gze3F0Pc= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-642-FAApqMXDNLKIjte47nBJcQ-1; Tue, 21 Nov 2023 04:56:47 -0500 X-MC-Unique: FAApqMXDNLKIjte47nBJcQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 C91B73813F30; Tue, 21 Nov 2023 09:56:46 +0000 (UTC) Received: from localhost (unknown [10.72.112.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C61FF502A; Tue, 21 Nov 2023 09:56:44 +0000 (UTC) Date: Tue, 21 Nov 2023 17:56:42 +0800 From: Baoquan He To: Ignat Korchagin Cc: eric_devolder@yahoo.com, 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 Subject: Re: Potential config regression after 89cde455 ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec") Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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 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]); Tue, 21 Nov 2023 01:57:12 -0800 (PST) On 11/21/23 at 07:53am, Ignat Korchagin wrote: > On Tue, Nov 21, 2023 at 1:50 AM 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.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. > > > 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. Hmm, I understand your concern. Will wait for Eric a while to see if he has any explannation or plan, otherwise I will check this.