Re: [PATCH v4 09/17] perf/core: Use static_call to optimize perf_guest_info_callbacks

2022-02-06 Thread Kees Cook
On Sun, Feb 06, 2022 at 09:28:52PM +0100, Peter Zijlstra wrote: > On Sun, Feb 06, 2022 at 10:45:15AM -0800, Kees Cook wrote: > > > I'm digging through the macros to sort this out, but IIUC, an example of > > the problem is: > > > > > so the caller is expecting "unsigned int (*)(void)" but the

Re: [PATCH v4 09/17] perf/core: Use static_call to optimize perf_guest_info_callbacks

2022-02-06 Thread Peter Zijlstra
On Sun, Feb 06, 2022 at 10:45:15AM -0800, Kees Cook wrote: > I'm digging through the macros to sort this out, but IIUC, an example of > the problem is: > > so the caller is expecting "unsigned int (*)(void)" but the prototype > of __static_call_return0 is "long (*)(void)": > > long

Re: [PATCH v4 09/17] perf/core: Use static_call to optimize perf_guest_info_callbacks

2022-02-06 Thread Kees Cook
On Fri, Feb 04, 2022 at 09:35:49AM -0800, Sami Tolvanen wrote: > On Wed, Feb 2, 2022 at 10:43 AM Sean Christopherson wrote: > > > +DEFINE_STATIC_CALL_RET0(__perf_guest_state, *perf_guest_cbs->state); > > > +DEFINE_STATIC_CALL_RET0(__perf_guest_get_ip, *perf_guest_cbs->get_ip); > > >

Re: [PATCH v4 09/17] perf/core: Use static_call to optimize perf_guest_info_callbacks

2022-02-06 Thread Peter Zijlstra
On Fri, Feb 04, 2022 at 09:35:49AM -0800, Sami Tolvanen wrote: > On Wed, Feb 2, 2022 at 10:43 AM Sean Christopherson wrote: > > > +DEFINE_STATIC_CALL_RET0(__perf_guest_state, *perf_guest_cbs->state); > > > +DEFINE_STATIC_CALL_RET0(__perf_guest_get_ip, *perf_guest_cbs->get_ip); > > >