From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C95EC433C1 for ; Fri, 19 Mar 2021 21:08:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85AB961927 for ; Fri, 19 Mar 2021 21:08:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85AB961927 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JiRcjm+AVctw8ihVTFmxNK09BzJm0w8H1m7ugGAke4U=; b=OoezzxX7mX8ynVFx5ztwW1t4S fxoVeb2mhsevjahF0Rh70Njg3nTlvznLpTuTpYlMStYmxM0OflddtM8HAj01W35r3aV8moCCXqqVu 0L49x4/KdcMefjqFbji71tXAjvbN4vztqi+9S4+7+bbE9+1Hg9GeQ3Fgwt7hS6AbFjRlCPsjlugEM b8cRyx+SlB5BQytmlsYplgW4JE2mmocdrcyPuSbF0/mRXiVvJh5KX5zoP99XHFT67d5uQvbNFlmr2 wXhOtEannTmvIergIc9eO/jqso8R8qF1ykxeBmE+LLF1L546jXqn8+Zg3M36N+wfRyllRDqwqTdTn JIigBpx6Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNMKu-0089Xa-H0; Fri, 19 Mar 2021 21:07:12 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNMKp-0089Wt-AF for linux-arm-kernel@lists.infradead.org; Fri, 19 Mar 2021 21:07:10 +0000 Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net [162.237.133.238]) by linux.microsoft.com (Postfix) with ESMTPSA id 41F66209C3A4; Fri, 19 Mar 2021 14:07:02 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 41F66209C3A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1616188022; bh=q5AB1O3+WOrgB/Ote4fLERcdEW6A2Y4zo1h8LlTbdIQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qMh/7BHalJkXnaAsdeMCU8Vy5ERJDCDm2TQMq0oGUBUz6mRC4gICXKxMfrzu3oZON rcDw9M+rb19SoEcBC2Vfp3M8vXaCnh0DxydKf/3MY0Q0FjPDLRV+g8z1kmB+EhipKq zzzs5tl950MfN/HrJEuLOZ9wE/NdTjpyQukAfqBs= Date: Fri, 19 Mar 2021 16:07:00 -0500 From: Tyler Hicks To: Pavel Tatashin Cc: jmorris@namei.org, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: kdump: update ppos when reading elfcorehdr Message-ID: <20210319210700.GB235401@sequoia> References: <20210319205054.743368-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210319205054.743368-1-pasha.tatashin@soleen.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210319_210707_619439_2D2BE885 X-CRM114-Status: GOOD ( 16.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-03-19 16:50:54, Pavel Tatashin wrote: > The ppos points to a position in the old kernel memory (and in case of > arm64 in the crash kernel since elfcorehdr is passed as a segment). The > function should update the ppos by the amount that was read. This bug is > not exposed by accident, but other platforms update this value properly. > So, fix it in ARM64 version of elfcorehdr_read() as well. > Fixes: e62aaeac426a ("arm64: kdump: provide /proc/vmcore file") Reviewed-by: Tyler Hicks Tyler > Signed-off-by: Pavel Tatashin > --- > arch/arm64/kernel/crash_dump.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/kernel/crash_dump.c b/arch/arm64/kernel/crash_dump.c > index e6e284265f19..58303a9ec32c 100644 > --- a/arch/arm64/kernel/crash_dump.c > +++ b/arch/arm64/kernel/crash_dump.c > @@ -64,5 +64,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, > ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos) > { > memcpy(buf, phys_to_virt((phys_addr_t)*ppos), count); > + *ppos += count; > + > return count; > } > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel