flipperzero-firmware
flipperzero-firmware copied to clipboard
BadUSB: add SYSRQ keys
What's new
This allows sending of SysRq keys[1]. This then for example allows sending the well known 'reisub' commands to safely reboot a otherwise frozen Linux box. Or obviously any of the other magic keys.
The advantage compared to sending it to /proc/sysrq-trigger is that one does not need a shell and depending on how broken the system is, one might not even be able to get a new shell. The SysRq keys still work.
The cost is adding a new/"non-standard" keyword, IMO it is worth it.
Example: DEFAULTDELAY 200 DELAY 1000 SYSRQ r SYSRQ e SYSRQ i SYSRQ s SYSRQ u SYSRQ b
If one really wants to test it, I suggest h(elp) or w(ait).
[1] https://en.wikipedia.org/wiki/Magic_SysRq_key
Verification
- rebuild firmware and test with the example on a linux box:
DELAY 1000
SYSRQ h
and then check for output in dmesg
Fixes #1489
Checklist (For Reviewer)
- [ ] PR has description of feature/bug or link to Confluence/Jira task
- [ ] Description contains actions to verify feature/bugfix
- [ ] I've built this code, uploaded it to the device and verified feature/bugfix
- added a harmless verification example that prints the sysrq help to the kernel ringbuffer
this is now lingering around over a week without any feedback. is there anything I can do that this gets reviewed/acked?
@rck Hi, sorry, we are preparing release for the factory. This PR will be merged next week.
Also person in charge of USB is currently on vacation, so it's taking longer time than usual.
thanks for the update, highly appreciated. no worries, just the usual "start nagging the maintainers after a week of silence" :)
@rck Hi, sorry, we are preparing release for the factory. This PR will be merged next week.
It is now over a month. Any updates?
Hi. Sorry for delay. We’ll merge it after elf support PR.