]> git.baikalelectronics.ru Git - kernel.git/commit
s390/bpf: Maintain 8-byte stack alignment
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 2 Jun 2020 17:43:39 +0000 (19:43 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Jun 2020 19:00:56 +0000 (21:00 +0200)
commit4d7fffbc47d7e640e688c705f546d1a27dd853f8
tree042cec5b556b86838e1dacb94a58268d3396dadc
parente143f0f4503af4fc7f76be38b9c950fe6a8a4b9f
s390/bpf: Maintain 8-byte stack alignment

Certain kernel functions (e.g. get_vtimer/set_vtimer) cause kernel
panic when the stack is not 8-byte aligned. Currently JITed BPF programs
may trigger this by allocating stack frames with non-rounded sizes and
then being interrupted. Fix by using rounded fp->aux->stack_depth.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200602174339.2501066-1-iii@linux.ibm.com
arch/s390/net/bpf_jit_comp.c