Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp113180ybg; Mon, 8 Jun 2020 17:59:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu4gvRZCw/UwlKZKSzRi0OS5wcqjz8ivqjQUMeiS1+hx/2Tg/Law/EabRnlfXOnNyIfJVg X-Received: by 2002:aa7:cdc6:: with SMTP id h6mr9571105edw.191.1591664347467; Mon, 08 Jun 2020 17:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664347; cv=none; d=google.com; s=arc-20160816; b=iYY2n5AeGLmIFTOurbsg9Bia53adTmHqSlOQ9o71cqjHe0VRO5BoYCDtIM8cqRd5It q63JQpme/iOWEh7v3N/cjqVrEgfqFT+ts9K2H3DjIeJ/8QkheaSFZQUBFd0HJjUzfsE8 dEQF8Cal63xGWLmGO0nzGGc/P6obw83hDX5cWABKcjtbrd+MaO6DEEWdzw9U8wCuThqv SNbHUkk8tcUV9v8bEDFuYyGQkm0u2ptGf3ol1sUN0I8pdTIAZCM7CtbKctQvImv68Nmt bhY9kw1xeX7q44MooCyjINgB7m/YH+jaM3VhVZtXrNu4Fru/JFLWhf4pKl0UORe0d+tz YEvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w/05fwKXzGf0cOfP+gomhi7bY4yx6kIXMuIhoUc49j0=; b=HGU+FGA/vrUjID3rNDHckoBmy4cNsdX5Tg2wPcTCXBTq3qFbDa48VNoxH/eR9rccCx CAq9MUxczCdZ5I/hewGBh8QFfKyyM/WcH+zBjywYJFQwDoxIH1MNE2fEXb7I7Y6WeI06 UAjdJIrW+fyjJnUNwjfa4fCX9C8FqjrV6AMfT9T0vJGTbXXC8RzMbPq9mQ4s2U6vGoJC KEGJtRmkeDRxhNmJ+7A7tUCgPhHu5gZE//xpp6jjO4IeKy8CTxxwz+ZN+v4g4S2h0Apu awpY0CA9ZtMFxJjcvGCyuS8w87NQ0XvDhxnw6Pi9WMou08friP/3+NCsRkG5RHA5NyjN qqgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DvkJPWcz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si9923556eds.416.2020.06.08.17.58.44; Mon, 08 Jun 2020 17:59:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DvkJPWcz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387937AbgFIAzE (ORCPT + 99 others); Mon, 8 Jun 2020 20:55:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:55096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbgFHXJX (ORCPT ); Mon, 8 Jun 2020 19:09:23 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C34BE20897; Mon, 8 Jun 2020 23:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657762; bh=0iFoIg7nV2CD2R+djatO1hodQJVSkJJ3Jzd7XRmEByk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DvkJPWcz8Chv93fFOsvsqHwdIG9INMFslKzZxNlTm/Mr9ZP2eN13AoCFRPORr0OEK u5yYL/fQidpuRVK2lt3I+keORZldq6cgdPYrfpiSVuEBVWC7e03xqtlXwzNg959qOT Zi+BDEA9azIFKb/u8RMcB5no+K0Eq8Bxc04xk/Lk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?=C5=81ukasz=20Stelmach?= , AKASHI Takahiro , James Morse , Bhupesh Sharma , Will Deacon , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.7 147/274] arm64: kexec_file: print appropriate variable Date: Mon, 8 Jun 2020 19:04:00 -0400 Message-Id: <20200608230607.3361041-147-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Łukasz Stelmach [ Upstream commit 51075e0cb759a736e60ab4f3a5fed8670dba5852 ] The value of kbuf->memsz may be different than kbuf->bufsz after calling kexec_add_buffer(). Hence both values should be logged. Fixes: 52b2a8af74360 ("arm64: kexec_file: load initrd and device-tree") Fixes: 3751e728cef29 ("arm64: kexec_file: add crash dump support") Signed-off-by: Łukasz Stelmach Cc: AKASHI Takahiro Cc: James Morse Cc: Bhupesh Sharma Link: https://lore.kernel.org/r/20200430163142.27282-2-l.stelmach@samsung.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/machine_kexec_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c index b40c3b0def92..5ebb21b859b4 100644 --- a/arch/arm64/kernel/machine_kexec_file.c +++ b/arch/arm64/kernel/machine_kexec_file.c @@ -284,7 +284,7 @@ int load_other_segments(struct kimage *image, image->arch.elf_headers_sz = headers_sz; pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n", - image->arch.elf_headers_mem, headers_sz, headers_sz); + image->arch.elf_headers_mem, kbuf.bufsz, kbuf.memsz); } /* load initrd */ @@ -305,7 +305,7 @@ int load_other_segments(struct kimage *image, initrd_load_addr = kbuf.mem; pr_debug("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n", - initrd_load_addr, initrd_len, initrd_len); + initrd_load_addr, kbuf.bufsz, kbuf.memsz); } /* load dtb */ @@ -332,7 +332,7 @@ int load_other_segments(struct kimage *image, image->arch.dtb_mem = kbuf.mem; pr_debug("Loaded dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n", - kbuf.mem, dtb_len, dtb_len); + kbuf.mem, kbuf.bufsz, kbuf.memsz); return 0; -- 2.25.1