On Mon, Aug 15, 2022 at 11:57:40AM +0200, Peter Zijlstra wrote: > On Thu, Aug 11, 2022 at 11:15:21AM +0200, Jiri Olsa wrote: > > Adding KPROBE_FLAG_ON_FUNC_ENTRY kprobe flag to indicate that > > attach address is on function entry. This is used in following > > changes in get_func_ip helper to return correct function address. > > IIRC (and I've not digested patch) the intent was to have func+0 mean > this. x86-IBT is not the only case where this applies, there are > multiple architectures where function entry is not +0. we can have kprobe created by user passing just the address in this case _kprobe_addr still computes the address's offset from the symbol but does not store it back to 'struct kprobe' jirka