I have several questions regarding the handling of procfs
or sysctl
values.
Can a feature be enabled with a missing /proc file?
Does a missing /proc
or sysctl
entry always mean that the option is not enabled on that particular kernel? In other words: Can a feature be enabled or supported by a kernel without a corresponding /proc
entry being available? I assume nobody changed the kernel source in a way to remove the code part that populates /proc
.
If it can - does it default to a specific value?
I'd like to know if /proc
values default to a value if the corresponding proc-File doesn't exist. If for some reason my kernel supports aslr, but /sys/kernel/randomize_va_space
doesn't exist, does that result in aslr being active or not?
Is the behaviour the same for all settings?
Is the behaviour the same for all kernels, versions and features? Or do I have to get this information for each setting individually?
For example:
If /proc/sys/kernel/sysrq
doesn't exist on my machine, does that mean
that the Magic SysRQ feature is not available on my kernel?
that it is available?
that it could be available or not depending on some other option that is unknown to me?
that the specific code for this feature contains a hard-coded default and this setting is different for each feature on the kernel? So if I want to know what value it defaults to, I have to take a look at to code for each feature.
There is good documentation available where I can read about the meaning of the kernel settings. Is there a document that explains the default behavior?