lkml.org 
[lkml]   [2022]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] bpf: core: Fix the call ins's offset s32 -> s16 truncation
On Fri, Jan 7, 2022 at 9:11 PM Yichun Zhang (agentzh)
<yichun@openresty.com> wrote:
>
> The BPF interpreter always truncates the BPF CALL instruction's 32-bit
> jump offset to 16-bit. Large BPF programs run by the interpreter often
> hit this issue and result in weird behaviors when jumping to the wrong
> destination instructions.
>
> The BPF JIT compiler does not have this bug.
>
> Fixes: 1ea47e01ad6ea ("bpf: add support for bpf_call to interpreter")
> Signed-off-by: Yichun Zhang (agentzh) <yichun@openresty.com>

Acked-by: Song Liu <songliubraving@fb.com>

\
 
 \ /
  Last update: 2022-01-10 23:23    [W:0.066 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site