lkml.org 
[lkml]   [2018]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 01/17] compat_ioctl: add generic_compat_ioctl_ptrarg()
On Sun, Oct 28, 2018 at 6:07 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Thu, Sep 13, 2018 at 12:29:02PM +0200, Arnd Bergmann wrote:
>
> > I was hoping that the _ptrarg suffix gives enough warning here,
> > but maybe not. I was careful to only use it in cases that I
> > checked are safe, either using only pointer arguments, or
> > no arguments.
> >
> > What we might do for further clarification (besides adding a
> > comment next to the declaration), would be to add a
> > complementary generic_compat_ioctl_intarg() that skips
> > the compat_ptr(). There are only a handful of drivers that
> > would use this though.
>
> ... and the next Monday zeniv went down until the end of September,
> so I'd missed any resends that might've happened in that window.
>
> It's _probably_ too late for this cycle, but let's deal with that
> thing properly for the next one.

Right, I don't think we're in a hurry, so I'll rebase my patches
once -rc1 is out and send you the new version.

> A couple of comments from rereading the thread:
> * generic_compat_ioctl_fthagn^H^H^H^H^H^Hptrarg should not
> be EXPORT_SYMBOL_GPL(). I'm sorry, but this is beyond ridiculous -
> "call native ioctl, with the last argument interpreted as an address
> from 32bit process POV and converted to 64bit equivalent" should
> not be copyrightable at all, and there's really only one natural
> way to express that. Use EXPORT_SYMBOL().

Sure, I didn't really give this much thought.

> And I'd consider names
> like compat_ptr_ioctl() - easier to type and less opaque...

Good idea.

> * rtc patch makes RTC_IRQP_SET32 et.al. accepted by 64bit
> syscall. Which is a behaviour change that might or might not be
> OK, but it needs to be clearly stated.

Yes. I was aware of the change in behavior and have done similar
changes for simplicity on y2038 ioctl patches in the past, but
you are right that this should be mentioned in the changelog.

Arnd

\
 
 \ /
  Last update: 2018-10-29 10:51    [W:0.075 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site