lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Jul 2015 13:17:18 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Bamvor Zhang Jian <bamvor.zhangjian@...aro.org>
Cc:	Arnd Bergmann <arnd@...db.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	lkml <linux-kernel@...r.kernel.org>,
	y2038 Mailman List <y2038@...ts.linaro.org>
Subject: Re: [RFC PATCH v2 3/4] ppdev: add compat ioctl

On Mon, Jun 29, 2015 at 7:23 AM, Bamvor Zhang Jian
<bamvor.zhangjian@...aro.org> wrote:
> Add compat ioctl in ppdev in order to solve the y2038 issue in
> later patch.
> This patch simply add pp_do_ioctl to compat_ioctl, because I found
> that all the ioctl access the arg as a pointer.
>
> Signed-off-by: Bamvor Zhang Jian <bamvor.zhangjian@...aro.org>
> ---
>  drivers/char/ppdev.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
> index ae0b42b..9207658 100644
> --- a/drivers/char/ppdev.c
> +++ b/drivers/char/ppdev.c
> @@ -69,6 +69,7 @@
>  #include <linux/ppdev.h>
>  #include <linux/mutex.h>
>  #include <linux/uaccess.h>
> +#include <linux/compat.h>
>
>  #define PP_VERSION "ppdev: user-space parallel port driver"
>  #define CHRDEV "ppdev"
> @@ -635,6 +636,11 @@ static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>         return ret;
>  }
>
> +static long pp_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> +{
> +       return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
> +}
> +
>  static int pp_open (struct inode * inode, struct file * file)
>  {
>         unsigned int minor = iminor(inode);
> @@ -744,6 +750,9 @@ static const struct file_operations pp_fops = {
>         .write          = pp_write,
>         .poll           = pp_poll,
>         .unlocked_ioctl = pp_ioctl,
> +#ifdef CONFIG_COMPAT
> +       .compat_ioctl   = pp_compat_ioctl,
> +#endif

Does adding this patch w/o the following patch break 32bit apps using
this on 64bit kernels?

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ