OrangePi_CM5/include/trace/events
Chuck Lever 85ee17ca21 SUNRPC: Fix the svc_deferred_event trace class
[ Upstream commit 4d5004451ab2218eab94a30e1841462c9316ba19 ]

Fix a NULL deref crash that occurs when an svc_rqst is deferred
while the sunrpc tracing subsystem is enabled. svc_revisit() sets
dr->xprt to NULL, so it can't be relied upon in the tracepoint to
provide the remote's address.

Unfortunately we can't revert the "svc_deferred_class" hunk in
commit ece200ddd5 ("sunrpc: Save remote presentation address in
svc_xprt for trace events") because there is now a specific check
of event format specifiers for unsafe dereferences. The warning
that check emits is:

  event svc_defer_recv has unsafe dereference of argument 1

A "%pISpc" format specifier with a "struct sockaddr *" is indeed
flagged by this check.

Instead, take the brute-force approach used by the svcrdma_qp_error
tracepoint. Convert the dr::addr field into a presentation address
in the TP_fast_assign() arm of the trace event, and store that as
a string. This fix can be backported to -stable kernels.

In the meantime, commit c6ced22997ad ("tracing: Update print fmt
check to handle new __get_sockaddr() macro") is now in v5.18, so
this wonky fix can be replaced with __sockaddr() and friends
properly during the v5.19 merge window.

Fixes: ece200ddd5 ("sunrpc: Save remote presentation address in svc_xprt for trace events")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:23:11 +02:00
..
9p.h
…
afs.h afs: Fix tracepoint string placement with built-in AFS 2021-07-28 14:35:41 +02:00
alarmtimer.h
…
asoc.h
…
avc.h
…
bcache.h
…
block.h
…
bpf_test_run.h
…
bridge.h
…
btrfs.h btrfs: use own btree inode io_tree owner id 2020-10-07 12:13:22 +02:00
cachefiles.h
…
cgroup.h cgroup: Trace event cgroup id fields should be u64 2022-01-27 10:53:52 +01:00
clk.h
…
cma.h
…
compaction.h
…
context_tracking.h
…
cpuhp.h
…
devfreq.h
…
devlink.h
…
dma_fence.h
…
erofs.h erofs: fix up erofs_lookup tracepoint 2021-09-30 10:11:00 +02:00
ext4.h ext4: fix ext4_fc_stats trace point 2022-04-08 14:39:55 +02:00
f2fs.h f2fs: fix up f2fs_lookup tracepoints 2021-11-26 10:39:12 +01:00
fib.h
…
fib6.h
…
filelock.h
…
filemap.h
…
fs_dax.h
…
fscache.h
…
fsi.h
…
fsi_master_aspeed.h
…
fsi_master_ast_cf.h
…
fsi_master_gpio.h
…
gpio.h
…
gpu_mem.h
…
host1x.h
…
huge_memory.h
…
hwmon.h
…
i2c.h
…
ib_mad.h
…
ib_umad.h
…
initcall.h
…
intel-sst.h
…
intel_iommu.h
…
intel_ish.h
…
io_uring.h
…
iocost.h
…
iommu.h
…
ipi.h
…
irq.h
…
irq_matrix.h
…
iscsi.h
…
jbd2.h
…
kmem.h
…
kvm.h
…
kyber.h
…
libata.h
…
lock.h
…
mce.h
…
mdio.h
…
migrate.h
…
mlxsw.h
…
mmap.h
…
mmc.h
…
mmflags.h
…
module.h
…
napi.h
…
nbd.h
…
neigh.h
…
net.h
…
net_probe_common.h
…
nilfs2.h
…
nmi.h
…
objagg.h
…
oom.h
…
page_isolation.h
…
page_pool.h
…
page_ref.h
…
pagemap.h
…
percpu.h
…
power.h
…
power_cpu_migrate.h
…
preemptirq.h
…
printk.h
…
pwc.h
…
pwm.h
…
qdisc.h
…
qla.h
…
qrtr.h
…
random.h
…
rcu.h
…
rdma.h
…
rdma_core.h
…
regulator.h
…
rpcgss.h
…
rpcrdma.h NFS Client Updates for Linux 5.10 2020-10-20 13:26:30 -07:00
rpm.h
…
rseq.h
…
rtc.h
…
rxrpc.h rxrpc: Fix call timer start racing with call destruction 2022-04-08 14:40:41 +02:00
sched.h sched/debug: Add new tracepoint to track cpu_capacity 2020-10-03 16:30:52 +02:00
scmi.h
…
scsi.h
…
sctp.h
…
signal.h
…
siox.h
…
skb.h
…
smbus.h
…
sock.h
…
spi.h
…
spmi.h
…
sunrpc.h SUNRPC: Fix the svc_deferred_event trace class 2022-04-20 09:23:11 +02:00
sunvnet.h
…
swiotlb.h
…
syscalls.h
…
target.h scsi: target: core: Add CONTROL field for trace events 2020-10-02 18:36:19 -04:00
task.h
…
tcp.h
…
tegra_apb_dma.h
…
thermal.h
…
thermal_power_allocator.h
…
thp.h
…
timer.h
…
tlb.h
…
udp.h
…
ufs.h
…
v4l2.h
…
vb2.h
…
vmscan.h
…
vsock_virtio_transport_common.h
…
wbt.h
…
workqueue.h
…
writeback.h trace: fix potenial dangerous pointer 2020-11-25 13:03:44 +01:00
xdp.h
…
xen.h
…