From: Arnd Bergmann <arnd@arndb.de>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
y2038 Mailman List <y2038@lists.linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
"David S. Miller" <davem@davemloft.net>,
linux-ppp@vger.kernel.org, Networking <netdev@vger.kernel.org>
Subject: Re: [PATCH v3 04/26] compat_ioctl: move PPPIOCSCOMPRESS32 to ppp-generic.c
Date: Wed, 17 Apr 2019 23:44:38 +0200 [thread overview]
Message-ID: <CAK8P3a2a0yHv6njhwQYRC4YPdec25BdUJLU-sx6GQF9xqB95XA@mail.gmail.com> (raw)
In-Reply-To: <20190417211637.GV2217@ZenIV.linux.org.uk>
On Wed, Apr 17, 2019 at 11:16 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Tue, Apr 16, 2019 at 10:19:42PM +0200, Arnd Bergmann wrote:
> > +#ifdef CONFIG_COMPAT
> > +struct ppp_option_data32 {
> > + compat_caddr_t ptr;
>
> Huh? compat_uptr_t, surely? I realize that compat_ioctl.c is bogus
> that way right now, but let's not spread that crap into the places
> where it's harder to find...
Ok, done.
> > err = -EFAULT;
> > - if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
> > - goto out;
> > +#ifdef CONFIG_COMPAT
> > + if (compat) {
> > + struct ppp_option_data32 data32;
> > +
> > + if (copy_from_user(&data32, (void __user *) arg,
> > + sizeof(data32)))
> > + goto out;
> > +
> > + data.ptr = compat_ptr(data32.ptr);
> > + data.length = data32.length;
> > + data.transmit = data32.transmit;
> > + } else
> > +#endif
> > + {
> > + if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
> > + goto out;
> > + }
>
> *UGH*
>
> Do that in caller, please. And sod the flag argument...
Ack, changed it now.
Arnd
next prev parent reply other threads:[~2019-04-17 21:45 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 20:19 [PATCH v3 00/26] compat_ioctl: cleanups Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 01/26] compat_ioctl: pppoe: fix PPPOEIOCSFWD handling Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 02/26] compat_ioctl: move simple ppp command handling into driver Arnd Bergmann
2019-04-17 21:13 ` Al Viro
2019-04-17 22:03 ` Arnd Bergmann
2019-04-17 23:53 ` Al Viro
2019-04-18 5:57 ` Al Viro
2019-04-18 15:14 ` Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 04/26] compat_ioctl: move PPPIOCSCOMPRESS32 to ppp-generic.c Arnd Bergmann
2019-04-17 21:16 ` Al Viro
2019-04-17 21:44 ` Arnd Bergmann [this message]
2019-04-16 20:19 ` [PATCH v3 05/26] compat_ioctl: move PPPIOCSPASS32/PPPIOCSACTIVE32 to ppp_generic.c Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 06/26] compat_ioctl: handle PPPIOCGIDLE for 64-bit time_t Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl Arnd Bergmann
2019-04-16 20:31 ` Jiri Kosina
2019-04-18 11:10 ` Stefan Hajnoczi
2019-04-19 23:16 ` Michael S. Tsirkin
2019-04-16 20:25 ` [PATCH v3 12/26] compat_ioctl: move more " Arnd Bergmann
2019-04-16 20:25 ` [PATCH v3 15/26] compat_ioctl: move isdn/capi ioctl translation into driver Arnd Bergmann
2019-04-16 20:25 ` [PATCH v3 16/26] compat_ioctl: move rfcomm handlers " Arnd Bergmann
2019-04-16 20:25 ` [PATCH v3 17/26] compat_ioctl: move hci_sock " Arnd Bergmann
2019-04-25 15:21 ` [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl Mauro Carvalho Chehab
2019-04-25 15:32 ` Arnd Bergmann
2019-04-25 15:35 ` Al Viro
2019-04-25 15:53 ` Mauro Carvalho Chehab
2019-04-25 15:55 ` Arnd Bergmann
2019-04-25 16:42 ` Al Viro
2019-04-25 21:25 ` Johannes Berg
2019-04-26 7:46 ` Arnd Bergmann
2019-04-16 22:33 ` [PATCH v3 00/26] compat_ioctl: cleanups Douglas Gilbert
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=CAK8P3a2a0yHv6njhwQYRC4YPdec25BdUJLU-sx6GQF9xqB95XA@mail.gmail.com \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=viro@zeniv.linux.org.uk \
--cc=y2038@lists.linaro.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;
as well as URLs for NNTP newsgroup(s).