kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Try/catch for modules?
@ 2019-10-17 13:37 Martin Galvan
       [not found] ` <CAG=DERmX7AU8YkEAYnPLfPKCLD=1OugmD95R9wZ3CepXvqzd2Q@mail.gmail.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Martin Galvan @ 2019-10-17 13:37 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I'm writing a kernel module, and am trying to implement some
exception-handling mechanism so that the system won't oops/panic if my
module does e.g. a NULL dereference. The (horribly hackish) way I'm
doing this right now is registering a die_notifier which will set the
'panic_on_oops' variable to 0 if we detect that the current PID
corresponds to my module. However, this is ugly for many reasons.

What would be the "standard" way of doing this? Is there something
like Window's try/except blocks, where I can get back control of the
execution flow, without having the process die? I'm aware of
_ASM_EXTABLE, but I understand this only works for a single
instruction and has other limitations.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-10-19  7:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 13:37 Try/catch for modules? Martin Galvan
     [not found] ` <CAG=DERmX7AU8YkEAYnPLfPKCLD=1OugmD95R9wZ3CepXvqzd2Q@mail.gmail.com>
2019-10-17 13:42   ` Maria Neptune
2019-10-17 13:51     ` Ruben Safir
2019-10-17 22:12 ` Valdis Klētnieks
2019-10-18 15:43   ` Martin Galvan
2019-10-18 15:47     ` Anuz Pratap Singh Tomar
2019-10-18 15:48     ` Maria Neptune
2019-10-18 16:04     ` Bernd Petrovitsch
2019-10-18 16:11       ` Martin Galvan
2019-10-18 16:18         ` Bernd Petrovitsch
2019-10-18 17:02         ` Ruben Safir
2019-10-18 17:05           ` Martin Galvan
2019-10-18 18:52             ` Ruben Safir
2019-10-18 18:53             ` Ruben Safir
2019-10-18 19:08               ` Ruben Safir
2019-10-18 21:53         ` Valdis Klētnieks
2019-10-18 22:09           ` Martin Galvan
2019-10-18 22:28             ` Greg KH
2019-10-18 18:48     ` Ruben Safir
2019-10-18 21:24     ` Rik van Riel
2019-10-18 21:32       ` Ruben Safir
2019-10-18 21:37       ` Ruben Safir
2019-10-18 22:59     ` Valdis Klētnieks
2019-10-19  7:46 ` Bjørn Mork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).