[PATCH v2 1/2] smb: client: let enum smb_eio_trace grow past 128 entries
Namjae Jeon
linkinjeon at kernel.org
Fri Aug 21 11:02:31 UTC 2026
On Fri, Aug 21, 2026 at 11:25 AM Bryam Vargas via B4 Relay
<devnull+hexlabsecurity.proton.me at kernel.org> wrote:
>
> From: Bryam Vargas <hexlabsecurity at proton.me>
>
> 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 at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202607290344.fvDmgRPA-lkp@intel.com/
> Fixes: f80ac7eda1cf ("cifs: Add a tracepoint to log EIO errors")
> Cc: stable at kernel.org
> Signed-off-by: Bryam Vargas <hexlabsecurity at proton.me>
> ---
> 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 };
Looks ok. But these patches should be squashed because 0001 patch is
only required to make the new enum added by 0002 patch build
correctly.
Thanks.
More information about the samba-technical
mailing list