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


Groups > linux.kernel > #1485417

Re: Runtime failure running sh:qemu in -next due to 'sh: fix copy_from_user()'

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: Runtime failure running sh:qemu in -next due to 'sh: fix copy_from_user()'
Date 2016-09-17 01:10 +0200
Message-ID <siaqB-2Wo-5@gated-at.bofh.it> (permalink)
References <si6Q2-uW-19@gated-at.bofh.it> <si7j4-FB-31@gated-at.bofh.it> <si8oO-1p6-21@gated-at.bofh.it> <si91v-1Sg-1@gated-at.bofh.it> <sia7g-2Am-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 16, 2016 at 03:47:04PM -0700, Guenter Roeck wrote:

> Adding pr_info() just before the "if (unlikely..." fixes the problem.
> 
> Commenting out the "if (unlikely())" code fixes the problem. 
> 
> Using a new variable "unsigned long x" for the return code instead of
> re-using __copy_size fixes the problem.
> 
> Replacing "return __copy_size;" with "return __copy_size & 0xffffffff;"
> fixes the problem.
> 
> The problem only seems to be seen if the copy size length is odd (more
> specifically, the failing copy always has a length of 25 bytes).
> 
> No idea what is going on. Bug in __copy_user() ? Compiler bug ?

Definitely a compiler bug.  __kernel_size_t is 32 bits on sh; that & 0xffffffff
should've been optimized away, for crying out loud!

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


Thread

Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-16 21:20 +0200
  Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-16 21:50 +0200
    Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-16 23:00 +0200
      Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-16 23:40 +0200
        Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Rich Felker <dalias@libc.org> - 2016-09-16 23:50 +0200
          Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-17 00:50 +0200
            Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Rich Felker <dalias@libc.org> - 2016-09-17 01:40 +0200
              Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-17 04:30 +0200
              Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-17 04:30 +0200
                Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Rob Landley <rob@landley.net> - 2016-09-18 06:50 +0200
                Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Rich Felker <dalias@libc.org> - 2016-09-18 17:20 +0200
        Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-17 00:50 +0200
          Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-17 01:10 +0200
  Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-16 22:10 +0200
    Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Guenter Roeck <linux@roeck-us.net> - 2016-09-16 22:40 +0200
      Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' lsorense@csclub.uwaterloo.ca (Lennart Sorensen) - 2016-09-16 22:50 +0200
      Re: Runtime failure running sh:qemu in -next due to 'sh: fix  copy_from_user()' Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-16 23:30 +0200

csiph-web