Am 20.10.2023 um 11:59 schrieb Benjamin Berg:
Can you explain, why a time travel handler for stdin may be bad? It sounds like you want to avoid it, but I see no immediate problem.I also noticed this problem, but after a discussion with Johannes Berg about this, we come to the conclusion, that all drivers with interrupts need to deal with time travel mode via their own time travel handler. What I actually did, was to write a trivial handler for e.g., the serial line, which simply only call time_travel_add_irq_event(ev).Yes, we could instead just assert that we do not have any IRQ without a timetravel handler. We really shouldn't have, but we do have one for stdin unfortunately (which is at least used by the hostap hwsim tests, so we might want to not remove it until we have a different solution). What we could do is just add an stdin timetravel handler as you have done, but print a warning when the stdin IRQ is registered[1]. And then, if someone tries to register an IRQ without a time-travel handler we just panic(), it should never happen.
Benjamin [1] We'll also need to set stdin to be a "null" channel and then somehow avoid registering the IRQ in that case.
-- M.Sc. Benjamin Beichler Universität Rostock, Fakultät für Informatik und Elektrotechnik Institut für Angewandte Mikroelektronik und Datentechnik University of Rostock, Department of CS and EE Institute of Applied Microelectronics and CE Albert-Einstein-Str. 26 18059 Rostock Deutschland/Germany phone: +49 (0) 381 498 - 7278 email: benjamin.beich...@uni-rostock.de www: http://www.imd.uni-rostock.de/
OpenPGP_0x1569BBF90AC3918A.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um