Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-19 Thread Johannes Berg
On Thu, 2021-03-18 at 12:16 +0100, Johannes Berg wrote: > > Yeah, that's a dilemma. An oft-seen trick is to add more bytes for > > the future use, e.g. extend to 16 bytes and fill 0 for the remaining. > > Yeah, I guess I could stick a reserved[15] there, it's small enough. Actually, that doesn't

Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Johannes Berg
On Thu, 2021-03-18 at 12:11 +0100, Takashi Iwai wrote: > > That said, we can "fix" this like this, and hope we'll not get this > > again? And if we do get it again ... well, we keep renaming the structs > > and add "struct rfkill_event_v3" next time? > > Yeah, that's a dilemma. An oft-seen trick

Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Takashi Iwai
On Thu, 18 Mar 2021 11:50:37 +0100, Johannes Berg wrote: > > Hi, > > > OK, I took a deeper look again, and actually there are two issues in > > systemd-rfkill code: > > > > * It expects 8 bytes returned from read while it reads a struct > >   rfkill_event record. If the code is rebuilt with the

Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Johannes Berg
Hi, > OK, I took a deeper look again, and actually there are two issues in > systemd-rfkill code: > > * It expects 8 bytes returned from read while it reads a struct >   rfkill_event record. If the code is rebuilt with the latest kernel >   headers, it breaks due to the change of rfkill_event.

Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Takashi Iwai
On Thu, 18 Mar 2021 10:36:19 +0100, Johannes Berg wrote: > > Hi Takashi, > > Oh yay :-( > > > we've received a bug report about rfkill change that was introduced in > > 5.11. While the systemd-rfkill expects the same size of both read and > > write, the kernel rfkill write cuts off to the old 8

Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Johannes Berg
Hi Takashi, Oh yay :-( > we've received a bug report about rfkill change that was introduced in > 5.11. While the systemd-rfkill expects the same size of both read and > write, the kernel rfkill write cuts off to the old 8 bytes while read > gives 9 bytes, hence it leads the error: >   https://g

Re: systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Emmanuel Grumbach
Hi, On Thu, Mar 18, 2021 at 10:31 AM Takashi Iwai wrote: > > Hi, > > we've received a bug report about rfkill change that was introduced in > 5.11. While the systemd-rfkill expects the same size of both read and > write, the kernel rfkill write cuts off to the old 8 bytes while read > gives 9 by

systemd-rfkill regression on 5.11 and later kernels

2021-03-18 Thread Takashi Iwai
Hi, we've received a bug report about rfkill change that was introduced in 5.11. While the systemd-rfkill expects the same size of both read and write, the kernel rfkill write cuts off to the old 8 bytes while read gives 9 bytes, hence it leads the error: https://github.com/systemd/systemd/issu