Wentao Zhang 8ae537061f samples/bpf: use kprobe and urandom_read_iter
14c174633f34 ("random: remove unused tracepoints") removed all the
tracepoints from drivers/char/random.c, one of which,
random:urandom_read.

1b388e7765f2 ("random: convert to using fops->read_iter()") replaced
kernel function urandom_read with urandom_read_iter.
Therefore, kprobe on urandom_read is not working any more:

Fix breakage by replacing tracepoint with kprobing and replacing
urandom_read with urandom_read_iter.

TEST PLAN:
PASS: build-pkgs -c -p linux
PASS: build-pkgs -c -p linux-rt
PASS: make -j 16 M=samples/bpf
PASS: sudo samples/bpf/test_overhead

Closes-Bug: 1999136

Change-Id: Idac88160050abaa7ebe7098a54792650f2d691cd
Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
2022-12-13 10:39:49 +08:00
..
2022-11-14 19:26:20 -05:00
2022-11-14 19:26:20 -05:00
2022-11-14 19:26:20 -05:00