From: Benjamin Berg <bberg@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>,
Johannes Berg <johannes@sipsolutions.net>,
"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: "rfkill: add a reason to the HW rfkill state" breaks userspace
Date: Wed, 14 Apr 2021 12:46:07 +0200 [thread overview]
Message-ID: <e9e7425cf7bbbf20f0dac74e222d28f747216804.camel@redhat.com> (raw)
In-Reply-To: <b3273466-7978-241f-9773-56cd87490a9b@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-04-14 10:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 20:31 "rfkill: add a reason to the HW rfkill state" breaks userspace Hans de Goede
2021-04-14 5:12 ` Grumbach, Emmanuel
2021-04-14 7:07 ` Johannes Berg
2021-04-14 8:17 ` Hans de Goede
2021-04-14 9:47 ` Johannes Berg
2021-04-14 10:22 ` Hans de Goede
2021-04-14 9:52 ` Benjamin Berg
2021-04-14 10:29 ` Hans de Goede
2021-04-14 10:46 ` Benjamin Berg [this message]
2021-04-14 11:17 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9e7425cf7bbbf20f0dac74e222d28f747216804.camel@redhat.com \
--to=bberg@redhat.com \
--cc=emmanuel.grumbach@intel.com \
--cc=hdegoede@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox