Re: Signaling/Messaging Userspace from Kernel
Thank you Andrew very much for the explanation! Very helpful.
From: Boie, Andrew P <andrew.p.boie@...>
Sent: Sunday, January 19, 2020 5:49 PM
To: Justin Huang <justin.y.huang@...>; users@... <users@...>
Subject: RE: [Zephyr-users] Signaling/Messaging Userspace from Kernel
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
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,