]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:32:54 +0000 (09:32 +0200)
commitbae2f2dad46a73bc8dce6b5a5d044dd4b2ebf4c8
tree8d0b70f678b14889db2f53694ee02e7ca4a525fd
parent7e94f886abe6aed9ca2d3dace86af44a0167b1f8
s390/bpf: Maintain 8-byte stack alignment

[ Upstream commit effe5be17706167ee968fa28afe40dec9c6f71db ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/net/bpf_jit_comp.c