Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2567277rdb; Mon, 4 Dec 2023 00:44:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL6tgHLSD+sXWuU2YHPC541z0JNBsN/w2bTDtIlROfBO4bNqRt9ucqMMvO23HxaElDVTU4 X-Received: by 2002:a17:90a:8997:b0:286:6cd8:ef0d with SMTP id v23-20020a17090a899700b002866cd8ef0dmr4272409pjn.37.1701679465033; Mon, 04 Dec 2023 00:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701679465; cv=none; d=google.com; s=arc-20160816; b=wT1o8fVR//J08UHQA9pseEQBCEs1fa2C3eIxJxpeDg6utaDMqelAfpNicbbWDvrRL0 AdBNR45DWgS6I+UxHvKS39KjxUZ78GltmbSJ/ZU3poa2FDkftjSWhjsr4Ewn3re8KdKP oA7EAx0D3wy2biLoG5TUvlGWdu0yntRDJMsOkcp1mbK84rS59V73VS+LDQEXr8UF00TN c4PnQWpKUOcDzjbTTTU2Ocil6hvdapyn0ywsaHOKD+oWl4qYd3zuz29WuTk42QBabxHW QhVwYVi4DsIJ+R3kdmN9V8IU4mLHXghekuuBDPkL01AtaRWO2Wgr35YDFBPaWNZ4z2il sI6g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WNLdrMB2tgHHf0igk8Wyh8lratwDZ12KyFRCSXbkkjQ=; fh=QD901Jn0UJNf1Cvwp3EQiAb9Rx2/OPMawHZLqchMzY4=; b=dQ0dbCjn7JqD2vGazCXyJEVMq+/KXiVNpQtt8uhwMN6mS6SaP1b0fyp7aYsmDZsxi7 64Vb2TAqN2tZJDNOdJl2rn/oURIf1Gz05VQDS4crj/KrGi3mz5k0ZXAhV/Gv3IuBqYGK y3ULJDuo0gUAIuuRWdT7251wAuNWBbLlJk0my1eoPpq3OZkidrcBjclq1r/NE36VFLVc 0nfRwokS0M05ePB1Z/9idLsXiHMrvXof2vVrt7rFe6H/jPFugfe+YU68Ki/UHjcAT20F Yi6t6kjNmxfrp1AMpifK+lEoI2m7BWzvcsrJbpzAduosAFHIMEFFzEdzKbZkEU1P6aPP Pdeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WcUUcWZk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q4-20020a17090a68c400b00285b7d57ef0si3328397pjj.137.2023.12.04.00.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:44:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WcUUcWZk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id A3C6D806676A; Mon, 4 Dec 2023 00:44:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234876AbjLDIoG (ORCPT + 99 others); Mon, 4 Dec 2023 03:44:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235286AbjLDInt (ORCPT ); Mon, 4 Dec 2023 03:43:49 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D813E10C2 for ; Mon, 4 Dec 2023 00:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701679400; 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: in-reply-to:in-reply-to:references:references; bh=WNLdrMB2tgHHf0igk8Wyh8lratwDZ12KyFRCSXbkkjQ=; b=WcUUcWZkkNzDcZyrI7GpI1+xVwKma5y0D8uyECEMThgQQ4tCE41nv17t5DYmgm+5d0fChg MjZcnyP0gQCmIDMQIolAZLHAro06pFMsrfODYhWULJe4SSzcHw9KzMo+p2uidjI1fbpDW/ 4WqjuKRIx58ZUr16wmZC817OU9d42rQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-S3KQUAwxNAKg8YP9LTNJfQ-1; Mon, 04 Dec 2023 03:43:18 -0500 X-MC-Unique: S3KQUAwxNAKg8YP9LTNJfQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 AC51685A5B5; Mon, 4 Dec 2023 08:43:17 +0000 (UTC) Received: from localhost (unknown [10.72.113.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF09C36E2; Mon, 4 Dec 2023 08:43:08 +0000 (UTC) Date: Mon, 4 Dec 2023 16:43:05 +0800 From: Baoquan He To: Joe Perches Cc: linux-kernel@vger.kernel.org, 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 Subject: Re: [PATCH v3 2/7] kexec_file: print out debugging message if required Message-ID: References: <20231130023955.5257-1-bhe@redhat.com> <20231130023955.5257-3-bhe@redhat.com> <81c62af671ebbfad61dd46aa056050a56bf535a2.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81c62af671ebbfad61dd46aa056050a56bf535a2.camel@perches.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 00:44:21 -0800 (PST) On 11/29/23 at 06:52pm, Joe Perches wrote: > 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. Sorry for being late to reply, this comment was missed. I broke it into two because it's a too long line and not friendly for reading. I did notice there's such line breaking code. I can change it if it's not suggested. Thanks for careful checking.