* Re: [PATCH v3] gpiolib: Fix line event handling in syscall compatible mode
[not found] <20200915125816.47148-1-andriy.shevchenko@linux.intel.com>
@ 2020-09-17 7:59 ` Kent Gibson
2020-09-17 10:04 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: Kent Gibson @ 2020-09-17 7:59 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio, Arnd Bergmann
On Tue, Sep 15, 2020 at 03:58:16PM +0300, Andy Shevchenko wrote:
> The introduced line event handling ABI in the commit
>
> 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
>
> missed the fact that 64-bit kernel may serve for 32-bit applications.
> In such case the very first check in the lineevent_read() will fail
> due to alignment differences.
>
> To workaround this introduce lineevent_get_size() helper which returns actual
> size of the structure in user space.
>
> Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Kent Gibson <warthog618@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] gpiolib: Fix line event handling in syscall compatible mode
2020-09-17 7:59 ` [PATCH v3] gpiolib: Fix line event handling in syscall compatible mode Kent Gibson
@ 2020-09-17 10:04 ` Bartosz Golaszewski
2020-09-29 12:32 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2020-09-17 10:04 UTC (permalink / raw)
To: Kent Gibson; +Cc: Andy Shevchenko, Linus Walleij, linux-gpio, Arnd Bergmann
On Thu, Sep 17, 2020 at 9:59 AM Kent Gibson <warthog618@gmail.com> wrote:
>
> On Tue, Sep 15, 2020 at 03:58:16PM +0300, Andy Shevchenko wrote:
> > The introduced line event handling ABI in the commit
> >
> > 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
> >
> > missed the fact that 64-bit kernel may serve for 32-bit applications.
> > In such case the very first check in the lineevent_read() will fail
> > due to alignment differences.
> >
> > To workaround this introduce lineevent_get_size() helper which returns actual
> > size of the structure in user space.
> >
> > Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
> > Suggested-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> Tested-by: Kent Gibson <warthog618@gmail.com>
>
Patch applied, thanks everyone for the patch and QA!
Bartosz
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] gpiolib: Fix line event handling in syscall compatible mode
2020-09-17 10:04 ` Bartosz Golaszewski
@ 2020-09-29 12:32 ` Linus Walleij
0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-09-29 12:32 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Kent Gibson, Andy Shevchenko, linux-gpio, Arnd Bergmann
On Thu, Sep 17, 2020 at 12:04 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
> On Thu, Sep 17, 2020 at 9:59 AM Kent Gibson <warthog618@gmail.com> wrote:
> > On Tue, Sep 15, 2020 at 03:58:16PM +0300, Andy Shevchenko wrote:
> > > The introduced line event handling ABI in the commit
> > >
> > > 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
> > >
> > > missed the fact that 64-bit kernel may serve for 32-bit applications.
> > > In such case the very first check in the lineevent_read() will fail
> > > due to alignment differences.
> > >
> > > To workaround this introduce lineevent_get_size() helper which returns actual
> > > size of the structure in user space.
> > >
> > > Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
> > > Suggested-by: Arnd Bergmann <arnd@arndb.de>
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Tested-by: Kent Gibson <warthog618@gmail.com>
>
> Patch applied, thanks everyone for the patch and QA!
I'm also very happy for this fixup even though I didn't even comment
a single time, thanks so much folks! This is community at its best.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-29 12:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200915125816.47148-1-andriy.shevchenko@linux.intel.com>
2020-09-17 7:59 ` [PATCH v3] gpiolib: Fix line event handling in syscall compatible mode Kent Gibson
2020-09-17 10:04 ` Bartosz Golaszewski
2020-09-29 12:32 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).