From: Stephen Rothwell <hidden> Date: 2016-03-15 06:46:59
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
Caused by commit
150a0b4905f1 ("aio: add support for async openat()")
despite commit
d2f7a973e11e ("aio: don't use __get_user() for 64 bit values")
This is due to a bug in the powerpc __get_user_check() macro (the return
value is defined to be "unsigned long" which is only 32 bits on a 32
bit platform).
I applied the patch below which seems to help (Michael, what do you
think?), but given Al's and Christoph's reactions, I am inclined to
remove the aio tree from tomorrow and maybe it can be revisited after
the merge window.
From: Stephen Rothwell <redacted>
Date: Tue, 15 Mar 2016 16:36:06 +1100
Subject: [PATCH] powerpc: fix get_user for 64 bit typs on 32 bit platforms
solution borrowed from the x86 uaccess.h
Signed-off-by: Stephen Rothwell <redacted>
---
arch/powerpc/include/asm/uaccess.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: Andy Shevchenko <hidden> Date: 2016-03-15 14:38:55
On Tue, Mar 15, 2016 at 8:46 AM, Stephen Rothwell [off-list ref] wrote:
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
avr32 seems affected as well and the below solution is not suitable
(should be much more verbose in asm, I guess).
quoted hunk
Caused by commit
150a0b4905f1 ("aio: add support for async openat()")
despite commit
d2f7a973e11e ("aio: don't use __get_user() for 64 bit values")
This is due to a bug in the powerpc __get_user_check() macro (the return
value is defined to be "unsigned long" which is only 32 bits on a 32
bit platform).
I applied the patch below which seems to help (Michael, what do you
think?), but given Al's and Christoph's reactions, I am inclined to
remove the aio tree from tomorrow and maybe it can be revisited after
the merge window.
From: Stephen Rothwell <redacted>
Date: Tue, 15 Mar 2016 16:36:06 +1100
Subject: [PATCH] powerpc: fix get_user for 64 bit typs on 32 bit platforms
solution borrowed from the x86 uaccess.h
Signed-off-by: Stephen Rothwell <redacted>
---
arch/powerpc/include/asm/uaccess.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
On Tue, Mar 15, 2016 at 05:46:34PM +1100, Stephen Rothwell wrote:
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
Caused by commit
150a0b4905f1 ("aio: add support for async openat()")
despite commit
d2f7a973e11e ("aio: don't use __get_user() for 64 bit values")
This is due to a bug in the powerpc __get_user_check() macro (the return
value is defined to be "unsigned long" which is only 32 bits on a 32
bit platform).
m68k allmodconfig and all defs of m32r fails while building next-20160315.
regards
sudip
From: Benjamin LaHaise <bcrl@kvack.org> Date: 2016-03-15 16:22:31
On Tue, Mar 15, 2016 at 04:19:02PM +0000, Sudip Mukherjee wrote:
On Tue, Mar 15, 2016 at 05:46:34PM +1100, Stephen Rothwell wrote:
quoted
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
Caused by commit
150a0b4905f1 ("aio: add support for async openat()")
despite commit
d2f7a973e11e ("aio: don't use __get_user() for 64 bit values")
This is due to a bug in the powerpc __get_user_check() macro (the return
value is defined to be "unsigned long" which is only 32 bits on a 32
bit platform).
m68k allmodconfig and all defs of m32r fails while building next-20160315.
regards
sudip
I've removed everything from the aio-next.git tree for now. Will revisit
after the merge window.
-ben
--
"Thought is the essence of where you are now."
On Tuesday 15 March 2016 16:38:51 Andy Shevchenko wrote:
On Tue, Mar 15, 2016 at 8:46 AM, Stephen Rothwell [off-list ref] wrote:
quoted
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
avr32 seems affected as well and the below solution is not suitable
(should be much more verbose in asm, I guess).
On Tuesday 15 March 2016 12:22:28 Benjamin LaHaise wrote:
On Tue, Mar 15, 2016 at 04:19:02PM +0000, Sudip Mukherjee wrote:
quoted
On Tue, Mar 15, 2016 at 05:46:34PM +1100, Stephen Rothwell wrote:
quoted
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
Caused by commit
150a0b4905f1 ("aio: add support for async openat()")
despite commit
d2f7a973e11e ("aio: don't use __get_user() for 64 bit values")
This is due to a bug in the powerpc __get_user_check() macro (the return
value is defined to be "unsigned long" which is only 32 bits on a 32
bit platform).
m68k allmodconfig and all defs of m32r fails while building next-20160315.
regards
sudip
I've removed everything from the aio-next.git tree for now. Will revisit
after the merge window.
I've also sent a patch that fixes the link error on ARM and that should
work on all other architectures too.
Arnd
From: Andy Shevchenko <hidden> Date: 2016-03-16 11:12:42
On Wed, Mar 16, 2016 at 12:02 AM, Arnd Bergmann [off-list ref] wrote:
On Tuesday 15 March 2016 12:22:28 Benjamin LaHaise wrote:
quoted
On Tue, Mar 15, 2016 at 04:19:02PM +0000, Sudip Mukherjee wrote:
quoted
On Tue, Mar 15, 2016 at 05:46:34PM +1100, Stephen Rothwell wrote:
quoted
Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
fs/built-in.o: In function `aio_thread_op_foo_at':
aio.c:(.text+0x4dab4): undefined reference to `__get_user_bad'
aio.c:(.text+0x4daec): undefined reference to `__get_user_bad'
Caused by commit
150a0b4905f1 ("aio: add support for async openat()")
despite commit
d2f7a973e11e ("aio: don't use __get_user() for 64 bit values")
quoted
I've removed everything from the aio-next.git tree for now. Will revisit
after the merge window.
I think it is the best solution right now.
I've also sent a patch that fixes the link error on ARM and that should
work on all other architectures too.
In case of avr32 signalfd_read() fails. Does your patch help with it as well?
P.S. Bisecting shows same culprit: 150a0b4905f1 ("aio: add support for
async openat()")
--
With Best Regards,
Andy Shevchenko
On Wednesday 16 March 2016 13:12:36 Andy Shevchenko wrote:
quoted
I've also sent a patch that fixes the link error on ARM and that should
work on all other architectures too.
In case of avr32 signalfd_read() fails. Does your patch help with it as well?
P.S. Bisecting shows same culprit: 150a0b4905f1 ("aio: add support for
async openat()")
I don't know. What is the symptom on avr32? My patch only removes the
get_user() instances on 64-bit values and replaces them with a
single copy_from_user() call.
Arnd
From: Benjamin LaHaise <bcrl@kvack.org> Date: 2016-03-16 14:07:16
On Wed, Mar 16, 2016 at 02:59:38PM +0100, Arnd Bergmann wrote:
On Wednesday 16 March 2016 13:12:36 Andy Shevchenko wrote:
quoted
quoted
I've also sent a patch that fixes the link error on ARM and that should
work on all other architectures too.
In case of avr32 signalfd_read() fails. Does your patch help with it as well?
P.S. Bisecting shows same culprit: 150a0b4905f1 ("aio: add support for
async openat()")
I don't know. What is the symptom on avr32? My patch only removes the
get_user() instances on 64-bit values and replaces them with a
single copy_from_user() call.
Which is the wrong fix. Arch code should be able to handle 64 bit values
in all the get/put_user() variants. We use 64 bit variables all over the
place in interfaces to userspace.
-ben