Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 97edf45

Browse files
hdellergregkh
authored andcommitted
parisc: Fix 64-bit userspace syscall path
commit d244498 upstream. Currently the glibc isn't yet ported to 64-bit for hppa, so there is no usable userspace available yet. But it's possible to manually build a static 64-bit binary and run that for testing. One such 64-bit test program is available at http://ftp.parisc-linux.org/src/64bit.tar.gz and it shows various issues with the existing 64-bit syscall path in the kernel. This patch fixes those issues. Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dc0f164 commit 97edf45

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

arch/parisc/kernel/syscall.S

+8-6
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ linux_gateway_entry:
243243

244244
#ifdef CONFIG_64BIT
245245
ldil L%sys_call_table, %r1
246-
or,= %r2,%r2,%r2
247-
addil L%(sys_call_table64-sys_call_table), %r1
246+
or,ev %r2,%r2,%r2
247+
ldil L%sys_call_table64, %r1
248248
ldo R%sys_call_table(%r1), %r19
249-
or,= %r2,%r2,%r2
249+
or,ev %r2,%r2,%r2
250250
ldo R%sys_call_table64(%r1), %r19
251251
#else
252252
load32 sys_call_table, %r19
@@ -379,10 +379,10 @@ tracesys_next:
379379
extrd,u %r19,63,1,%r2 /* W hidden in bottom bit */
380380

381381
ldil L%sys_call_table, %r1
382-
or,= %r2,%r2,%r2
383-
addil L%(sys_call_table64-sys_call_table), %r1
382+
or,ev %r2,%r2,%r2
383+
ldil L%sys_call_table64, %r1
384384
ldo R%sys_call_table(%r1), %r19
385-
or,= %r2,%r2,%r2
385+
or,ev %r2,%r2,%r2
386386
ldo R%sys_call_table64(%r1), %r19
387387
#else
388388
load32 sys_call_table, %r19
@@ -1327,6 +1327,8 @@ ENTRY(sys_call_table)
13271327
END(sys_call_table)
13281328

13291329
#ifdef CONFIG_64BIT
1330+
#undef __SYSCALL_WITH_COMPAT
1331+
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
13301332
.align 8
13311333
ENTRY(sys_call_table64)
13321334
#include <asm/syscall_table_64.h> /* 64-bit syscalls */

0 commit comments

Comments
 (0)