-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redundant kernel args #199
Comments
Saving space in kernel command line, reducing command line options, avoiding redundancy would be good. We might comment these options out and document that inside the settings file instead out deleting these to avoid having this topic come up again. Waiting a few days before I look into this and welcoming other comments or review. |
Quoting from the documentation. So the man is right. Might as well be less redundant. |
Yes this can be done if desired. Note this situation was discussed earlier in Issue #177 (comment). The primary reason the redundant kernel parameters were kept in place was for potential future proofing. If the default However, the concern regarding limited number of characters for kernel arguments was not considered by me. So, if this is a genuine concern, we can easily remove the parameters. Perhaps instead of removing the lines entirely just comment them out so users can verify the correct mitigations are in place if required. |
Should I add a note explicitly saying that these are redundant? |
Yes. That would be nice so anyone else looking into this knows it and no need to rehash this discussion. Always good that way. |
As a rough example, one way to highlight a downside of not using fine-grained settings can be shown with the Upon closer inspection, one potential limitation regarding solely using If you look closely at the kernel parameters:
Now if you focus on the L1 Terminal Fault (L1TF) mitigation parameter:
Notice how the more 'secure' option is using Overall, unless we are in actual need of additional characters, I think for the time being we should leave the kernel arguments as they are without modification. Maybe consider closing PR #200 and potentially reopening it at future date if required. |
Well the current default is |
Personally, I think outsourcing responsibility to You still have not addressed this:
One could make a strong case that mitigating against CPU vulnerabilities is one of the most important features of a 'hardening' project. Currently, we have the best of both worlds, Unless we are currently in need for more characters for kernel arguments, I do not see opening up this potential exposure is necessary? |
Well on this point, we are supposed to check what the kernel does as time goes on anyways.
Another point is that it makes management easier. Having a gigantic list of kargs does make it more painful to deal with when you need to do debugging and stuff. I did have a quick talk with Madaidan yesterday and he just said he personally isn't sure if the whole hard coding kargs matters that much. |
Personally, I am not a fan of putting additional burden on volunteer contributors when it can be avoided. I would much rather implement a through general solution that is robust moving forward in time, as opposed to a very acceptable solution that requires somewhat constant vigilance.
I overall very strongly agree with everything you stated in this point. In fact, I don’t think it is possible for anyone to actually disagree with this point. Overall, in light of all of the above discussion, I will leave it to @adrelanos to decide what approach he considers superior. |
Useful would be a feature request against the kernel: If such a feature were to exist, then no such work downstream in security-misc would be needed. Lower maintenance effort is preferable.
This for sure is actionable. I wouldn't mind more comments saying "this options may be superfluous because...". Or 1 longer comment explaining this and then just a tag "## potentially-superfluous". Then as a follow-up step the potentially superfluous kernel parameters could even be moved to a separate file. Thereby making it easier for those concerned or impacted by the length of the kernel command line to easily delete these. |
According to the kernel's documentation:
auto,nosmt:
Mitigate all CPU vulnerabilities, disabling SMT if needed. This is for users who always want to be fully mitigated, even if it means losing SMT. Equivalent to:
Why are these other args being explicitly set in
/etc/default/grub.d
if mitigations=auto,nosmt is already being set?There is a limit on number of characters that can be in the kernel args as well, and the kernel args we set will just get longer and longer over time. I don't think it is a good idea to waste the precious characters on these redundant args. Either we use
mitigations=auto,nosmt
(which should be the default anyways), or explicitly spell out which args to set so the user can easily customize them. There is really no reason to have both.The text was updated successfully, but these errors were encountered: