Message ID | 1477081997-4770-3-git-send-email-ynorov@caviumnetworks.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10/21/2016 4:33 PM, Yury Norov wrote: > Based on Andrew Pinski's patch-series. > > Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> > --- > Documentation/arm64/ilp32.txt | 46 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 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..b96c18f > --- /dev/null > +++ b/Documentation/arm64/ilp32.txt > @@ -0,0 +1,46 @@ > +ILP32 AARCH64 SYSCALL ABI > +========================= > + > +This document describes the ILP32 syscall ABI and where it differs > +from the generic compat linux syscall interface. > + > +AARCH64/ILP32 userspace can potentially access top halves of registers that > +are passed as syscall arguments, so such registers (w0-w7) are deloused. I'm not sure what "potentially access" here means: I think what you want to say is that userspace can pass garbage in the top half, but you should be clearer about what you mean here. Also, you shouldn't use "deloused" here, since it's not a term that's defined elsewhere in the kernel, even though it's been used colloquially on LKML. Provide an actual implementation definition, like "have their top 32 bits zeroed". > +AARCH64/ILP32 provides next types turned to 64-bit (comparing to AARCH32): What does "turned" mean here? And I "next types" isn't standard English; you want to say something like "the following types". Likewise later with "next syscalls".
Hi Chris, Thank you for comments On Mon, Oct 24, 2016 at 12:36:27PM -0400, Chris Metcalf wrote: > On 10/21/2016 4:33 PM, Yury Norov wrote: > >Based on Andrew Pinski's patch-series. > > > >Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> > >--- > > Documentation/arm64/ilp32.txt | 46 +++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 46 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..b96c18f > >--- /dev/null > >+++ b/Documentation/arm64/ilp32.txt > >@@ -0,0 +1,46 @@ > >+ILP32 AARCH64 SYSCALL ABI > >+========================= > >+ > >+This document describes the ILP32 syscall ABI and where it differs > >+from the generic compat linux syscall interface. > >+ > >+AARCH64/ILP32 userspace can potentially access top halves of registers that > >+are passed as syscall arguments, so such registers (w0-w7) are deloused. > > I'm not sure what "potentially access" here means: I think what you want to say > is that userspace can pass garbage in the top half, but you should be clearer about > what you mean here. Yes. Will change. > Also, you shouldn't use "deloused" here, since it's not a term > that's defined elsewhere in the kernel, even though it's been used colloquially on LKML. > Provide an actual implementation definition, like "have their top 32 bits zeroed". Agree. In fact 'delouse' is used in the name of corresponding macro in include/linux/compat.h: 29 #ifndef __SC_DELOUSE 30 #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) 31 #endif But it's not for documentation. > > >+AARCH64/ILP32 provides next types turned to 64-bit (comparing to AARCH32): > > What does "turned" mean here? And I "next types" isn't standard English; you want > to say something like "the following types". Likewise later with "next syscalls". Thanks, will change. Yury
diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt new file mode 100644 index 0000000..b96c18f --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,46 @@ +ILP32 AARCH64 SYSCALL ABI +========================= + +This document describes the ILP32 syscall ABI and where it differs +from the generic compat linux syscall interface. + +AARCH64/ILP32 userspace can potentially access top halves of registers that +are passed as syscall arguments, so such registers (w0-w7) are deloused. + +AARCH64/ILP32 provides next types turned to 64-bit (comparing to AARCH32): +ino_t is u64 type. +off_t is s64 type. +blkcnt_t is s64 type. +fsblkcnt_t is u64 type. +fsfilcnt_t is u64 type. +rlim_t is u64 type. + +AARCH64/ILP32 ABI uses standard syscall table which can be found at +include/uapi/asm-generic/unistd.h, with the exceptions listed below. + +Syscalls which pass 64bit values are handled by the code shared from +AARCH32 and pass that value as a pair. Next syscalls are affected: +fadvise64_64() +fallocate() +ftruncate64() +pread64() +pwrite64() +readahead() +sync_file_range() +truncate64() +sys_mmap() + +ptrace() syscall is handled by compat version. + +shmat() syscall is handled by non-compat handler as aarch64/ilp32 has no +limitation on 4-pages alignment for shared memory. + +statfs() and fstatfs() take the size of sfruct statfs as an argument. +It is calculated differently in kernel and user spaces. So AARCH32 handlers +are taken to handle it. + +struct rt_sigframe is redefined and contains struct compat_siginfo, +as compat syscalls expects, and struct ilp32_sigframe, to handle +AARCH64 register set and 32-bit userspace register representation. + +elf_gregset_t is taken from lp64 to handle registers properly.
Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> --- Documentation/arm64/ilp32.txt | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/arm64/ilp32.txt