[PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

Michael Ellerman mpe at ellerman.id.au
Tue Dec 19 17:33:33 AEDT 2023

Aneesh Kumar K.V <aneesh.kumar at kernel.org> writes:
> Luming Yu <luming.yu at shingroup.cn> writes:
>> Before we have powerpc to use the generic entry infrastructure,
>> the call to fire user return notifier is made temporarily in powerpc
>> entry code.
> It is still not clear what will be registered as user return notifier.
> Can you summarize that here?

fire_user_return_notifiers() is defined in kernel/user-return-notifier.c


That is not user selectable, it's only enabled by:

arch/x86/kvm/Kconfig:        select USER_RETURN_NOTIFIER

So it looks to me like (currently) it's always a nop and does nothing.

Which makes me wonder what the point of wiring this feature up is :)
Maybe it's needed for some other feature I don't know about?

Arguably we could just enable it because we can, and it currently does
nothing so it's unlikely to break anything. But that also makes it
impossible to test the implementation is correct, and runs the risk that
one day in the future when it does get enabled only then do we discover
it doesn't work.


More information about the Linuxppc-dev mailing list