Message ID | 20210614102645.729398944@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3162259jae; Mon, 14 Jun 2021 03:45:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj0i/kmnhmgCArR7/GOJEWuSZmQDmGUszUWJ6dq6GHz9TbQVk2c1zABQYug9lEGHaQxHiZ X-Received: by 2002:a05:6402:8d4:: with SMTP id d20mr16092662edz.117.1623667557202; Mon, 14 Jun 2021 03:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623667557; cv=none; d=google.com; s=arc-20160816; b=t/ceG7U3E5QVdEkdj/AFk4EMpuL3omP+NfyTq84980Wp2kKdJpr5poyGcta95Tm6pm OlstONwd9ktaDG+qbLtad0uFWn2UNvBJ/iSKiHxJutDYCR0ifpsiIMZaWfy0HcfMHdIq daZ5BFjeX8wef4ML7oGHGysEMPYVETZP66WfcROLKKKv1v76HF3aZ8lJ54eZgXEevAV9 nR0WM+X3NcmgcADo7BqyUj9BH3GsZletpuLI8Ya+7dnsh/rYif+PUeHbW8cXBaL9mamb H78IFWgu7j66hhHoXaJu6J3xksoaf8o4Sq1R1PO60prXApGK89t+EVwC5JKpj5SiHQWA q6wA== 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=02G9aVApv1HZrPfRIN01HQFLjtBPAJ4guhnhScTHi18=; b=CegefLjT3z1i5UWEZmJ8JwBTVG6LBEgnH677n0o2YXJJ5utYBj5ATiNQseTcvgNiKM aeRIzFGYDSS/RFw3cBd284ItsiSvqK8Haad6tWbu3jvHa5AgfyDUpgW535i56AakoeoA pmIbLVHiZ1hEZ7j/TeAQUTgjIAf0AKyVJFOPGkJMZym7IS/1a11OlF1HOq5xqFBpDXaX Wl4K/CRXz8fvyQ2Cr4iCulTPCyWQaHAmYPRiyyPy3yLpDbXd8VzV8ITPfx3RwgrrB9Q+ QOMWoXcpBFgOFbtr+Ds739C4tbrOWod1MiiBui7tmd0zBYBcPh2hhGzXWPyHpAsbDcfb n+bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GCEsJG5i; 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 f3si3497708ejl.241.2021.06.14.03.45.57; Mon, 14 Jun 2021 03:45:57 -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=GCEsJG5i; 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 S233042AbhFNKr6 (ORCPT <rfc822;semen.protsenko@linaro.org> + 12 others); Mon, 14 Jun 2021 06:47:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:50316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232796AbhFNKp4 (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 14 Jun 2021 06:45:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 82ABA613D3; Mon, 14 Jun 2021 10:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623666999; bh=Zrnh7qmLrObb24IuG3WZ+Fx9/p+T9L6ChHDry08hZrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCEsJG5iunNh4CYmyP3YY174pJx1j7rW/y8MkRb4b31h5tyQsuNnplSydziZc7JqH qMuJLp4OtzFzs2lpt59zwT0BtBrhaAfmS/H2NX2ZoJZmUmzi2m6L49zqMvjbtSHzBN ximeFta3A7yGLtPEo5igdSliBCNZ2VLaBU2fgpJs= 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.19 58/67] perf session: Correct buffer copying when peeking events Date: Mon, 14 Jun 2021 12:27:41 +0200 Message-Id: <20210614102645.729398944@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102643.797691914@linuxfoundation.org> References: <20210614102643.797691914@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 6a2037b52098..3be1534f1f03 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1478,6 +1478,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)