android_kernel_oneplus_msm8998/samples
Chang-Hsien Tsai cf37c80bc9 samples, bpf: fix to change the buffer size for read()
[ Upstream commit f7c2d64bac1be2ff32f8e4f500c6e5429c1003e0 ]

If the trace for read is larger than 4096, the return
value sz will be 4096. This results in off-by-one error
on buf:

    static char buf[4096];
    ssize_t sz;

    sz = read(trace_fd, buf, sizeof(buf));
    if (sz > 0) {
        buf[sz] = 0;
        puts(buf);
    }

Signed-off-by: Chang-Hsien Tsai <luke.tw@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-21 09:07:06 +02:00
..
bpf samples, bpf: fix to change the buffer size for read() 2019-07-21 09:07:06 +02:00
configfs configfs: remove old API 2015-10-13 22:17:57 -07:00
hidraw
hw_breakpoint
kdb
kfifo
kobject
kprobes kprobes: use _do_fork() in samples to make them work again 2015-10-01 21:42:35 -04:00
livepatch
mic/mpssd samples: move mic/mpssd example code from Documentation 2017-03-12 06:37:23 +01:00
pktgen pktgen: add benchmark script pktgen_bench_xmit_mode_netif_receive.sh 2015-05-22 23:59:17 -04:00
rpmsg
seccomp samples/seccomp: fix 64-bit comparison macros 2017-03-12 06:37:27 +01:00
trace_events Fix tracing sample code warning. 2017-11-08 10:06:28 +01:00
uhid
Kconfig configfs: remove old API 2015-10-13 22:17:57 -07:00
Makefile configfs: remove old API 2015-10-13 22:17:57 -07:00