Re: [PATCH bpf-next v1 1/3] x86/mm: Resolve BPF exception fixups for user address faults under SMAP

From: Borislav Petkov

Date: Sun Nov 22 2026 - 19:31:07 EST


On Sun, Nov 22, 2026 at 10:59:33PM +0100, Kumar Kartikeya Dwivedi wrote:
> So I am not sure I see how this risks making things worse for anyone
> else. It's not about saving some bytes, if you look at the cover
> letter, we reduce significant amount of code and associated overhead
> from programs running in hot paths.

Lemme summarize our "discussion":

Boris: you're subverting SMAP security.

Kumar: but but, performance. And we're special.

Nope, not good enough.

You need to go back to the drawing board and massage your bpf program until it
doesn't need any hackery like that.

I dunno, tag the pointer, massage it so that it causes a "normal" page fault
like it would happen for any other userspace program, whatever. Just not this.

HTH.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette