Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583872 > unrolled thread
| Started by | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| First post | 2017-02-18 10:40 +0100 |
| Last post | 2017-02-21 20:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] usercopy: Don't test 64-bit get/put_user() on 32-bit powerpc Michael Ellerman <mpe@ellerman.id.au> - 2017-02-18 10:40 +0100
Re: [PATCH] usercopy: Don't test 64-bit get/put_user() on 32-bit powerpc Kees Cook <keescook@chromium.org> - 2017-02-21 20:30 +0100
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2017-02-18 10:40 +0100 |
| Subject | [PATCH] usercopy: Don't test 64-bit get/put_user() on 32-bit powerpc |
| Message-ID | <tc9EJ-5W-9@gated-at.bofh.it> |
Add PPC32 to the opt-out list, otherwise it breaks the build. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> --- lib/test_user_copy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/test_user_copy.c b/lib/test_user_copy.c index 4a79f2c1cd6e..6f335a3d4ae2 100644 --- a/lib/test_user_copy.c +++ b/lib/test_user_copy.c @@ -37,6 +37,7 @@ !defined(CONFIG_MICROBLAZE) && \ !defined(CONFIG_MN10300) && \ !defined(CONFIG_NIOS2) && \ + !defined(CONFIG_PPC32) && \ !defined(CONFIG_SUPERH)) # define TEST_U64 #endif -- 2.7.4
[toc] | [next] | [standalone]
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2017-02-21 20:30 +0100 |
| Message-ID | <tdoim-6Y4-15@gated-at.bofh.it> |
| In reply to | #1583872 |
On Sat, Feb 18, 2017 at 1:33 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> Add PPC32 to the opt-out list, otherwise it breaks the build.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> lib/test_user_copy.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/test_user_copy.c b/lib/test_user_copy.c
> index 4a79f2c1cd6e..6f335a3d4ae2 100644
> --- a/lib/test_user_copy.c
> +++ b/lib/test_user_copy.c
> @@ -37,6 +37,7 @@
> !defined(CONFIG_MICROBLAZE) && \
> !defined(CONFIG_MN10300) && \
> !defined(CONFIG_NIOS2) && \
> + !defined(CONFIG_PPC32) && \
> !defined(CONFIG_SUPERH))
> # define TEST_U64
> #endif
I'm fine to add this, but I'm curious why it fails? ppc uaccess.h has:
#define get_user(x, ptr) \
__get_user_check((x), (ptr), sizeof(*(ptr)))
#define __get_user_check(x, ptr, size) \
({ \
...
__get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
#define __get_user_size(x, ptr, size, retval) \
do { \
...
case 8: __get_user_asm2(x, ptr, retval); break; \
#ifdef __powerpc64__
#define __get_user_asm2(x, addr, err) \
__get_user_asm(x, addr, err, "ld")
#else /* __powerpc64__ */
#define __get_user_asm2(x, addr, err) \
__asm__ __volatile__( \
...
It looks like __get_user_asm2() was explicitly designed for handling
64-bit get_user()?
-Kees
--
Kees Cook
Pixel Security
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web