* [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64
2015-11-02 23:30 [RFC PATCH v6 00/17] ILP32 " Yury Norov
@ 2015-11-02 23:30 ` Yury Norov
2015-11-05 14:33 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Yury Norov @ 2015-11-02 23:30 UTC (permalink / raw)
To: catalin.marinas, arnd, linux-arm-kernel, linux-kernel
Cc: pinskia, ddaney.cavm, jan.dakinevich, Prasun.Kapoor,
christoph.muellner, philipp.tomsich, broonie, andrey.konovalov,
Nathan_Lynch, agraf, bamvor.zhangjian, klimov.linux, Yury Norov,
Andrew Pinski
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Based on Andrew Pinski's original patch-series and adapted with changes
to reduce the duplication of code-paths and resolve issue found during
LTP testing.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Signed-off-by: Andrew Pinski <Andrew.Pinski@caviumnetworks.com>
Reviewed-by: David Daney <david.daney@cavium.com>
---
Documentation/arm64/ilp32.txt | 55 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 Documentation/arm64/ilp32.txt
diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt
new file mode 100644
index 0000000..4f6860b
--- /dev/null
+++ b/Documentation/arm64/ilp32.txt
@@ -0,0 +1,55 @@
+ILP32 AARCH64 SYSCALL ABI
+=========================
+Written by Andrew Pinski <apinski@cavium.com>
+Updated by Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
+
+
+This document describes the ILP32 syscall ABI and where it differs
+from the generic linux syscall interface.
+
+Some structures are changed to reduce the difference in the code path
+for both ILP32 and LP64 ABIs for signal handling.
+
+The following structures have been changed so the layout of the
+structures are the same between ILP32 and LP64 ABIs, including:
+ * sigval_t contains pointers
+ * sigevent Uses sigval_t which causes it to be the same. Special
+ handing is needed for reading; in the mq_notify syscall
+ * sigaction Conversion is handled in the userland (glibc), as the
+ userland data structures are defined in glibc anyway.
+
+A number of structures differ between ILP32 and LP64, including:
+ * timespec uses time_t and suseconds_t
+ * timeval uses time_t and suseconds_t
+ * stat uses timespec/time_t
+ * semid64_ds uses time_t.
+ * msqid64_ds uses time_t.
+ * shmid64_ds uses time_t.
+ * rt_sigframe uses siginfo and ucontext.
+ * siginfo_t uses clock_t and sigval_t
+ * ucontext uses stack_t and sigset_t
+ * fd_set This is done to avoid endian issues between ILP32 and
+ LP64. Syscalls consuming fd_set use timespec.
+ * struct msgbuf The specification of 'struct msgbuf' defines the 'mtype'
+ field as a 'long' (i.e. 32bit for ILP32, but 64bit for
+ LP64). Functions that operate on 'struct msgbuf' need
+ to be passed through the compat-syscalls to resolve
+ this.
+ * stack_t contains pointers (handled in the compatibility layer)
+
+Also the syscalls which normally would pass 64bit values as two arguments;
+now pass the 64bit value as one argument. Also they have been renamed
+(removing the 64 from the name) to avoid confusion.
+The list of these LP64 syscalls reused by ILP32 clients is:
+ * fcntl
+ * statfs
+ * fstatfs
+ * truncate
+ * ftruncate
+ * lseek
+ * sendfile
+ * newfstatat
+ * fstat
+ * mmap
+ * fadvise64
+
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64
2015-11-02 23:30 ` [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI " Yury Norov
@ 2015-11-05 14:33 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-11-05 14:33 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Yury Norov, catalin.marinas, linux-kernel, pinskia, Prasun.Kapoor,
Nathan_Lynch, agraf, klimov.linux, Andrew Pinski, broonie,
jan.dakinevich, ddaney.cavm, bamvor.zhangjian, philipp.tomsich,
andrey.konovalov, christoph.muellner
On Tuesday 03 November 2015 02:30:30 Yury Norov wrote:
> From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>
> Based on Andrew Pinski's original patch-series and adapted with changes
> to reduce the duplication of code-paths and resolve issue found during
> LTP testing.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
> Signed-off-by: Andrew Pinski <Andrew.Pinski@caviumnetworks.com>
> Reviewed-by: David Daney <david.daney@cavium.com>
Thanks for the updated version, I'm much happier with this, and only have
some comments on a few details to the later patches.
> +This document describes the ILP32 syscall ABI and where it differs
> +from the generic linux syscall interface.
> +
> +Some structures are changed to reduce the difference in the code path
> +for both ILP32 and LP64 ABIs for signal handling.
> +
> +The following structures have been changed so the layout of the
> +structures are the same between ILP32 and LP64 ABIs, including:
> + * sigval_t contains pointers
> + * sigevent Uses sigval_t which causes it to be the same. Special
> + handing is needed for reading; in the mq_notify syscall
> + * sigaction Conversion is handled in the userland (glibc), as the
> + userland data structures are defined in glibc anyway.
Right, makes sense.
> +A number of structures differ between ILP32 and LP64, including:
> + * timespec uses time_t and suseconds_t
> + * timeval uses time_t and suseconds_t
> + * stat uses timespec/time_t
As I commented, we might want to change this for 'stat', which doesn't
really time_t anyway.
> + * semid64_ds uses time_t.
> + * msqid64_ds uses time_t.
> + * shmid64_ds uses time_t.
These use the arm32 layout, right? That's good for consistency.
Fixing these for y2038 will be a bit ugly, but that code can be
shared across all architectures.
> + * rt_sigframe uses siginfo and ucontext.
> + * siginfo_t uses clock_t and sigval_t
> + * ucontext uses stack_t and sigset_t
> + * fd_set This is done to avoid endian issues between ILP32 and
> + LP64. Syscalls consuming fd_set use timespec.
> + * struct msgbuf The specification of 'struct msgbuf' defines the 'mtype'
> + field as a 'long' (i.e. 32bit for ILP32, but 64bit for
> + LP64). Functions that operate on 'struct msgbuf' need
> + to be passed through the compat-syscalls to resolve
> + this.
> + * stack_t contains pointers (handled in the compatibility layer)
> +
> +Also the syscalls which normally would pass 64bit values as two arguments;
> +now pass the 64bit value as one argument. Also they have been renamed
> +(removing the 64 from the name) to avoid confusion.
> +The list of these LP64 syscalls reused by ILP32 clients is:
> + * fcntl
> + * statfs
> + * fstatfs
Did you forget to edit this list? I see fcntl and {f,}statfs use the compat
implementation, not the native one in your patches.
> + * truncate
> + * ftruncate
> + * lseek
> + * sendfile
> + * fadvise64
Makes sense. I think using the normal compat syscalls would have been
just as good here, to save a few lines in the syscall table, but I
agree that the calling conventions are rather silly when you pass
a 64-bit number in two registers.
> + * newfstatat
> + * fstat
This contradicts what you write above regarding separate 'struct stat'.
> + * mmap
Not direct reuse because of the wrapper to check the page size I guess.
Aside from the wrapper, the 32-bit and 64-bit system calls are basically
identical.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64
@ 2015-11-25 3:07 Iosif Harutyunov
2016-04-20 3:27 ` Yury Norov
0 siblings, 1 reply; 4+ messages in thread
From: Iosif Harutyunov @ 2015-11-25 3:07 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
Sonicwall is very interested in ILP32, is there a way we can get access to the SuSe builds?
Iosif,_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64
2015-11-25 3:07 [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64 Iosif Harutyunov
@ 2016-04-20 3:27 ` Yury Norov
0 siblings, 0 replies; 4+ messages in thread
From: Yury Norov @ 2016-04-20 3:27 UTC (permalink / raw)
To: Iosif Harutyunov; +Cc: linux-kernel@vger.kernel.org
On Wed, Nov 25, 2015 at 03:07:26AM +0000, Iosif Harutyunov wrote:
> Sonicwall is very interested in ILP32, is there a way we can get access to the SuSe builds?
>
> Iosif,_
>
Hi Iosif,
I just found your email in trash mailbox. Please add my email to CC
explicitly to avoid it. If you still interested in ILP32, find
RFC6 version here: http://www.spinics.net/lists/linux-s390/msg12272.html
There are also manuals for building glibc for it. I'm not sure
someone was building whole SUSE distro against ILP32, but I think
you can build kernel with my patches, and library, and do tests you
interested. Feel free to contact me in case of troubles.
Yury.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-20 3:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 3:07 [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64 Iosif Harutyunov
2016-04-20 3:27 ` Yury Norov
-- strict thread matches above, loose matches on Subject: below --
2015-11-02 23:30 [RFC PATCH v6 00/17] ILP32 " Yury Norov
2015-11-02 23:30 ` [PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI " Yury Norov
2015-11-05 14:33 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox