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
CoredumpFilter= #15332
CoredumpFilter= #15332
Conversation
if (v >= 0) { | ||
m |= 1 << v; | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't there be a syntax with "~" to remove some bits from the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could, but frankly, I'd prefer not to implement this just in case somebody might want it some day. I think this whole filter is a very fringe thing, and it's trivial to simply list the mask you want in full.
#define COREDUMP_FILTER_MASK_DEFAULT (1u << COREDUMP_FILTER_PRIVATE_ANONYMOUS | \ | ||
1u << COREDUMP_FILTER_SHARED_ANONYMOUS | \ | ||
1u << COREDUMP_FILTER_ELF_HEADERS | \ | ||
1u << COREDUMP_FILTER_PRIVATE_HUGE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd probably define COREDUMP_FILTER_TO_MASK() which does the shifting. Just to make this more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a shift... I think the mask would make this painfully verbose and not really clearer. (And there's two places where this would be used, so I don't think it's worth it.)
Updated with the requested changes, except where commented above. I also added on more tiny commit to add debug logging when oom_score_adj cannot be parsed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor suggestion, looks good otherwise
No description provided.