Conversation

This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
Replying to and
I don't think there's a safe in-process way to safely detect the patch, so unfortunately disabling features depending on it after fork on older kernels or simply not activating them at all seems like the only viable option. Can't work around it since the patch may be backported.
1
If you assume pkey state is lost on older kernels and set things up again that's going to be broken on kernels with it backported. I asked them to add a no-op flag to pkey_alloc so implementations could tell if pkey state is preserved on fork and handle both but they didn't...
1
My plan is to check for Linux 5.0+ and disable code turning off the feature after fork. It'd be possible to make a table with stable/longterm branches and enable it on those once they're past the point that it was backported upstream. I wish the fix could just be easily detected.
1
I've also run into some VMA merging bugs which I haven't yet reported since I haven't narrowed it down completely. It's mostly a performance issue rather than a correctness / security issue but it's disconcerting that VMA merging code doesn't work properly in fairly simple cases.
1