From 28198ac3afd33fb9017ad1283eb794e3a77832f9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 5 May 2019 10:52:41 -0400 Subject: [PATCH] fix passing of 64-bit syscall arguments on microblaze this has been wrong since the beginning of the microblaze port: the syscall ABI for microblaze does not align 64-bit arguments on even register boundaries. commit 788d5e24ca19c6291cebd8d1ad5b5ed6abf42665 exposed the problem by introducing references to a nonexistent __syscall7. the ABI is not documented well anywhere, but I was able to confirm against both strace source and glibc source that microblaze is not using the alignment. per the syscall(2) man page, posix_fadvise, ftruncate, pread, pwrite, readahead, sync_file_range, and truncate were all affected and either did not work at all, or only worked by chance, e.g. when the affected argument slots were all zero. --- arch/microblaze/syscall_arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/microblaze/syscall_arch.h b/arch/microblaze/syscall_arch.h index 942aaa2d..169013f8 100644 --- a/arch/microblaze/syscall_arch.h +++ b/arch/microblaze/syscall_arch.h @@ -1,7 +1,7 @@ #define __SYSCALL_LL_E(x) \ ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \ ((union { long long ll; long l[2]; }){ .ll = x }).l[1] -#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x)) +#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x)) static __inline long __syscall0(long n) { -- GitLab