Skip to content
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

Make udev rules more robust #78

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DemiMarie
Copy link

This makes the udev rules more robust against various unsafe error conditions.

If there is an I/O error on stdout or stderr, return a non-zero status
so that udev can avoid trusting the values printed.
If the output of `dmsetup splitname` cannot be trusted, the safest
option is to disable all lvm2 rules.
In this cased the safest option is to disable most udev rules.
All kernels Qubes OS uses are new enough to have the dm/ subdirectory.
@zkabelac
Copy link

zkabelac commented Apr 4, 2022

Note - github is not 'primary' git source for lvm2 codebase - it's a some mirrored copy.
Official git sourcedode is at sourceware.org/git/lvm2.git

For best review is better to actually post patches on [email protected].

Some initial comment - we can't accept 'dmsetup' version - we rather want to have fixed those code paths giving wrong result - in some cases some code unfortunatelly does not correctly uses log_error or log_debug - thus giving 'error' result purely based on usage is these functions is invalid.

2nd. can be considered - although splitname should never fail - if it does - system is already in seriously deeper troubles..

3rd. cookie is always there - unless you use non-linux kernel with these rules - but rule can be considered for safety.

4th. not acceptable as we do try to keep things working even with limited functionality
(our oldest still tested & supported kernel version is 2.6.18 RHEL5 distro)

@DemiMarie
Copy link
Author

Some initial comment - we can't accept 'dmsetup' version - we rather want to have fixed those code paths giving wrong result - in some cases some code unfortunatelly does not correctly uses log_error or log_debug - thus giving 'error' result purely based on usage is these functions is invalid.

Can you explain? This is purely about fixing dmsetup SOMETHING > /dev/full. I don’t see what dmsetup internal logging has to do with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants