FAILED: patch "[PATCH] tracing/synthetic: Use union instead of casts" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x ddeea494a16f32522bce16ee65f191d05d4b8282
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023082627-celibacy-uncoiled-9fae@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
ddeea494a16f ("tracing/synthetic: Use union instead of casts")116b41162f8b ("Merge tag 'probes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ddeea494a16f32522bce16ee65f191d05d4b8282 Mon Sep 17 00:00:00 2001
From: Sven Schnelle <[email protected]>
Date: Wed, 16 Aug 2023 17:49:26 +0200
Subject: [PATCH] tracing/synthetic: Use union instead of casts
The current code uses a lot of casts to access the fields member in struct synth_trace_events with different sizes. This makes the code hard to read, and had already introduced an endianness bug. Use a union and struct instead.
include/linux/trace_events.h +11 -0
@@ -59,6 +59,17 @@ int trace_raw_output_prep(struct trace_iterator *iter, extern __printf(2, 3) void trace_event_printf(struct trace_iterator *iter, const char *fmt, ...); +/* Used to find the offset and length of dynamic fields in trace events */ +struct trace_dynamic_info { +#ifdef CONFIG_CPU_BIG_ENDIAN + u16 offset; + u16 len; +#else + u16 len; + u16 offset; +#endif +}; + /* * The trace entry - the most basic unit of tracing. This is what * is printed in the end as a single line in the trace output, such as:
kernel/trace/trace.h +8 -0
@@ -1295,6 +1295,14 @@ static inline void trace_branch_disable(void)/* set ring buffers to default size if not already done so */ int tracing_update_buffers (void ); +union trace_synth_field { +u8 as_u8; +u16 as_u16; +u32 as_u32; +u64 as_u64; +struct trace_dynamic_info as_dynamic; +}; +struct ftrace_event_field {struct list_head link;const char *name;
kernel/trace/trace_events_synth.c +37 -50
223 lines not on this page · raw message