Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

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

Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

Joseph Myers
Reviewing (for all architectures, with a baseline kernel version of
2.6.32) the kernel support for features for which __ASSUME_* macros
would be affected by a move to 2.6.32 as minimum kernel version showed
up that __ASSUME_PSELECT was wrongly defined for MicroBlaze, despite
the corresponding syscall table entry not being wired up in the
MicroBlaze kernel.

This patch makes the MicroBlaze kernel-features.h undefine
__ASSUME_PSELECT.  I'd also encourage wiring it up in the kernel (so
you can then make this #undef conditional, and eventually obsolete
once a recent-enough kernel is required).  I suspect it wasn't wired
up because of the mistaken comment in asm/unistd.h "obsolete ->
sys_pselect7" (there is no such syscall as pselect7).

2014-02-27  Joseph Myers  <[hidden email]>

        [BZ #16642]
        * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
        (__ASSUME_PSELECT): Undefine.

diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
index 1e9aba5..dfb8344 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
@@ -42,3 +42,6 @@
 #endif
 
 #include_next <kernel-features.h>
+
+/* The MicroBlaze kernel does not support the pselect6 syscall.  */
+#undef __ASSUME_PSELECT

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

Re: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

Joseph Myers
On Thu, 27 Feb 2014, Joseph S. Myers wrote:

> This patch makes the MicroBlaze kernel-features.h undefine
> __ASSUME_PSELECT.  I'd also encourage wiring it up in the kernel (so
> you can then make this #undef conditional, and eventually obsolete
> once a recent-enough kernel is required).  I suspect it wasn't wired
> up because of the mistaken comment in asm/unistd.h "obsolete ->
> sys_pselect7" (there is no such syscall as pselect7).

It's come to my attention in this review that preadv and pwritev also
still aren't wired up in the MicroBlaze syscall table.  I'll defer a glibc
patch for the corresponding __ASSUME_* (bug 16649) until the present patch
is reviewed.  David, I'd also encourage wiring up preadv and pwritev in
the kernel - and reviewing the MicroBlaze syscall table for any more cases
where syscalls aren't wired up (whether or not the __NR_* values are
assigned), in case there are some that don't have corresponding glibc
__ASSUME_* macros and so won't be caught by review of the definitions in
glibc.

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

Ping Re: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

Joseph Myers
In reply to this post by Joseph Myers
Ping.  This patch
<https://sourceware.org/ml/libc-alpha/2014-02/msg00776.html> is pending
review, and blocking other fixes needed to move the default kernel version
to 2.6.32 (bugs 9894, 16648, 16649).

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

Ping^2 Re: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

Joseph Myers
Ping^2.  This patch
<https://sourceware.org/ml/libc-alpha/2014-02/msg00776.html> is pending
review, and blocking other fixes needed to move the default kernel version
to 2.6.32 (bugs 9894, 16648, 16649).

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

RE: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

David Holsgrove
In reply to this post by Joseph Myers
Hi Joseph,

> -----Original Message-----
> From: Joseph Myers [mailto:[hidden email]]
> Sent: Sunday, 2 March 2014 8:56 am
> To: [hidden email]; David Holsgrove
> Subject: Re: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)
>
> On Thu, 27 Feb 2014, Joseph S. Myers wrote:
>
> > This patch makes the MicroBlaze kernel-features.h undefine
> > __ASSUME_PSELECT.  I'd also encourage wiring it up in the kernel (so
> > you can then make this #undef conditional, and eventually obsolete
> > once a recent-enough kernel is required).  I suspect it wasn't wired
> > up because of the mistaken comment in asm/unistd.h "obsolete ->
> > sys_pselect7" (there is no such syscall as pselect7).
>
> It's come to my attention in this review that preadv and pwritev also
> still aren't wired up in the MicroBlaze syscall table.  I'll defer a glibc
> patch for the corresponding __ASSUME_* (bug 16649) until the present patch
> is reviewed.  David, I'd also encourage wiring up preadv and pwritev in
> the kernel - and reviewing the MicroBlaze syscall table for any more cases
> where syscalls aren't wired up (whether or not the __NR_* values are
> assigned), in case there are some that don't have corresponding glibc
> __ASSUME_* macros and so won't be caught by review of the definitions in
> glibc.
>

Thanks very much for the patch, and for pointing out that miss.

The Microblaze Kernel maintainer (Michal Simek) and I will have a chat and review
the syscall table for Microblaze. I believe Michal has a kernel patch pending to
address pselect already.

In the meantime to let you continue your review, please apply your patch to
undefine __ASSUME_PSELECT for Microblaze.

We'll update at a later stage when we have the kernel version number that adds
support.

thanks again,
David

> --
> Joseph S. Myers
> [hidden email]



Reply | Threaded
Open this post in threaded view
|

Re: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)

Michal Simek-4
In reply to this post by Joseph Myers
Hi Joseph,

On 03/12/2014 08:14 AM, David Holsgrove wrote:

> Hi Joseph,
>
>> -----Original Message-----
>> From: Joseph Myers [mailto:[hidden email]]
>> Sent: Sunday, 2 March 2014 8:56 am
>> To: [hidden email]; David Holsgrove
>> Subject: Re: Fix __ASSUME_PSELECT for MicroBlaze (bug 16642)
>>
>> On Thu, 27 Feb 2014, Joseph S. Myers wrote:
>>
>>> This patch makes the MicroBlaze kernel-features.h undefine
>>> __ASSUME_PSELECT.  I'd also encourage wiring it up in the kernel (so
>>> you can then make this #undef conditional, and eventually obsolete
>>> once a recent-enough kernel is required).  I suspect it wasn't wired
>>> up because of the mistaken comment in asm/unistd.h "obsolete ->
>>> sys_pselect7" (there is no such syscall as pselect7).
>>
>> It's come to my attention in this review that preadv and pwritev also
>> still aren't wired up in the MicroBlaze syscall table.  I'll defer a glibc
>> patch for the corresponding __ASSUME_* (bug 16649) until the present patch
>> is reviewed.  David, I'd also encourage wiring up preadv and pwritev in
>> the kernel - and reviewing the MicroBlaze syscall table for any more cases
>> where syscalls aren't wired up (whether or not the __NR_* values are
>> assigned), in case there are some that don't have corresponding glibc
>> __ASSUME_* macros and so won't be caught by review of the definitions in
>> glibc.
>>
>
> Thanks very much for the patch, and for pointing out that miss.
>
> The Microblaze Kernel maintainer (Michal Simek) and I will have a chat and review
> the syscall table for Microblaze. I believe Michal has a kernel patch pending to
> address pselect already.
I have wired them in xilinx git tree and also added missing sched_setattr and
sched_getattr and all these patches are queued for mainline kernel v3.15
and they will be available in linux-next tomorrow.

I am not sure how glibc handle this but pselect6, preadv and pwritev were
listed in unistd.h that's why there shouldn't be any problem with glibc setup.

It means it is up to you if you want to add any temporary solution to repository
when this will be available soon.

Definitely thanks for syscall reviewing.

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



signature.asc (271 bytes) Download Attachment