|
|
Log in / Subscribe / Register

Restricting automatic kernel-module loading

Restricting automatic kernel-module loading

Posted Dec 4, 2017 22:03 UTC (Mon) by nix (subscriber, #2304)
In reply to: Restricting automatic kernel-module loading by neilbrown
Parent article: Restricting automatic kernel-module loading

It's also more extensible. Sure, 0 1 and 2 are nicely ordered, with more capability towards the 0 end -- but what if you want to add more layers in the middle? They'd have to get stuck up around 3, 4, 5 etc (to avoid breaking systems using the existing values), breaking the ordering and rendering it strictly worse in all respects than using readable strings. (Sure, those strings are only readable to English-speakers, but *anything* is better than simple numbers. Well, almost anything. Three random UUIDs would be worse. Oh god someone's going to do that now I just know it. echo efc2654e-5890-47dd-95e7-87de662a2acb into this file to enable and 566a274d-bb12-4735-8400-1a2637b0a922 to disable! augh)


to post comments

Restricting automatic kernel-module loading

Posted Dec 5, 2017 3:21 UTC (Tue) by sorokin (guest, #88478) [Link] (1 responses)

Remembering my BASIC days, may I suggest using 10, 20 and 30 instead?

Restricting automatic kernel-module loading

Posted Dec 7, 2017 19:22 UTC (Thu) by jospoortvliet (guest, #33164) [Link]

Exactly! Simple and effective... doesn't solve all problems but that was what GOTO was for!

Restricting automatic kernel-module loading

Posted Dec 5, 2017 11:21 UTC (Tue) by ballombe (subscriber, #9523) [Link] (2 responses)

On the other hand, It is far easier to remember "1" than how to spell "by-capability".

Restricting automatic kernel-module loading

Posted Dec 5, 2017 12:00 UTC (Tue) by hrw (subscriber, #44826) [Link]

root@krzys:/sys/devices/platform/ar934x_wmac/leds/ath9k-phy0# cat trigger
none nand-disk switch0 timer default-on netdev usbport phy0rx phy0tx phy0assoc phy0radio [phy0tpt] phy1rx phy1tx phy1assoc phy1radio phy1tpt

$ cat the-switch-controlling-autoload-of-modules
always [by-capability] never

Doable?

Restricting automatic kernel-module loading

Posted Dec 6, 2017 13:59 UTC (Wed) by nix (subscriber, #2304) [Link]

It's far easier to remember how to spell '1', yes, but its meaning is entirely implicit and context-dependent. In practice you're going to have to look it up every time you use it, since this is not a flag you're likely to flip often. Meanwhile, textual strings are self-describing.

(Imagine this with the block layer. It's easy to flip to the deadline scheduler, just echo 1 > /sys/block/$foo/queue/scheduler! The default, cfq, is 3, of course, because it happened to be the third scheduler added. The second scheduler was removed long ago, so 2 is not valid any more, until of course someone adds another scheduler, when 2 is apt to get randomly picked up by that instead...)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds