Re: Signaling/Messaging Userspace from Kernel
Boie, Andrew P
If you look closely you will see that there is no capability for user mode functions to install a callback handler. This type of operation is supervisor mode only.
In the callback handler the application has registered from supervisor mode (typically at application initialization), use an IPC object to wake up a user thread for further processing.
There’s some example code in samples/userspace/prod_consumer
This is something we’d like to iterate on further so if you can come up with some scenarios that you don’t think are well supported please file GH enhancement tickets and assign to me for further discussion.
From: users@... <users@...> On Behalf Of Justin Huang
Sent: Saturday, January 18, 2020 10:38 AM
Subject: [Zephyr-users] Signaling/Messaging Userspace from Kernel
Could someone shed some light on ways in Zephyr for Kernel to signal, or send a message to, threads running in the userspace?
I see some examples using callback functions, but wonder if that is a good practice: it is generally a security risk to run a function provided by a userspace application in the supervisor mode.
Any thoughts/pointers/suggestions would be greatly appreciated.
Many thanks in advance and
with kind regards,