
Originally Posted by
Ibidem
I wonder how much of the internals get exposed vs sysfs on linux.
On one hand this sounds interesting, on the other I wonder about security...drivers in Lua sound interesting, especially from the standpoint of having one driver that works everywhere.
The things that are configurable get exposed, perfect example...
Code:
ls /sys/module/*/parameters/
will tell you every parameter that every loaded module will accept input for, that you can then control via /etc/sysctl, /etc/modprobe.d/ or kernel parameter line. The nice thing about doing it over sysfs is that there's a certain level of sanity checking involved. You can still break stuff and in theory trash your hardware by pumping the wrong value into the module and it actually trying to do it (ex: telling your fans to run at max speed 24/7--youll kill your fans pretty quick, but you CAN do it via sysfs) but you probably wont crash the driver, unless you hit a bug, because it knows which parameters are ints, or arrays, or bool's and therefore you wouldnt get a driver crash because you pumped a "7" into a Bool, you'd either get an error or itd just ignore the invalid input and drop back to a sane default setting.