Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-09 Thread Peter Zijlstra
On Thu, Nov 05, 2020 at 08:19:47PM -0800, Alexei Starovoitov wrote: > > Subject: [PATCH] Update perf ring buffer to prevent corruption from > > bpf_perf_output_event() $Subject is broken, it lacks subsystem prefix. > > > > The bpf_perf_output_event() helper takes a sample size parameter of u64,

Re: [EXTERNAL] Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-09 Thread Peter Zijlstra
On Mon, Nov 09, 2020 at 02:22:28PM +, Kevin Sheldrake wrote: > I triggered the corruption by sending samples larger than 64KB-24 bytes > to a perf ring buffer from eBPF using bpf_perf_event_output(). The u16 > that holds the size in the struct perf_event_header is overflowed and > the distanc

RE: [EXTERNAL] Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-09 Thread Kevin Sheldrake
NAL] Re: [PATCH bpf-next v2] Update perf ring buffer to > prevent corruption > > On Thu, Nov 05, 2020 at 08:19:47PM -0800, Alexei Starovoitov wrote: > > On Thu, Nov 5, 2020 at 7:18 AM Kevin Sheldrake > > wrote: > > > > > > Resent due to some f

Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-09 Thread Peter Zijlstra
On Thu, Nov 05, 2020 at 08:19:47PM -0800, Alexei Starovoitov wrote: > On Thu, Nov 5, 2020 at 7:18 AM Kevin Sheldrake > wrote: > > > > Resent due to some failure at my end. Apologies if it arrives twice. > > > > From 63e34d4106b4dd767f9bfce951f8a35f14b52072 Mon Sep 17 00:00:00 2001 > > From: Kevin

Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-05 Thread Alexei Starovoitov
On Thu, Nov 5, 2020 at 7:18 AM Kevin Sheldrake wrote: > > Resent due to some failure at my end. Apologies if it arrives twice. > > From 63e34d4106b4dd767f9bfce951f8a35f14b52072 Mon Sep 17 00:00:00 2001 > From: Kevin Sheldrake > Date: Thu, 5 Nov 2020 12:18:53 + > Subject: [PATCH] Update perf