Message ID | 20210614102642.545748223@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3151685jae; Mon, 14 Jun 2021 03:30:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOM4cOysTAgrTrkrlT3jyZlsew6PcWn6sru+3cdrgK8Zkz2Hizep6JBFlS1ifc3Scoos12 X-Received: by 2002:a05:6402:b17:: with SMTP id bm23mr16037003edb.236.1623666637207; Mon, 14 Jun 2021 03:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623666637; cv=none; d=google.com; s=arc-20160816; b=bR3R7tl64nHgvyRbSI8UiqA3WleL7gCfFQ4j8dowVCK2jBX8nbxjzgJ6khfPEhcDrV 9i1cS8qMjOkvwfdbfhbzRPELFtv9liCQw2qw6ez9FIH4m06kDUO0dfVuslmXGxB+e+QJ VltJu2FVc9lQjBvz073gHRVKfwRbkKtBfwOZMyxBGSKgu9A/YHyc8G8CU1FEXB9KLeEH dvxwy4kvp/mvY8uXgJyICbus4uE0lNCz5zFL0x6HQA/5jggtz+k1oo0wFslwtSdyq12g mbFRL/7xu4/Mm2RKuCmN6ZypQSu9hCl0gJI2t3CEmBSsFlxNYr9aqBMpe5qXMNWAa1fs cDpw== 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=xWmOzwGzK015HvzziLALbQA26Y0q4VSYcC5jZpYNOQw=; b=lpzdrJa6sE6V61YEJnPxAH+2le0xGifoIw+VqmKmfcIeV9lsYs8Y4IVRpNqtdkmqdm 3+MJ5MhllBUlXaCV6Veey8eXUIMerXEDup3mA4RyZc3QfMF6oBDUqQceydTibj5TZY4+ N7+8XpmuYeHE70cPDW9LwsYXb+bFHo4mJrOJ6HVytYr3pCvbmdEA4WXp2m3BvlgSfaNS gwFvOVIJivUPiEPcH1D4JTBWMuAAxYcolBsfjuHuF0ldULStz5mzZ+bySeTNwfsuUnb8 pyMnPTHTQNfUav8Uq6BL+ybawKO3NPZihbF3OhsgDwVtHvtcUApwdPMzsMUzqgFsmlZ4 0XLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PAuUoVrr; 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 j12si11287118ejy.26.2021.06.14.03.30.37; Mon, 14 Jun 2021 03:30:37 -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=PAuUoVrr; 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 S233039AbhFNKcK (ORCPT <rfc822;semen.protsenko@linaro.org> + 12 others); Mon, 14 Jun 2021 06:32:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:38348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232982AbhFNKb5 (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 14 Jun 2021 06:31:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B528561206; Mon, 14 Jun 2021 10:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623666578; bh=oorC/DVzdfQ70Y7BRI3uAUe33u5+TE6kQK7sH2MujVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PAuUoVrrFmpSWum5fjPqD3RpozNm8GHOWUKdWXfZPEz0XtavVANbL+6z+APdU8t31 9hLg2761gY2vo9poLuyNWFy29lrzTjYi5er/bp3wEyUYDqRKtEVTqsZEC915iaO7zH thGsMdRf67nayLg6kB08zj5iqUVwytkEudJQYGEk= 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.4 30/34] perf session: Correct buffer copying when peeking events Date: Mon, 14 Jun 2021 12:27:21 +0200 Message-Id: <20210614102642.545748223@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102641.582612289@linuxfoundation.org> References: <20210614102641.582612289@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 5b392662d100..1029225ee417 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1255,6 +1255,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)