On Fri, 31 May 2019 05:26:30 +0000 Song Liu <songliubraving@xxxxxx> wrote: > We can also do something like > > ee = kzalloc(sizeof(struct bpf_event_entry) + sizeof(struct perf_sample_data)); > ee->sd = (void *)ee + sizeof(struct bpf_event_entry); Or perhaps: ee->sd = (struct perf_sample_data *)(ee + 1); -- Steve