Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626675

Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL

From Matthias Kaehlcke <mka@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL
Date 2017-04-19 20:20 +0200
Message-ID <ty2mS-6JR-15@gated-at.bofh.it> (permalink)
References <tsB3Y-8pK-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


El Tue, Apr 04, 2017 at 11:07:20AM -0700 Matthias Kaehlcke ha dit:

> From: Mark Charlebois <charlebm@gmail.com>
> 
> cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a
> warning about an overflow in XFORM.
> 
> From: Mark Charlebois <charlebm@gmail.com>
> Signed-off-by: Mark Charlebois <charlebm@gmail.com>
> Signed-off-by: Behan Webster <behanw@converseincode.com>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Resending https://patchwork.kernel.org/patch/4961631/
> 
>  fs/compat_ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
> index 11d087b2b28e..6116d5275a3e 100644
> --- a/fs/compat_ioctl.c
> +++ b/fs/compat_ioctl.c
> @@ -833,7 +833,7 @@ static int compat_ioctl_preallocate(struct file *file,
>   */
>  #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff)
>  
> -#define COMPATIBLE_IOCTL(cmd) XFORM(cmd),
> +#define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd),
>  /* ioctl should not be warned about even if it's not implemented.
>     Valid reasons to use this:
>     - It is implemented with ->compat_ioctl on some device, but programs

Ping, any feedback on this change?

Thanks

Matthias

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Matthias Kaehlcke <mka@chromium.org> - 2017-04-19 20:20 +0200
  Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Arnd Bergmann <arnd@arndb.de> - 2017-04-19 22:50 +0200
    Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Matthias Kaehlcke <mka@chromium.org> - 2017-04-19 23:40 +0200
      Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Arnd Bergmann <arnd@arndb.de> - 2017-04-20 10:50 +0200
        Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Matthias Kaehlcke <mka@chromium.org> - 2017-04-20 22:00 +0200

csiph-web