feat: disable /dev/mem kernel strictness#6
Open
RiSKeD wants to merge 1 commit into
Open
Conversation
Signed-off-by: Fabian Wienand <fabian.wienand@9elements.com>
There was a problem hiding this comment.
Pull request overview
This PR disables kernel-level /dev/mem restrictions to enable low-level hardware access required for firmware testing. While the change aligns with the repository's purpose as a firmware testing base image, it introduces security considerations that should be carefully documented.
- Disables
STRICT_DEVMEMandIO_STRICT_DEVMEMkernel config options to allow unrestricted/dev/memaccess - Adds
ignoreConfigErrors = trueto suppress kernel configuration validation errors
Comments suppressed due to low confidence (1)
modules/kernel.nix:60
- Disabling
STRICT_DEVMEMandIO_STRICT_DEVMEMremoves important security protections by allowing unrestricted access to physical memory via/dev/mem. While this may be necessary for firmware testing tools, this security-sensitive change should be documented in the README.md.
Consider adding a security notice in the README similar to the existing SSH access warning, explaining:
- What
/dev/memrestrictions are being disabled - Why this is needed for firmware testing
- The security implications
- That images should only be used in isolated/controlled environments
This helps users understand the security posture of the images they're building.
structuredExtraConfig = with lib.kernel; {
# Disable /dev/mem restrictions for firmware testing
STRICT_DEVMEM = no;
IO_STRICT_DEVMEM = no;
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.