Re: [PATCH v3] eventpoll: Convert epoll_put_uevent() to scoped user access
From: Linus Torvalds
Date: Sat Mar 07 2026 - 18:33:54 EST
On Sat, 7 Mar 2026 at 12:07, Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
>
> Saves two function calls, and one stac/clac pair.
Bah. I'll just apply this directly, because the source code looks
prettier, it generates better code, and it avoids the locally
unchecked user address, so it's arguably "more correct".
Yes, we checked the address range in ep_check_params, so the
previously unchecked user address wasn't buggy, but it's a pattern
we've actively tried to move away from.
Local checks avoid the worry about where the check has been done, and
the ep_check_params() check could now be removed...
Except we can't, because we have that magical ARM case due to the
horrific layout of this struct that then causes issues for the ARM
oabi situation.
So that ARM version of this same function would have to be fixed to
use this model too before we could actually remove the
ep_check_params() check.
Oh well. This makes one little piece of the kernel better, even if
other horrors lurk everywhere...
Linus