Re: [PATCH] perf powerpc-vpadtl: Fix raw_size of DTL samples
From: Arnaldo Carvalho de Melo
Date: Sun Aug 30 2026 - 09:37:40 EST
On Fri, Aug 28, 2026 at 05:29:00PM +0530, Athira Rajeev wrote:
> > On 25 Aug 2026, at 3:17 PM, Wang Yan <wangyan01@xxxxxxxxxx> wrote:
> >
> > In powerpc_vpadtl_sample(), raw_data of the synthetic sample points to a
> > struct powerpc_vpadtl_entry (48 bytes), but raw_size is set to
> > sizeof(record). record is a struct powerpc_vpadtl_entry pointer, so
> > sizeof(record) is the size of the pointer (8 bytes on 64-bit) rather
> > than the size of the record itself.
> >
> > As a result, consumers that bound their access to raw_data by raw_size
> > only see or copy the first 8 bytes of each DTL entry instead of the full
> > record.
> >
> > Use sizeof(*record) so that raw_size reflects the actual length of the
> > raw data.
> >
> > Fixes: 8644834a482a ("perf powerpc: Process the DTL entries in queue and deliver samples")
> > Signed-off-by: Wang Yan <wangyan01@xxxxxxxxxx>
> Reviewed-by: Athira Rajeev <atrajeev@xxxxxxxxxxxxx>
Reviewed-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Namhyung, I think this is v7.3 material.
- Arnaldo