3 ms·
I was thinking the same thing. Is this actually “good” for Linux? This strikes more like a technical bar trick than an important part of the kernel, and another
by ed25519FUUU 6y ago
I was thinking the same thing. Is this actually “good” for Linux? This strikes more like a technical bar trick than an important part of the kernel, and another surface which can be attacked.
- philwelch 6y agoI'm not a kernel expert but this seems like something that would be ISA-specific. If you're running a Linux kernel on anything other than a 68k processor, this code won't even be there for the most part. And if you are running it on a 68k, odds are you're running it on an old Mac anyway.
- yjftsjthsd-h 6y agoI doubt that it's per-ISA; it's probably by device or maybe bus/transport. That is, with the right adapter you should be able to plug an ADB keyboard into a normal x86 box and have it work, but Linux will only actually load a driver if 1. it's statically compiled in (rare unless you built your own kernel), 2. you explicitly load it (`modprobe foo`), or 3. you plug in a device that uses that driver. As a reference point, I know NetBSD explicitly decouples these things; if you plug a brand-new PCI device into any system with a PCI slot, NetBSD doesn't care that you're plugging ex. a Sun keyboard into a "PC" USB card in a PowerPC mac - it has a keyboard driver, a USB driver, a PCI driver, and all of them use the same internal interfaces regardless of where they originated. I assume Linux does it the same way, but I don't know explicitly.
- philwelch 6y agoThe driver code seems to be under “macintosh/via-macii”, for whatever that’s worth.
- throwaway373438 6y agoThat's more or less correct. The relevant Kconfig is: if MACINTOSH_DRIVERS config ADB bool "Apple Desktop Bus (ADB) support" depends on MAC || (PPC_PMAC && PPC32) help Apple Desktop Bus (ADB) support is for support of devices which are connected to an ADB port. ADB devices tend to have 4 pins. If you have an Apple Macintosh prior to the iMac, an iBook or PowerBook, or a "Blue and White G3", you probably want to say Y here. Otherwise say N. In other words, the code is only built into the kernel on architectures where it is useful.