Hi, On Wed, 2021-04-14 at 12:29 +0200, Hans de Goede wrote: > On 4/14/21 11:52 AM, Benjamin Berg wrote: > > [SNIP] > > > > That said, the g-s-d event handler is checking the size of the read > > against the struct size. This is obviously wrong, it should only > > check > > that the read was successful (or check for >= V1 size). > > Right this is what I was referring to a g-s-d compiled against the > new headers with a struct size of 9 will read 8 bytes on an old > kernel > and that will fail the len check, so it won't work. > > But this will actually never happen as I just noticed that g-s-d > uses a private rfkill.h copy with the old 8 bytes struct definition. > > So with the buffered-io disabled everything should work fine, > see my other email in this thread. OK, so at least that part of the fix should be backported to older release branches. > We should probably still fix / clean the code a bit though, as > you are working on in: > > https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/234 Yeah, the code there is somewhat messy overall. It could probably be improved more than the MR does, but hopefully at least the biggest inconsistencies are gone now. Benjamin
Attachment:
signature.asc
Description: This is a digitally signed message part