Re: [PATCH v3 01/16] perf: Ensure perf_guest_cbs aren't reloaded between !NULL check and deref

2021-11-04 Thread Like Xu
On 22/9/2021 8:05 am, Sean Christopherson wrote: Protect perf_guest_cbs with READ_ONCE/WRITE_ONCE to ensure it's not reloaded between a !NULL check and a dereference, and wait for all readers via syncrhonize_rcu() to prevent use-after-free, e.g. if the callbacks are being unregistered during modu

Re: [PATCH 00/15] perf: KVM: Fix, optimize, and clean up callbacks

2021-08-27 Thread Like Xu
On 27/8/2021 3:44 pm, Peter Zijlstra wrote: On Fri, Aug 27, 2021 at 02:52:25PM +0800, Like Xu wrote: + STATIC BRANCH/CALL friends. On 27/8/2021 8:57 am, Sean Christopherson wrote: This started out as a small series[1] to fix a KVM bug related to Intel PT interrupt handling and snowballed

Re: [PATCH 00/15] perf: KVM: Fix, optimize, and clean up callbacks

2021-08-26 Thread Like Xu
+ STATIC BRANCH/CALL friends. On 27/8/2021 8:57 am, Sean Christopherson wrote: This started out as a small series[1] to fix a KVM bug related to Intel PT interrupt handling and snowballed horribly. The main problem being addressed is that the perf_guest_cbs are shared by all CPUs, can be nullif

Re: [PATCH V10 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-08-26 Thread Like Xu
On 27/8/2021 3:59 am, Sean Christopherson wrote: TL;DR: Please don't merge this patch, it's broken and is also built on a shoddy foundation that I would like to fix. Obviously, this patch is not closely related to the guest PEBS feature enabling, and we can certainly put this issue in a

Re: [PATCH V8 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-21 Thread Like Xu
On 16/7/2021 4:53 pm, Zhu Lingshan wrote: + } else if (xenpmu_data->pmu.r.regs.cpl & 3) Lingshan, serious for this version ? arch/x86/xen/pmu.c:438:9: error: expected identifier or ‘(’ before ‘return’ 438 | return state; | ^~ arch/x86/xen/pmu.c:439:1: error: e