Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1350871pxx; Tue, 27 Oct 2020 14:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxULmwsjn0X86vrM2WM2sCDmcma4rtcY4PRmIYTAuryBq86vLpH6ebgBcgx0rl/0fatTEX/ X-Received: by 2002:a17:906:170f:: with SMTP id c15mr4592178eje.347.1603835230185; Tue, 27 Oct 2020 14:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603835230; cv=none; d=google.com; s=arc-20160816; b=JER5/moUOHrTDtneuZE8NkaX0nZ3EzCoDfGN0mG1yiC9Zy6ksWBKlus/y8ucdG27wX qkf7M0bXjurVikEuRyVex68jeSNTSRJULBmvRxXsZEFIHE5CRDukp/bZDcffhi4sOq8Y bU1KwIQCgqbAjGpXGpJSodHu8N89fnNSPf/ntjc7GdikeMxl4haDLG5rVt8ZgrTiqtVE HT+c+CYE2cLkMWBAXzNeX6XCPDERGaX4Kh2h7AcngKdBad7qPmybqaK0mcNuoU60cKjY Et3OQu/XGwR0GCrku+6Q0TUmvlKZISuR5cK0fL2U7lM51+Qh/2dDxMINswvjAu84RBXX 7Auw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RufP3qjmXuxaUF3ybvzpTJBsD2XeZ/nZjEMXWLPO6xc=; b=Td5OERh9zwKsVNv1rWVPz+N2G8qd6Ikq9y+h5JSB+Z1luozEmD+24/QWWl2xmctoB8 xe6SsqB2mHbgydL0j4F94IpCysP1AMPFkGkTcNxS9/p6zqdlywnXWqjXFavNuJYAMX7+ x/2L7rUaTNH3wuK+PajZD04dAF6Opkf+j/NdXFoQYzTaXQ5EaGMY9mC0jl15+DztWMun wDzd2WSJn0T+tKF8WnNFY924VAbW+/Z6jCSo/PylhwsAYNlpyT2REOzGKYb4BZyPpNK8 uN/MHhcY0KSe3JPx3c3b9syOWLcFyfNmMSku/OudWTeP7kG0Yljxm+89qL8byAgK/aCc HONw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pHRgxBKy; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si1837293edt.484.2020.10.27.14.46.47; Tue, 27 Oct 2020 14:47:10 -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=@gmail.com header.s=20161025 header.b=pHRgxBKy; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505704AbgJ0FJH (ORCPT + 99 others); Tue, 27 Oct 2020 01:09:07 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:40660 "EHLO mail-wm1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436533AbgJ0FJH (ORCPT ); Tue, 27 Oct 2020 01:09:07 -0400 Received: by mail-wm1-f53.google.com with SMTP id k18so114302wmj.5; Mon, 26 Oct 2020 22:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RufP3qjmXuxaUF3ybvzpTJBsD2XeZ/nZjEMXWLPO6xc=; b=pHRgxBKyDahbPCSBmbWVpuMhvlKklou1v6yEWFPk39BEQ7DvnEyI8jtWLwgjzi+cVb 0QmhYfxK5/sAvomdEs+mj7+XdjxWFK+96FHrm+2nHy4Fdu0WaXyXWBk7D/34jpA53w3a XwXPDGHmheXNFNstNLHwHOGO4w5K2HXHb48GhyGnrN47LFkiR2SPyTj8f9GESZHEyxqv 4A5R1VfESTfcdtJs+ght3T8MZLsQIkU5ZvRw6pX72yHub+WUIaO45nebGfgg8ThLBxiB /Nn8tOCUJAHiOLVaPizLV57/iq8tLU+ZcAolLElRsDHqRZ/SMrmw4/13Y9CoCn3LsjyZ AyCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RufP3qjmXuxaUF3ybvzpTJBsD2XeZ/nZjEMXWLPO6xc=; b=MnJ8squXKyapHsZhLmYzxQE/lNR/+V6abx+xDCSp32yRxogvbKm76HxRw1Evye3SeH VoSVQ+xOeN4Yozoo9Nv72ctxKt5kLeESOOPIE6nYVfgUwgq3QUljGuD6ubv2GIDQC6jD gEVKLrexnYYJVqLOLoycIB/uC2TDzc7YmOYX1JOhV1H1OjZmbL6j50QiEVVlWJR4DVvr GYnTSnw2ACEey+pvbnU+SuTJBayg/YqcucZIzfgI2eI2/ffrl0iaYP2OP06l3D3Jlf7G BYx/+gkejVjmtgNYzUoJFEpMJYj/nUsWMNCH1oAzbIv3r8MLy25E9KxJy9ycGVxNFtJ4 jL9Q== X-Gm-Message-State: AOAM530N0fXdgEG15vsbDokwsp7rILZuEQugEm55dmRi0vE2I5U9rstM p/IzKzn1bzVHlrCDCVt2uBHIKDnFfNlYVj050BHrcOM/ X-Received: by 2002:a7b:cb46:: with SMTP id v6mr621976wmj.146.1603775344036; Mon, 26 Oct 2020 22:09:04 -0700 (PDT) MIME-Version: 1.0 References: <29be54b5-5872-33ac-7c8e-998d77226a0a@amazon.com> In-Reply-To: <29be54b5-5872-33ac-7c8e-998d77226a0a@amazon.com> From: Namhyung Kim Date: Tue, 27 Oct 2020 14:08:53 +0900 Message-ID: Subject: Re: Perf raw sample overflows perf record To: George Prekas Cc: linux-perf-users , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + LKML On Sat, Oct 24, 2020 at 8:44 AM George Prekas wrote: > > The header of a perf sample has a u16 field for the size of the record. > On the other hand, a PERF_SAMPLE_RAW has a u32 field for its size. > > I've written a test perf driver that creates large raw samples and it > doesn't work correctly (as expected). For example, perf record fails with: > > Can't parse sample, err = -14 > 0x4688 [0x8]: failed to process type: 68 [Bad address] > > Is this expected? Is the developer of the perf driver responsible to > make sure that each perf record does not exceed 64KB in size? If that's > the case, I am wondering why the raw sample has a u32 for its size. For the large records, you may consider an auxtrace interface. Thanks Namhyung