Skip to content

docs: bpf: add minimal markup to address doc warning - #649

Closed
kernel-patches-bot wants to merge 2 commits into
bpf-nextfrom
series/416545=>bpf-next
Closed

kernel-patches-bot wants to merge 2 commits into
bpf-nextfrom
series/416545=>bpf-next

Conversation

@kernel-patches-bot

Copy link
Copy Markdown

Pull request for series with
subject: docs: bpf: add minimal markup to address doc warning
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=416545

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

kernel-patches-bot and others added 2 commits January 18, 2021 14:56
Commit 91c960b ("bpf: Rename BPF_XADD and prepare to encode other
atomics in .imm") modified the BPF documentation, but missed some ReST
markup.

Hence, make htmldocs warns on Documentation/networking/filter.rst:1053:

  WARNING: Inline emphasis start-string without end-string.

Add some minimal markup to address this warning.

Signed-off-by: Lukas Bulwahn <[email protected]>
Acked-By: Brendan Jackman <[email protected]>
@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot
kernel-patches-bot deleted the series/416545=>bpf-next branch January 18, 2021 23:15
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 16, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 16, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 17, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 17, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 18, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 19, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 19, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Sep 19, 2026
Add BPF selftests to cover what a BPF program may and may not hand
to bpf_inode_init_xattr() as the inode_init_security hook's args.

  # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_lsm_init_xattr
  [...]
  #649/1   verifier_lsm_init_xattr/reject_count_write:OK
  #649/2   verifier_lsm_init_xattr/allow_count_read:OK
  #649/3   verifier_lsm_init_xattr/reject_unchecked_xattrs:OK
  #649/4   verifier_lsm_init_xattr/reject_unchecked_qstr:OK
  #649/5   verifier_lsm_init_xattr/allow_spilled_count:OK
  #649/6   verifier_lsm_init_xattr/reject_forged_count:OK
  #649/7   verifier_lsm_init_xattr/reject_stack_count:OK
  #649/8   verifier_lsm_init_xattr/reject_other_ctx_arg:OK
  #649/9   verifier_lsm_init_xattr/reject_null_count:OK
  #649/10  verifier_lsm_init_xattr/reject_shifted_count:OK
  #649/11  verifier_lsm_init_xattr/reject_var_shifted_count:OK
  #649/12  verifier_lsm_init_xattr/reject_ctx_forged_count:OK
  #649/13  verifier_lsm_init_xattr/allow_count_via_subprog:OK
  #649/14  verifier_lsm_init_xattr/reject_shifted_xattrs:OK
  #649/15  verifier_lsm_init_xattr/reject_sleepable:OK
  #649/16  verifier_lsm_init_xattr/reject_lsm_cgroup:OK
  #649/17  verifier_lsm_init_xattr/reject_wrong_hook:OK
  #649     verifier_lsm_init_xattr:OK
  Summary: 1/17 PASSED, 0 SKIPPED, 0/0 FAILED

Co-developed-by: David Windsor <[email protected]>
Signed-off-by: David Windsor <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://patch.msgid.link/[email protected]
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 13, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 14, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 14, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 14, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 17, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 19, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 19, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 19, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 20, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 21, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 24, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 24, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 25, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 26, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 26, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 26, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
kernel-patches-daemon-bpf Bot pushed a commit that referenced this pull request Nov 27, 2026
RFC9669 defines MOVSX, encoded as a register MOV with an offset of 8,
16 or 32, as dst = (s8,s16,s32)src, which the interpreter implements.
The i386 JIT ignores the offset and emits a plain move, so r0 = (s8)r0
with 0x80 returns 128 instead of -128. A verifier-accepted program can
therefore use values outside the range proved by the verifier.

Sign-extend the low 8, 16 or 32 bits of the source. For ALU64, fill the
high word with the sign; for ALU32, zero it unless the verifier inserts
the zero extension.

On an unpatched i386 kernel, a MOVSX test program passed a helper a
length beyond the verifier's bound. It stayed within the bound after
this change.

Found in a follow-up sweep of the JIT sources for instructions that are
selected by the offset field, and by reading the i386 MOV handler.

On i386 under qemu, with test_progs built as a 32-bit binary from the
same tree:

  # ./test_progs -t verifier_movsx,verifier_sdiv,jit_insns \
    -d jit_insns_blinded,'verifier_movsx/*@unpriv' -w 600
  [...]
  #191/28  jit_insns/movsx:OK
  [...]
  #649/1   verifier_movsx/MOV32SX, S8:OK
  #649/3   verifier_movsx/MOV32SX, S16:OK
  #649/5   verifier_movsx/MOV64SX, S8:OK
  #649/7   verifier_movsx/MOV64SX, S16:OK
  [...]
  #649     verifier_movsx:OK
  Summary: 2/172 PASSED, 16 SKIPPED, 1/6 FAILED

Without this change, the five subtests above fail. The six failures
left are jit_insns subtests that fail without the series as well.

Fixes: 8100928 ("bpf: Support new sign-extension mov insns")
Signed-off-by: Nicholas Dudar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants