]> git.baikalelectronics.ru Git - kernel.git/commit
bpf:bpf_seq_printf(): handle potentially unsafe format string better
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 9 Jun 2020 04:34:37 +0000 (21:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jun 2020 16:39:15 +0000 (09:39 -0700)
commit0870de0ebff136391b7a21fa8a10f96a279d43cb
treee26e0819136938ad4733986ad9908c062def2a61
parentbacaa592cf7332847f49e3c9af892acd8762fdc6
bpf:bpf_seq_printf(): handle potentially unsafe format string better

User the proper helper for kernel or userspace addresses based on
TASK_SIZE instead of the dangerous strncpy_from_unsafe function.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/trace/bpf_trace.c