Re: [PATCH 0/8] Update kernel uabi header files for x32
On Tue, Jan 21, 2014 at 09:06:59AM -0800, H. Peter Anvin wrote: > On 12/27/2013 02:14 PM, H.J. Lu wrote: > > X32 uses the same kernel system call interface as x86-64 for many > > system calls. However, "long" is 64-bit for x86-64 and is 32-bit for > > x32. Where long or unsigned long are used in struct types for such > > system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] > > long for all ABIs other than x32. I am submitting 8 patches to replace > > long or unsigned long with __kernel_[u]long_t so that those struct types > > can be used with x32 system calls. > > > > H.J. Lu (8): > > Use __kernel_long_t in struct timex > > Use __kernel_long_t/__kernel_ulong_t in > > Use __kernel_ulong_t in uapi struct ipc64_perm > > Use __kernel_long_t in struct msgbuf > > Use __kernel_ulong_t in struct msqid64_ds > > Use __kernel_ulong_t in x86 struct semid64_ds > > Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info > > Use __kernel_long_t in struct mq_attr > > > > As Catalin indirectly pointed out, I had made a followup to the wrong > version of the patchset (because I commented to Christoph's feedback.) > This is threaded to the proper version (without unnecessary #if > __BITS_PER_LONG.) >From an arm64 ILP32 perspective (though still work in progress), the patches look fine. We'll continue the trend with similar changes to generic semid64_ds. In case the series is not committed yet: Acked-by: Catalin Marinas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Tue, Jan 21, 2014 at 09:06:59AM -0800, H. Peter Anvin wrote: On 12/27/2013 02:14 PM, H.J. Lu wrote: X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. H.J. Lu (8): Use __kernel_long_t in struct timex Use __kernel_long_t/__kernel_ulong_t in linux/resource.h Use __kernel_ulong_t in uapi struct ipc64_perm Use __kernel_long_t in struct msgbuf Use __kernel_ulong_t in struct msqid64_ds Use __kernel_ulong_t in x86 struct semid64_ds Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info Use __kernel_long_t in struct mq_attr As Catalin indirectly pointed out, I had made a followup to the wrong version of the patchset (because I commented to Christoph's feedback.) This is threaded to the proper version (without unnecessary #if __BITS_PER_LONG.) From an arm64 ILP32 perspective (though still work in progress), the patches look fine. We'll continue the trend with similar changes to generic semid64_ds. In case the series is not committed yet: Acked-by: Catalin Marinas catalin.mari...@arm.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 12/27/2013 02:14 PM, H.J. Lu wrote: > X32 uses the same kernel system call interface as x86-64 for many > system calls. However, "long" is 64-bit for x86-64 and is 32-bit for > x32. Where long or unsigned long are used in struct types for such > system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] > long for all ABIs other than x32. I am submitting 8 patches to replace > long or unsigned long with __kernel_[u]long_t so that those struct types > can be used with x32 system calls. > > H.J. Lu (8): > Use __kernel_long_t in struct timex > Use __kernel_long_t/__kernel_ulong_t in > Use __kernel_ulong_t in uapi struct ipc64_perm > Use __kernel_long_t in struct msgbuf > Use __kernel_ulong_t in struct msqid64_ds > Use __kernel_ulong_t in x86 struct semid64_ds > Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info > Use __kernel_long_t in struct mq_attr > As Catalin indirectly pointed out, I had made a followup to the wrong version of the patchset (because I commented to Christoph's feedback.) This is threaded to the proper version (without unnecessary #if __BITS_PER_LONG.) -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 01/21/2014 04:04 AM, Catalin Marinas wrote: > > ILP32 for arm64 is still work in progress and subject to change. So far > the preliminary ABI > (http://git.kernel.org/cgit/linux/kernel/git/cmarinas/linux-aarch64.git/log/?h=ilp32) > redefines kernel_(u)long_t is defined as (unsigned) long long. Most of > the syscalls are 64-bit generic with ~23 routed to compat. I would like > to simplify these further and even use native 64-bit signal handling but > it requires some changes to generic structures. > That would be highly useful feedback. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Tue, Jan 21, 2014 at 4:04 AM, Catalin Marinas wrote: > On Mon, Jan 20, 2014 at 05:46:41PM +, H. Peter Anvin wrote: >> On 12/28/2013 08:33 AM, Christoph Hellwig wrote: >> > On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: >> >> X32 uses the same kernel system call interface as x86-64 for many >> >> system calls. However, "long" is 64-bit for x86-64 and is 32-bit for >> >> x32. Where long or unsigned long are used in struct types for such >> >> system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] >> >> long for all ABIs other than x32. I am submitting 8 patches to replace >> >> long or unsigned long with __kernel_[u]long_t so that those struct types >> >> can be used with x32 system calls. > > Does this mean that you are changing the x32 ABI (or it hasn't been > declared stable yet)? We don't change x32 ABI. Today kernel uabi header files are incompatible with x32 ABI in user space. My patches fix them so that they can be used in user space. -- H.J. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 05:46:41PM +, H. Peter Anvin wrote: > On 12/28/2013 08:33 AM, Christoph Hellwig wrote: > > On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: > >> X32 uses the same kernel system call interface as x86-64 for many > >> system calls. However, "long" is 64-bit for x86-64 and is 32-bit for > >> x32. Where long or unsigned long are used in struct types for such > >> system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] > >> long for all ABIs other than x32. I am submitting 8 patches to replace > >> long or unsigned long with __kernel_[u]long_t so that those struct types > >> can be used with x32 system calls. Does this mean that you are changing the x32 ABI (or it hasn't been declared stable yet)? > This comment by Christoph was literally the only feedback on this > patchset. The definition of __kernel_[u]long_t is "the size of 'long' > for the native kernel for the ABI". H.J.'s patchset only affects x86 > (specifically x86-64) since on all other platforms __kernel_[u]long_t is > simply defined as long/unsigned long. > > That being said, x32 is not the only ABI of this type. In particular, > if the MIPS N32 and ARM64 ILP32 maintainers have suggestions which would > make this work more applicable to them, it would be highly useful to > receive any such feedback. ILP32 for arm64 is still work in progress and subject to change. So far the preliminary ABI (http://git.kernel.org/cgit/linux/kernel/git/cmarinas/linux-aarch64.git/log/?h=ilp32) redefines kernel_(u)long_t is defined as (unsigned) long long. Most of the syscalls are 64-bit generic with ~23 routed to compat. I would like to simplify these further and even use native 64-bit signal handling but it requires some changes to generic structures. I'll have a look at H.J.'s patches and give comments, they may come in handy. -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 05:46:41PM +, H. Peter Anvin wrote: On 12/28/2013 08:33 AM, Christoph Hellwig wrote: On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. Does this mean that you are changing the x32 ABI (or it hasn't been declared stable yet)? This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. That being said, x32 is not the only ABI of this type. In particular, if the MIPS N32 and ARM64 ILP32 maintainers have suggestions which would make this work more applicable to them, it would be highly useful to receive any such feedback. ILP32 for arm64 is still work in progress and subject to change. So far the preliminary ABI (http://git.kernel.org/cgit/linux/kernel/git/cmarinas/linux-aarch64.git/log/?h=ilp32) redefines kernel_(u)long_t is defined as (unsigned) long long. Most of the syscalls are 64-bit generic with ~23 routed to compat. I would like to simplify these further and even use native 64-bit signal handling but it requires some changes to generic structures. I'll have a look at H.J.'s patches and give comments, they may come in handy. -- Catalin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Tue, Jan 21, 2014 at 4:04 AM, Catalin Marinas catalin.mari...@arm.com wrote: On Mon, Jan 20, 2014 at 05:46:41PM +, H. Peter Anvin wrote: On 12/28/2013 08:33 AM, Christoph Hellwig wrote: On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. Does this mean that you are changing the x32 ABI (or it hasn't been declared stable yet)? We don't change x32 ABI. Today kernel uabi header files are incompatible with x32 ABI in user space. My patches fix them so that they can be used in user space. -- H.J. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 01/21/2014 04:04 AM, Catalin Marinas wrote: ILP32 for arm64 is still work in progress and subject to change. So far the preliminary ABI (http://git.kernel.org/cgit/linux/kernel/git/cmarinas/linux-aarch64.git/log/?h=ilp32) redefines kernel_(u)long_t is defined as (unsigned) long long. Most of the syscalls are 64-bit generic with ~23 routed to compat. I would like to simplify these further and even use native 64-bit signal handling but it requires some changes to generic structures. That would be highly useful feedback. -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 12/27/2013 02:14 PM, H.J. Lu wrote: X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. H.J. Lu (8): Use __kernel_long_t in struct timex Use __kernel_long_t/__kernel_ulong_t in linux/resource.h Use __kernel_ulong_t in uapi struct ipc64_perm Use __kernel_long_t in struct msgbuf Use __kernel_ulong_t in struct msqid64_ds Use __kernel_ulong_t in x86 struct semid64_ds Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info Use __kernel_long_t in struct mq_attr As Catalin indirectly pointed out, I had made a followup to the wrong version of the patchset (because I commented to Christoph's feedback.) This is threaded to the proper version (without unnecessary #if __BITS_PER_LONG.) -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 01/20/2014 09:50 AM, Christoph Hellwig wrote: > On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: >> This comment by Christoph was literally the only feedback on this >> patchset. The definition of __kernel_[u]long_t is "the size of 'long' >> for the native kernel for the ABI". H.J.'s patchset only affects x86 >> (specifically x86-64) since on all other platforms __kernel_[u]long_t is >> simply defined as long/unsigned long. > > Btw, sorry for the delay in getting back yo your question. How about > __abi_long_t or __kabi_long_t instead? > __kernel_* is the namespace that we reserve for uabi symbols/types in user space. Changing the prefix would break that contract. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 9:51 AM, H.J. Lu wrote: > On Mon, Jan 20, 2014 at 9:50 AM, Christoph Hellwig wrote: >> On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: >>> This comment by Christoph was literally the only feedback on this >>> patchset. The definition of __kernel_[u]long_t is "the size of 'long' >>> for the native kernel for the ABI". H.J.'s patchset only affects x86 >>> (specifically x86-64) since on all other platforms __kernel_[u]long_t is >>> simply defined as long/unsigned long. >> >> Btw, sorry for the delay in getting back yo your question. How about >> __abi_long_t or __kabi_long_t instead? >> > > FWIW, in glibc, we use __syscall_ulong_t/__syscall_ulong_t instead of It should be __syscall_ulong_t/__syscall_slong_t. > __kernel_[u]long_t. -- H.J. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 01/20/2014 09:51 AM, H.J. Lu wrote: > On Mon, Jan 20, 2014 at 9:50 AM, Christoph Hellwig wrote: >> On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: >>> This comment by Christoph was literally the only feedback on this >>> patchset. The definition of __kernel_[u]long_t is "the size of 'long' >>> for the native kernel for the ABI". H.J.'s patchset only affects x86 >>> (specifically x86-64) since on all other platforms __kernel_[u]long_t is >>> simply defined as long/unsigned long. >> >> Btw, sorry for the delay in getting back yo your question. How about >> __abi_long_t or __kabi_long_t instead? >> > > FWIW, in glibc, we use __syscall_ulong_t/__syscall_ulong_t instead of > __kernel_[u]long_t. > Yes, but glibc defines its own headers and doesn't rely on the types exported from the kernel. We could rename them all, but that would *definitely* seem like breaking the universe for no good reason. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 12/28/2013 08:33 AM, Christoph Hellwig wrote: > On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: >> X32 uses the same kernel system call interface as x86-64 for many >> system calls. However, "long" is 64-bit for x86-64 and is 32-bit for >> x32. Where long or unsigned long are used in struct types for such >> system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] >> long for all ABIs other than x32. I am submitting 8 patches to replace >> long or unsigned long with __kernel_[u]long_t so that those struct types >> can be used with x32 system calls. > > Independent on how this fixes things, how does the kernel_long_t name > here make any sense? > > On x86-64 "kernel" long always is 64 bits wide. The userspace ABI long > might be 32 or 64bits wide. > > Currently kernel_long_t has almost no uses, so it might be a good time > to fix the name, define the rules for it, and last but not least > properly document the intent for thse types. > This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is "the size of 'long' for the native kernel for the ABI". H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. That being said, x32 is not the only ABI of this type. In particular, if the MIPS N32 and ARM64 ILP32 maintainers have suggestions which would make this work more applicable to them, it would be highly useful to receive any such feedback. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 9:50 AM, Christoph Hellwig wrote: > On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: >> This comment by Christoph was literally the only feedback on this >> patchset. The definition of __kernel_[u]long_t is "the size of 'long' >> for the native kernel for the ABI". H.J.'s patchset only affects x86 >> (specifically x86-64) since on all other platforms __kernel_[u]long_t is >> simply defined as long/unsigned long. > > Btw, sorry for the delay in getting back yo your question. How about > __abi_long_t or __kabi_long_t instead? > FWIW, in glibc, we use __syscall_ulong_t/__syscall_ulong_t instead of __kernel_[u]long_t. -- H.J. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: > This comment by Christoph was literally the only feedback on this > patchset. The definition of __kernel_[u]long_t is "the size of 'long' > for the native kernel for the ABI". H.J.'s patchset only affects x86 > (specifically x86-64) since on all other platforms __kernel_[u]long_t is > simply defined as long/unsigned long. Btw, sorry for the delay in getting back yo your question. How about __abi_long_t or __kabi_long_t instead? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. Btw, sorry for the delay in getting back yo your question. How about __abi_long_t or __kabi_long_t instead? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 9:50 AM, Christoph Hellwig h...@infradead.org wrote: On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. Btw, sorry for the delay in getting back yo your question. How about __abi_long_t or __kabi_long_t instead? FWIW, in glibc, we use __syscall_ulong_t/__syscall_ulong_t instead of __kernel_[u]long_t. -- H.J. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 12/28/2013 08:33 AM, Christoph Hellwig wrote: On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. Independent on how this fixes things, how does the kernel_long_t name here make any sense? On x86-64 kernel long always is 64 bits wide. The userspace ABI long might be 32 or 64bits wide. Currently kernel_long_t has almost no uses, so it might be a good time to fix the name, define the rules for it, and last but not least properly document the intent for thse types. This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. That being said, x32 is not the only ABI of this type. In particular, if the MIPS N32 and ARM64 ILP32 maintainers have suggestions which would make this work more applicable to them, it would be highly useful to receive any such feedback. -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 01/20/2014 09:51 AM, H.J. Lu wrote: On Mon, Jan 20, 2014 at 9:50 AM, Christoph Hellwig h...@infradead.org wrote: On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. Btw, sorry for the delay in getting back yo your question. How about __abi_long_t or __kabi_long_t instead? FWIW, in glibc, we use __syscall_ulong_t/__syscall_ulong_t instead of __kernel_[u]long_t. Yes, but glibc defines its own headers and doesn't rely on the types exported from the kernel. We could rename them all, but that would *definitely* seem like breaking the universe for no good reason. -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Mon, Jan 20, 2014 at 9:51 AM, H.J. Lu hjl.to...@gmail.com wrote: On Mon, Jan 20, 2014 at 9:50 AM, Christoph Hellwig h...@infradead.org wrote: On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. Btw, sorry for the delay in getting back yo your question. How about __abi_long_t or __kabi_long_t instead? FWIW, in glibc, we use __syscall_ulong_t/__syscall_ulong_t instead of It should be __syscall_ulong_t/__syscall_slong_t. __kernel_[u]long_t. -- H.J. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 01/20/2014 09:50 AM, Christoph Hellwig wrote: On Mon, Jan 20, 2014 at 09:46:41AM -0800, H. Peter Anvin wrote: This comment by Christoph was literally the only feedback on this patchset. The definition of __kernel_[u]long_t is the size of 'long' for the native kernel for the ABI. H.J.'s patchset only affects x86 (specifically x86-64) since on all other platforms __kernel_[u]long_t is simply defined as long/unsigned long. Btw, sorry for the delay in getting back yo your question. How about __abi_long_t or __kabi_long_t instead? __kernel_* is the namespace that we reserve for uabi symbols/types in user space. Changing the prefix would break that contract. -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 12/28/2013 08:33 AM, Christoph Hellwig wrote: > > Independent on how this fixes things, how does the kernel_long_t name > here make any sense? > > On x86-64 "kernel" long always is 64 bits wide. The userspace ABI long > might be 32 or 64bits wide. > > Currently kernel_long_t has almost no uses, so it might be a good time > to fix the name, define the rules for it, and last but not least > properly document the intent for thse types. > The definition is "an integer type the same width as 'long' for the native kernel type for the ABI". If you have any suggestions for a better name, or for that matter, a better alternative, that would be genuinely appreciated... -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: > X32 uses the same kernel system call interface as x86-64 for many > system calls. However, "long" is 64-bit for x86-64 and is 32-bit for > x32. Where long or unsigned long are used in struct types for such > system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] > long for all ABIs other than x32. I am submitting 8 patches to replace > long or unsigned long with __kernel_[u]long_t so that those struct types > can be used with x32 system calls. Independent on how this fixes things, how does the kernel_long_t name here make any sense? On x86-64 "kernel" long always is 64 bits wide. The userspace ABI long might be 32 or 64bits wide. Currently kernel_long_t has almost no uses, so it might be a good time to fix the name, define the rules for it, and last but not least properly document the intent for thse types. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On Fri, Dec 27, 2013 at 02:14:16PM -0800, H.J. Lu wrote: X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. Independent on how this fixes things, how does the kernel_long_t name here make any sense? On x86-64 kernel long always is 64 bits wide. The userspace ABI long might be 32 or 64bits wide. Currently kernel_long_t has almost no uses, so it might be a good time to fix the name, define the rules for it, and last but not least properly document the intent for thse types. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/8] Update kernel uabi header files for x32
On 12/28/2013 08:33 AM, Christoph Hellwig wrote: Independent on how this fixes things, how does the kernel_long_t name here make any sense? On x86-64 kernel long always is 64 bits wide. The userspace ABI long might be 32 or 64bits wide. Currently kernel_long_t has almost no uses, so it might be a good time to fix the name, define the rules for it, and last but not least properly document the intent for thse types. The definition is an integer type the same width as 'long' for the native kernel type for the ABI. If you have any suggestions for a better name, or for that matter, a better alternative, that would be genuinely appreciated... -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/8] Update kernel uabi header files for x32
X32 uses the same kernel system call interface as x86-64 for many system calls. However, "long" is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. H.J. Lu (8): Use __kernel_long_t in struct timex Use __kernel_long_t/__kernel_ulong_t in Use __kernel_ulong_t in uapi struct ipc64_perm Use __kernel_long_t in struct msgbuf Use __kernel_ulong_t in struct msqid64_ds Use __kernel_ulong_t in x86 struct semid64_ds Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info Use __kernel_long_t in struct mq_attr arch/x86/include/uapi/asm/sembuf.h | 10 - include/uapi/asm-generic/ipcbuf.h | 5 + include/uapi/asm-generic/msgbuf.h | 19 +++- include/uapi/asm-generic/shmbuf.h | 36 + include/uapi/linux/mqueue.h| 18 ++- include/uapi/linux/msg.h | 8 +-- include/uapi/linux/resource.h | 26 +++-- include/uapi/linux/shm.h | 14 +--- include/uapi/linux/timex.h | 46 +++--- 9 files changed, 143 insertions(+), 39 deletions(-) -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/8] Update kernel uabi header files for x32
X32 uses the same kernel system call interface as x86-64 for many system calls. However, "long" is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. H.J. Lu (8): Use __kernel_long_t in struct timex Use __kernel_long_t/__kernel_ulong_t in Use __kernel_ulong_t in uapi struct ipc64_perm Use __kernel_long_t in struct msgbuf Use __kernel_ulong_t in struct msqid64_ds Use __kernel_ulong_t in x86 struct semid64_ds Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info Use __kernel_long_t in struct mq_attr arch/x86/include/uapi/asm/sembuf.h | 10 - include/uapi/asm-generic/ipcbuf.h | 5 + include/uapi/asm-generic/msgbuf.h | 19 +++- include/uapi/asm-generic/shmbuf.h | 36 + include/uapi/linux/mqueue.h| 18 ++- include/uapi/linux/msg.h | 8 +-- include/uapi/linux/resource.h | 26 +++-- include/uapi/linux/shm.h | 14 +--- include/uapi/linux/timex.h | 46 +++--- 9 files changed, 143 insertions(+), 39 deletions(-) -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/8] Update kernel uabi header files for x32
X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. H.J. Lu (8): Use __kernel_long_t in struct timex Use __kernel_long_t/__kernel_ulong_t in linux/resource.h Use __kernel_ulong_t in uapi struct ipc64_perm Use __kernel_long_t in struct msgbuf Use __kernel_ulong_t in struct msqid64_ds Use __kernel_ulong_t in x86 struct semid64_ds Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info Use __kernel_long_t in struct mq_attr arch/x86/include/uapi/asm/sembuf.h | 10 - include/uapi/asm-generic/ipcbuf.h | 5 + include/uapi/asm-generic/msgbuf.h | 19 +++- include/uapi/asm-generic/shmbuf.h | 36 + include/uapi/linux/mqueue.h| 18 ++- include/uapi/linux/msg.h | 8 +-- include/uapi/linux/resource.h | 26 +++-- include/uapi/linux/shm.h | 14 +--- include/uapi/linux/timex.h | 46 +++--- 9 files changed, 143 insertions(+), 39 deletions(-) -- 1.8.4.2 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/8] Update kernel uabi header files for x32
X32 uses the same kernel system call interface as x86-64 for many system calls. However, long is 64-bit for x86-64 and is 32-bit for x32. Where long or unsigned long are used in struct types for such system calls, they are wrong for x32. __kernel_[u]long_t is [unsigned] long for all ABIs other than x32. I am submitting 8 patches to replace long or unsigned long with __kernel_[u]long_t so that those struct types can be used with x32 system calls. H.J. Lu (8): Use __kernel_long_t in struct timex Use __kernel_long_t/__kernel_ulong_t in linux/resource.h Use __kernel_ulong_t in uapi struct ipc64_perm Use __kernel_long_t in struct msgbuf Use __kernel_ulong_t in struct msqid64_ds Use __kernel_ulong_t in x86 struct semid64_ds Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info Use __kernel_long_t in struct mq_attr arch/x86/include/uapi/asm/sembuf.h | 10 - include/uapi/asm-generic/ipcbuf.h | 5 + include/uapi/asm-generic/msgbuf.h | 19 +++- include/uapi/asm-generic/shmbuf.h | 36 + include/uapi/linux/mqueue.h| 18 ++- include/uapi/linux/msg.h | 8 +-- include/uapi/linux/resource.h | 26 +++-- include/uapi/linux/shm.h | 14 +--- include/uapi/linux/timex.h | 46 +++--- 9 files changed, 143 insertions(+), 39 deletions(-) -- 1.8.4.2 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/