Message ID | 20210614102643.207576453@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3157251jae; Mon, 14 Jun 2021 03:38:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSgdbQy0Avg8fnU2NIXuvkCiZAKuL73S/nMjySZki0IVUz5okqwU2m5pjfuIf4b3GqskTn X-Received: by 2002:a17:906:f9d1:: with SMTP id lj17mr14791185ejb.345.1623667101585; Mon, 14 Jun 2021 03:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623667101; cv=none; d=google.com; s=arc-20160816; b=KPoJUVAaqvZWIp3Hbp3GsXCr2ELswPjJx+nBbtMArwXUSft40oCAQvOg5hMJgG/gY5 /wi/bvjf5Lzv+w8aUYWv5BhSUP52l2ERx0/u40BbHUNcUZXk1AzdU/fSYXHX4HDvxdGc yjYk+21U/xkeNP2X9k5v/0fOrizUDQaKnS+ypL/e+BFlKFQLr7x9w8QB3m8OhWQ5lHGE EO0OrHAmbW3xby+EZsIavVHru0xFxGR9Y1bu6ErK3tYcXKtYYZ7JZO2ut1rU9VYZCflv lwBfBFFAQqoIbm0ME0AYUGnpc34I+jpWkylYunYvSagZhnS2/TMxyA4Hh013SgocdM0v /kSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V6H/lkkBHnD12ygMv9pbLxzzgEiwTsGYJXLgOkg0HwU=; b=ItnFiXoXCLtLYe/SfD8vMnKdbgpEYC0//lRClWQ84/agVYbIw/jKwa2NjtNxtaWyjL s3TV+f6woswISo0FZAs8RvTWKgTu1G1aOCoD0SY5LMrN/W14ZDcD9BJyPdPkzTLJkCbb S613pf5uJEY8M+FZIXRcl2lRGdLRd+4qNE/0AzFXjlyrE0pRkhje1Yc9GmStJigmXpVN LG/fOKT947P0HFGxmqceWGwBK1Gu23SGoHwv+2Athdbg7REgPsZa/oPnjrFmH1pL7WTn PHxao5CiX43oBJe20Wk/pdYJ7zSRRAscvbzs5vr2iMPhPMz+pW7oaDevNUcGxiTKc6AP Nu0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z19v4tmS; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si2605138edw.0.2021.06.14.03.38.21; Mon, 14 Jun 2021 03:38:21 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=Z19v4tmS; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233652AbhFNKkW (ORCPT <rfc822;semen.protsenko@linaro.org> + 12 others); Mon, 14 Jun 2021 06:40:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:40062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233777AbhFNKhx (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 14 Jun 2021 06:37:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E7BA3611BE; Mon, 14 Jun 2021 10:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623666819; bh=Yg31k1HocdswqpPwLQx+peZ9oi2gE5TsZ/v3v/9vvYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z19v4tmSd4++RQHuBIbXsA7g20Qpr97lagJQMODUOfwrviMl7AItv8ZnRjyozwhDh 6pOthfsHjwVM06cjNYCJmW/srspQ0irVqqT9L3vLthRZgIN2KUVlJRZmG96kYwlqKn 9/576tidILBVdgdymPyhOLSc26xcNp184lqv0K2w= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Leo Yan <leo.yan@linaro.org>, Adrian Hunter <adrian.hunter@intel.com>, Jiri Olsa <jolsa@redhat.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Kan Liang <kan.liang@linux.intel.com>, Mark Rutland <mark.rutland@arm.com>, Namhyung Kim <namhyung@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Arnaldo Carvalho de Melo <acme@redhat.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.14 41/49] perf session: Correct buffer copying when peeking events Date: Mon, 14 Jun 2021 12:27:34 +0200 Message-Id: <20210614102643.207576453@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102641.857724541@linuxfoundation.org> References: <20210614102641.857724541@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index decd5d147e81..735dc862c7f8 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1475,6 +1475,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset, if (event->header.size < hdr_sz || event->header.size > buf_sz) return -1; + buf += hdr_sz; rest = event->header.size - hdr_sz; if (readn(fd, buf, rest) != (ssize_t)rest)