Hello Genodians,
I was working on a project and noticed that the only kernel fault core allows a component to handle is a page fault. Is there a particular reason that core only allows page faults to be handled and not all kernel faults? If there is a problem with receiving all faults I would love to know the issue! thanks in advance for all your help.
Sincerely, Nathan
Hello Nathan,
On Wed, Mar 06, 2024 at 21:15:47 CET, nsf@ksu.edu wrote:
I was working on a project and noticed that the only kernel fault core allows a component to handle is a page fault. Is there a particular reason that core only allows page faults to be handled and not all kernel faults? If there is a problem with receiving all faults I would love to know the issue! thanks in advance for all your help.
A feature to monitor CPU exceptions is existent but quite underused in Genode beyond the GDB monitor AFAIK.
The CPU session [1] permits to set an exception handler (signal capability) for one or all threads of the session [2] [3]. The thread's state can then be requested from components possessing the thread capability via 'Thread_state Cpu_thread::state()' and contains the current exception in 'Cpu_state::trapno' for x86 [5], 'Cpu_state::cpu_exception' for arm v6/v7 [6], and seems to be missing for arm v8.
To control how the thread that triggered the exception should proceed, the handler may use `Cpu_thread::state(Thread_state const &)`.
[1] https://genode.org/documentation/genode-foundations/23.05/functional_specifi... [2] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [3] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [4] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [5] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [6] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290...
Regards
I have to correct myself...
On Thu, Mar 07, 2024 at 08:04:59 CET, Christian Helmuth wrote:
and contains the current exception in 'Cpu_state::trapno' for x86 [5], 'Cpu_state::cpu_exception' for arm v6/v7 [6], and seems to be missing for arm v8.
It seems ARMv8 provides an "exception syndrome" in 'Cpu_state::esr_el1', which should be what we're looking for and is used by the monitor component ;-)
Greets
This is a bit of a tangent, but could the existing mechanisms be used to efficiently implement memory over-provisioning for non-critical processes, disk swapping, and copy-on-write page tables for a faster fork() implementation?
On Thu, Mar 7, 2024, 12:11 AM Christian Helmuth < christian.helmuth@genode-labs.com> wrote:
I have to correct myself...
On Thu, Mar 07, 2024 at 08:04:59 CET, Christian Helmuth wrote:
and contains the current exception in 'Cpu_state::trapno' for x86 [5], 'Cpu_state::cpu_exception' for arm v6/v7 [6], and seems to be missing for arm v8.
It seems ARMv8 provides an "exception syndrome" in 'Cpu_state::esr_el1', which should be what we're looking for and is used by the monitor component ;-)
Greets
Christian Helmuth Genode Labs
https://www.genode-labs.com/ · https://genode.org/ https://floss.social/@genode · https://genodians.org/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth _______________________________________________ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-leave@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/mes...
Hello,
On 2024-03-07 20:37, Nobody III wrote:
This is a bit of a tangent, but could the existing mechanisms be used to efficiently implement memory over-provisioning for non-critical processes, disk swapping, and copy-on-write page tables for a faster fork() implementation?
this was indeed one of motivations behind the mechanism, see [1]. Recently, this topic was briefly touched in [2] as well.
[1] https://genode.org/documentation/release-notes/10.11#On-demand_paging [2] https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/mes...
Cheers Norman
Thank you for all the helpful information, it helps a bunch!
Sincerely, Nathan