RE: [PATCH] can: ucan: fix alignment constraints

2021-02-09 Thread David Laight
From: Marc Kleine-Budde > Sent: 09 February 2021 11:28 > > On 09.02.2021 10:34:42, David Laight wrote: ... > > AFAICT there is one structure that would have end-padding. > > But I didn't actually spot anything validating it's length. > > Which may well mean that it is possible to read off the end

Re: [PATCH] can: ucan: fix alignment constraints

2021-02-09 Thread Marc Kleine-Budde
On 09.02.2021 10:34:42, David Laight wrote: > From: Marc Kleine-Budde > > Sent: 08 February 2021 13:16 > > > > On 04.02.2021 17:26:13, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > struct ucan_message_in contains member with 4-byte alignment > > > but is itself marked as unaligned, w

RE: [PATCH] can: ucan: fix alignment constraints

2021-02-09 Thread David Laight
From: Marc Kleine-Budde > Sent: 08 February 2021 13:16 > > On 04.02.2021 17:26:13, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > struct ucan_message_in contains member with 4-byte alignment > > but is itself marked as unaligned, which triggers a warning: > > > > drivers/net/can/usb/ucan.c:

Re: [PATCH] can: ucan: fix alignment constraints

2021-02-08 Thread Marc Kleine-Budde
On 04.02.2021 17:26:13, Arnd Bergmann wrote: > From: Arnd Bergmann > > struct ucan_message_in contains member with 4-byte alignment > but is itself marked as unaligned, which triggers a warning: > > drivers/net/can/usb/ucan.c:249:1: warning: alignment 1 of 'struct > ucan_message_in' is less tha