Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp32051rdb; Wed, 29 Nov 2023 18:52:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsFUbeE0h5nPfNzNjJ46CdQWoJqrSO/3yJFiiLWAC5dydSK2lttAvRvoKCDwdREuVJ6Sq+ X-Received: by 2002:a17:902:c40d:b0:1cf:9790:f244 with SMTP id k13-20020a170902c40d00b001cf9790f244mr21694107plk.47.1701312768233; Wed, 29 Nov 2023 18:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701312768; cv=none; d=google.com; s=arc-20160816; b=D7TG8InQ/xQq0ktWEJmbOjO3K9iWbgU0jL8qX0lCLKh8GlfwInFo8+QKf62UHvsvrc QC+bFBnx0CcTZPAEdCf03g3Y+4GvwSW4LGZIFxadvU6Rw/qUaqVupiy+aStfFX2Epaii L53Goibab/vFilvfpOqRPowOyRYA3+nonab1ZxtlBJmpolsjPxbAdKOOz628blfbNvjZ hYXNn1ma00WKZHRMe4lsxJJIOuh5kbuoAYLMw/CAMnD2spgP3aGUr2xPANnn+HfKsgnk gfIkblS+Bc6LDFdR7rrjpUy4iN6MHBRnbi90If/x1D9AmQOZJdha5B/YMJ9Z6KDDKmf4 dd9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=87+Bdb+o90FHLKuCAVHNTkKuXdTTUZakmBNL+edImN8=; fh=A+WaGj7dPC1U3O+8UmfplzHorvtLJ6FObvhUEFS11Bs=; b=iXnOM+UKYhSEqHDGhfoRYvaQw9Yy86Ed6oX4CC5TXSvhpXbwRc++NZPfHw6hVCzdmV zcIrOQxDe4DUSvxoFJ94AQIIxMdH0yudSodEhhsk7WKy1KRVG3jtcOls6SGW3QQCSLMJ y7kGbszTICANRxuZEy/ciu4TukpzU8SC02JS509iK1w/obPKBTOyeyL/HRGnuHfKxarf YLB822Th3Fn1bic6Ga1igLFzt4DkBIwzz6HdgQLLdpBIuGpxzUM1jyosaJqh0pop4r7e gJaGegTNruK++iX6u1EA5+GGQiWo2JR2D8aTe42928/Vw9W461xct7i8R9FDS8Bznlce FiMg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d21-20020a170902729500b001d0107ee537si149471pll.428.2023.11.29.18.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 18:52:48 -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; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A1505802ACC7; Wed, 29 Nov 2023 18:52:45 -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 S1344173AbjK3CwY convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Nov 2023 21:52:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230393AbjK3CwX (ORCPT ); Wed, 29 Nov 2023 21:52:23 -0500 Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF790CC; Wed, 29 Nov 2023 18:52:29 -0800 (PST) Received: from omf05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0CD43406F7; Thu, 30 Nov 2023 02:52:28 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA id 2F8892000D; Thu, 30 Nov 2023 02:52:25 +0000 (UTC) Message-ID: <81c62af671ebbfad61dd46aa056050a56bf535a2.camel@perches.com> Subject: Re: [PATCH v3 2/7] kexec_file: print out debugging message if required From: Joe Perches To: Baoquan He , linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, akpm@linux-foundation.org, nathan@kernel.org Date: Wed, 29 Nov 2023 18:52:24 -0800 In-Reply-To: <20231130023955.5257-3-bhe@redhat.com> References: <20231130023955.5257-1-bhe@redhat.com> <20231130023955.5257-3-bhe@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: 2F8892000D X-Stat-Signature: gwk7qi3h7jx8h1ywf1jic8xo76gqerwm X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Rspamd-Server: rspamout01 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19dPUefOesSFHLQCs3wqOW/oGlv3aC7z+4= X-HE-Tag: 1701312745-366478 X-HE-Meta: U2FsdGVkX18k/ADXByHc+CtueZc2/kIRg2iYeavR6SwxdbkG44laEheGJWfEZEWXVPPjQNlGsgWVgExQ2v2SkjkkfNjpPwEMSuNPMyCDovT0AEEC3qeJ3Q3CanYRUyaIkLf9UCVzbPHogNji1emX5sy1KMlEpsNMU2L1IT5Ygh0f8/d2RbC7l5Zlkk01sF8weznUFCSh7sTGbvtjt1bjs0D9vOhDdBlZRMDNhbUzmGZ+P97DoYPvnsvnrduPVTPJ/denAd96V06q4DDxaFl1zt06dspwDHAATuNX205GsU5+pYEk/u0vlxrjfS1T3iX3 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]); Wed, 29 Nov 2023 18:52:45 -0800 (PST) On Thu, 2023-11-30 at 10:39 +0800, Baoquan He wrote: > Replace pr_debug() with the newly added kexec_dprintk() in kexec_file > loading related codes. trivia: > diff --git a/kernel/crash_core.c b/kernel/crash_core.c [] > @@ -551,9 +551,12 @@ int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_map, > phdr->p_filesz = phdr->p_memsz = mend - mstart + 1; > phdr->p_align = 0; > ehdr->e_phnum++; > - pr_debug("Crash PT_LOAD ELF header. phdr=%p vaddr=0x%llx, paddr=0x%llx, sz=0x%llx e_phnum=%d p_offset=0x%llx\n", > - phdr, phdr->p_vaddr, phdr->p_paddr, phdr->p_filesz, > - ehdr->e_phnum, phdr->p_offset); > +#ifdef CONFIG_KEXEC_FILE > + kexec_dprintk("Crash PT_LOAD ELF header. phdr=%p vaddr=0x%llx, paddr=0x%llx, " > + "sz=0x%llx e_phnum=%d p_offset=0x%llx\n", > + phdr, phdr->p_vaddr, phdr->p_paddr, phdr->p_filesz, > + ehdr->e_phnum, phdr->p_offset); > +#endif Perhaps run checkpatch and coalesce the format string.