linux/kernel
Maciej Fijalkowski 3a8d86d8da bpf: Limit caller's stack depth 256 for subprogs with tailcalls
[ Upstream commit 7f6e4312e1 ]

Protect against potential stack overflow that might happen when bpf2bpf
calls get combined with tailcalls. Limit the caller's stack depth for
such case down to 256 so that the worst case scenario would result in 8k
stack size (32 which is tailcall limit * 256 = 8k).

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:58:06 +01:00
..
bpf bpf: Limit caller's stack depth 256 for subprogs with tailcalls 2020-10-29 09:58:06 +01:00
cgroup cgroup: fix cgroup_sk_alloc() for sk_clone_lock() 2020-07-22 09:32:49 +02:00
configs
debug kdb: Fix pager search for multi-line strings 2020-10-29 09:57:51 +01:00
dma
events perf: Fix task_function_call() error handling 2020-10-14 10:33:05 +02:00
gcov gcov: add support for GCC 10.1 2020-09-17 13:47:56 +02:00
irq genirq/matrix: Deal with the sillyness of for_each_cpu() on UP 2020-09-03 11:27:06 +02:00
livepatch
locking locking/lockdep: Decrement IRQ context counters when removing lock chain 2020-10-01 13:17:33 +02:00
power PM: hibernate: remove the bogus call to get_gendisk() in software_resume() 2020-10-29 09:58:04 +01:00
printk printk: handle blank console arguments passed in. 2020-10-01 13:18:04 +02:00
rcu
sched sched/features: Fix !CONFIG_JUMP_LABEL case 2020-10-29 09:58:00 +01:00
time timekeeping: Prevent 32bit truncation in scale64_check_overflow() 2020-10-01 13:17:38 +02:00
trace tracing: Make the space reserved for the pid wider 2020-10-07 08:01:27 +02:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
Makefile kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() 2020-10-01 13:17:10 +02:00
acct.c
async.c
audit.c
audit.h
audit_fsnotify.c
audit_tree.c
audit_watch.c audit: CONFIG_CHANGE don't log internal bookkeeping as an event 2020-10-01 13:17:32 +02:00
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
compat.c
configs.c
context_tracking.c
cpu.c
cpu_pm.c
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c
extable.c
fail_function.c
fork.c mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary 2020-10-29 09:57:45 +01:00
freezer.c
futex.c
gen_kheaders.sh kbuild: add variables for compression tools 2020-09-03 11:27:10 +02:00
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c kallsyms: Refactor kallsyms_show_value() to take cred 2020-07-16 08:16:44 +02:00
kcmp.c kernel/kcmp.c: Use new infrastructure to fix deadlocks in execve 2020-10-01 13:17:48 +02:00
kcov.c
kexec.c
kexec_core.c
kexec_elf.c
kexec_file.c
kexec_internal.h
kheaders.c
kmod.c
kprobes.c kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE 2020-10-01 13:18:25 +02:00
ksysfs.c
kthread.c kthread: Do not preempt current task if it is going to call schedule() 2020-08-26 10:40:53 +02:00
latencytop.c
module-internal.h
module.c module: statically initialize init section freeing data 2020-10-29 09:57:55 +01:00
module_signature.c
module_signing.c
notifier.c kernel/notifier.c: intercept duplicate registrations to avoid infinite loops 2020-10-01 13:17:23 +02:00
nsproxy.c
padata.c
panic.c
params.c
pid.c
pid_namespace.c
profile.c
ptrace.c
range.c
reboot.c
relay.c kernel/relay.c: fix memleak on destroy relay channel 2020-08-26 10:40:51 +02:00
resource.c
rseq.c
seccomp.c seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID 2020-08-19 08:15:58 +02:00
signal.c
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
stop_machine.c
sys.c kernel/sys.c: avoid copying possible padding bytes in copy_to_user 2020-10-01 13:17:23 +02:00
sys_ni.c
sysctl-test.c kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() 2020-10-01 13:17:10 +02:00
sysctl.c
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c usermodehelper: reset umask to default before executing user process 2020-10-14 10:32:58 +02:00
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c
watchdog_hld.c
workqueue.c workqueue: Remove the warning in wq_worker_sleeping() 2020-10-01 13:17:54 +02:00
workqueue_internal.h