[PATCH v2 1/2] smb: client: let enum smb_eio_trace grow past 128 entries
From: Bryam Vargas via B4 Relay
Date: Thu Aug 20 2026 - 22:25:32 EST
From: Bryam Vargas <hexlabsecurity@xxxxxxxxx>
enum smb_eio_trace is __mode(byte) and the list has held exactly 128
entries since it was added, so the last sits at index 127 and a 129th has
no representable value. clang gives the enum a signed underlying type and
converts the overflowing value to -128; x86_64 defconfig turns that into a
build failure because it sets CONFIG_WERROR=y, and where it does not, the
value stops matching the __print_symbolic() table and those events print a
raw number. gcc picks an unsigned underlying type and reports nothing.
Drop the attribute. On x86_64 the record does not grow: the field
precedes an unsigned long at offset 8 of struct trace_event_raw_smb3_eio,
so sizeof() stays 32 either way.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202607290344.fvDmgRPA-lkp@xxxxxxxxx/
Fixes: f80ac7eda1cf ("cifs: Add a tracepoint to log EIO errors")
Cc: stable@xxxxxxxxxx
Signed-off-by: Bryam Vargas <hexlabsecurity@xxxxxxxxx>
---
fs/smb/client/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/client/trace.h b/fs/smb/client/trace.h
index 5b21ad3c15fb..0a91d3aaa079 100644
--- a/fs/smb/client/trace.h
+++ b/fs/smb/client/trace.h
@@ -213,7 +213,7 @@
#define EM(a, b) a,
#define E_(a, b) a
-enum smb_eio_trace { smb_eio_traces } __mode(byte);
+enum smb_eio_trace { smb_eio_traces };
enum smb3_rw_credits_trace { smb3_rw_credits_traces } __mode(byte);
enum smb3_tcon_ref_trace { smb3_tcon_ref_traces } __mode(byte);
--
2.55.0