diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-06-16 16:53:06 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-06-16 16:56:13 -0400 |
commit | 6699c8cda36f296e315068ed9bbe4f03e6ed4044 (patch) | |
tree | 5efaceb0e8cae2fee56c751e53c716b7859d0a13 /arch/tile/include/asm | |
parent | cfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff) |
tile: fix bug in get_user() for 4-byte values
The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler. Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().
This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include/asm')
-rw-r--r-- | arch/tile/include/asm/uaccess.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/tile/include/asm/uaccess.h b/arch/tile/include/asm/uaccess.h index c3dd275f25e2..9ab078a4605d 100644 --- a/arch/tile/include/asm/uaccess.h +++ b/arch/tile/include/asm/uaccess.h | |||
@@ -146,7 +146,7 @@ extern int fixup_exception(struct pt_regs *regs); | |||
146 | #ifdef __tilegx__ | 146 | #ifdef __tilegx__ |
147 | #define __get_user_1(x, ptr, ret) __get_user_asm(ld1u, x, ptr, ret) | 147 | #define __get_user_1(x, ptr, ret) __get_user_asm(ld1u, x, ptr, ret) |
148 | #define __get_user_2(x, ptr, ret) __get_user_asm(ld2u, x, ptr, ret) | 148 | #define __get_user_2(x, ptr, ret) __get_user_asm(ld2u, x, ptr, ret) |
149 | #define __get_user_4(x, ptr, ret) __get_user_asm(ld4u, x, ptr, ret) | 149 | #define __get_user_4(x, ptr, ret) __get_user_asm(ld4s, x, ptr, ret) |
150 | #define __get_user_8(x, ptr, ret) __get_user_asm(ld, x, ptr, ret) | 150 | #define __get_user_8(x, ptr, ret) __get_user_asm(ld, x, ptr, ret) |
151 | #else | 151 | #else |
152 | #define __get_user_1(x, ptr, ret) __get_user_asm(lb_u, x, ptr, ret) | 152 | #define __get_user_1(x, ptr, ret) __get_user_asm(lb_u, x, ptr, ret) |