Closed anthraxx closed 3 years ago
Isn't this as simple as removing https://github.com/anthraxx/linux-hardened/blob/master/kernel/sysctl.c#L899?
not as easy as that as it needs to be exposed as exported API so kernel modules are able to use it as well not just compiled in parts of the kernel. It's been implemented already, if you wanna review 984be62eb903c0b487415d4a6c2bf7a034aa81ea you can simply test the whole branch wip/usb-sysctl
implemented and backported to all maintained branches
proc_dointvec_minmax_sysadmin
is currently only declared whenCONFIG_PRINTK
is set as all current vanilla knobs using it also depend onCONFIG_PRINTK
. However currently some hardened patches break withoutCONFIG_PRINTK
set. It doesn't make sense to only declare that function in caseCONFIG_PRINTK
is set, lets make it a sysctl API and export the symbol without requiringCONFIG_PRINTK