Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
__ASSUME_PRLIMIT64 is defined in kernel-features.h for kernels 2.6.36
and later, but hppa, microblaze and sh did not add the prlimit64
syscall until 2.6.37.  This patch adds corresponding undefines of
__ASSUME_PRLIMIT64 to those architectures' kernel-features.h files.

(This concludes the kernel-features.h fixes arising out of the review
- limited to macros defined in the architecture-independent
kernel-features.h file - I did in connection with the move to 2.6.32
minimum kernel version.  For that subset of macros - I didn't check
any purely architecture-specific macros - I think they are now defined
for the correct kernel versions on each architecture after this
patch.)

Untested.

2014-12-31  Joseph Myers  <[hidden email]>

        [BZ #17779]
        * sysdeps/unix/sysv/linux/hppa/kernel-features.h
        [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
        Undefine.
        * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
        [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
        Likewise.
        * sysdeps/unix/sysv/linux/sh/kernel-features.h
        [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
        Likewise.

diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h
index cf0c574..40d9c9f 100644
--- a/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h
@@ -38,3 +38,8 @@
 #endif
 
 #include_next <kernel-features.h>
+
+/* The prlimit64 syscall was added for PA in 2.6.37.  */
+#if __LINUX_KERNEL_VERSION < 0x020625
+# undef __ASSUME_PRLIMIT64
+#endif
diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
index 34b0521..6f988b6 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
@@ -45,6 +45,11 @@
 # undef __ASSUME_SET_ROBUST_LIST
 #endif
 
+/* The prlimit64 syscall was added for MicroBlaze in 2.6.37.  */
+#if __LINUX_KERNEL_VERSION < 0x020625
+# undef __ASSUME_PRLIMIT64
+#endif
+
 /* Support for the pselect6, preadv and pwritev syscalls was added in
    3.15.  */
 #if __LINUX_KERNEL_VERSION < 0x030f00
diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index ae272ef..9e7e445 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -40,3 +40,8 @@
 
 /* SH does not have a 64-bit inode field.  */
 #undef __ASSUME_ST_INO_64_BIT
+
+/* The prlimit64 syscall was added for SH in 2.6.37.  */
+#if __LINUX_KERNEL_VERSION < 0x020625
+# undef __ASSUME_PRLIMIT64
+#endif

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Kaz Kojima
Joseph Myers <[hidden email]> wrote:

> __ASSUME_PRLIMIT64 is defined in kernel-features.h for kernels 2.6.36
> and later, but hppa, microblaze and sh did not add the prlimit64
> syscall until 2.6.37.  This patch adds corresponding undefines of
> __ASSUME_PRLIMIT64 to those architectures' kernel-features.h files.
>
> (This concludes the kernel-features.h fixes arising out of the review
> - limited to macros defined in the architecture-independent
> kernel-features.h file - I did in connection with the move to 2.6.32
> minimum kernel version.  For that subset of macros - I didn't check
> any purely architecture-specific macros - I think they are now defined
> for the correct kernel versions on each architecture after this
> patch.)
>
> Untested.
>
> 2014-12-31  Joseph Myers  <[hidden email]>
>
> [BZ #17779]
> * sysdeps/unix/sysv/linux/hppa/kernel-features.h
> [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
> Undefine.
> * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
> Likewise.
> * sysdeps/unix/sysv/linux/sh/kernel-features.h
> [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
> Likewise.

Fine on SH.  Tested with 2.6.32 and 3.14.0 kernels.

Regards,
        kaz
Reply | Threaded
Open this post in threaded view
|

Ping Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
In reply to this post by Joseph Myers
Ping.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is pending
review for hppa and microblaze.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Ping Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

David Holsgrove
On 6 January 2015 at 00:26, Joseph Myers <[hidden email]> wrote:
> Ping.  This patch
> <https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is pending
> review for hppa and microblaze.
>
> --
> Joseph S. Myers
> [hidden email]

OK for MicroBlaze, thanks again Joseph,

David
Reply | Threaded
Open this post in threaded view
|

Ping^2 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
In reply to this post by Joseph Myers
Ping^2.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Ping^3 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
Ping^3.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa (and I think it's safe enough for the freeze).

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Ping^4 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
Ping^4.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa (now for 2.22).

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Ping^5 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
Ping^5.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa (now for 2.22).

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Ping^6 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
Ping^6.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Ping^7 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
Ping^7.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Ping^8 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Joseph Myers
Ping^8.  This patch
<https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
pending review for hppa.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Ping^8 Re: Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779)

Mike Frysinger
On 24 Feb 2015 16:21, Joseph Myers wrote:
> Ping^8.  This patch
> <https://sourceware.org/ml/libc-alpha/2014-12/msg01002.html> is still
> pending review for hppa.

lgtm
-mike

signature.asc (836 bytes) Download Attachment