Re: [PATCH bpf-next v1 0/3] bpf: Do not follow __iomem pointers

From: patchwork-bot+netdevbpf

Date: Tue Dec 01 2026 - 00:20:17 EST


Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:

On Sat, 28 Nov 2026 03:53:14 +0100 you wrote:
> A BPF tracing program can read a device register with a plain field walk,
> for example mdev->common->device_status through a
> struct virtio_pci_common_cfg __iomem *. The load is a PROBE_MEM load of a
> mapped address, so it does not fault and reads the register. Such a read
> can have side effects. This came up in the discussion of [1].
>
> Patch 1 gives __iomem a BTF type tag, as __user, __percpu and __rcu have.
> Patch 2 makes the verifier hand out a scalar for a struct member, function
> argument or return value with that tag, so a program cannot load through
> it. Patch 3 adds selftests.
>
> [...]

Here is the summary with links:
- [bpf-next,v1,1/3] compiler_types: Emit a BTF type tag for __iomem
https://git.kernel.org/bpf/bpf-next/c/b07c1898b0e9
- [bpf-next,v1,2/3] bpf: Treat __iomem pointers as scalars
https://git.kernel.org/bpf/bpf-next/c/c6fec1b3c1ed
- [bpf-next,v1,3/3] selftests/bpf: Test loads through __iomem pointers
https://git.kernel.org/bpf/bpf-next/c/8d958e9e763f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html