public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32
@ 2020-09-12 2:34 hjl.tools at gmail dot com
2020-09-12 2:35 ` [Bug libc/26606] " hjl.tools at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-12 2:34 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26606
Bug ID: 26606
Summary: [2.33 Regression] pselect is broken on x32
Product: glibc
Version: 2.33
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Target: x32
commit a92f4e6299fe0e3cb6f77e79de00817aece501ce
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Jul 6 13:27:12 2020 -0300
linux: Add time64 pselect support
changed pselect.c with
- struct
- {
- __syscall_ulong_t ss;
- __syscall_ulong_t ss_len;
- } data;
- data.ss = (__syscall_ulong_t) (uintptr_t) sigmask;
- data.ss_len = __NSIG_BYTES;
+#ifndef __NR_pselect6_time64
+# define __NR_pselect6_time64 __NR_pselect6
+#endif
+ int r;
+ if (supports_time64 ())
+ {
+ r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds,
+ timeout,
+ ((__syscall_ulong_t[]){ (uintptr_t) sigmask,
+ __NSIG_BYTES }));
+ if (r == 0 || errno != ENOSYS)
+ return r;
+
+ mark_time64_unsupported ();
+ }
- return SYSCALL_CANCEL (pselect6, nfds, readfds, writefds, exceptfds,
- timeout, &data);
x32 has
# undef ARGIFY
/* Enforce zero-extension for pointers and array system call arguments.
For integer types, extend to int64_t (the full register) using a
regular cast, resulting in zero or sign extension based on the
signedness of the original type. */
# define ARGIFY(X) \
({ \
_Pragma ("GCC diagnostic push"); \
_Pragma ("GCC diagnostic ignored \"-Wpointer-to-int-cast\""); \
(__builtin_classify_type (X) == 5 \
? (uintptr_t) (X) : (int64_t) (X)); \
_Pragma ("GCC diagnostic pop"); \
})
GCC now generates
movl %fs:12,%eax
movslq %edi, %rdi
testl %eax, %eax
jne .L3
leal 64(%rsp), %r9d
movl $1073742094, %eax
syscall
instead of
movq %r9, 64(%rsp) <<< Missing sigmask
movq $8, 72(%rsp) <<< Missing __NSIG_BYTES
movl %fs:12,%eax
testl %eax, %eax
jne .L3
movslq %edi, %rdi
leal 64(%rsp), %r9d
movl $1073742094, %eax
syscall
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/26606] [2.33 Regression] pselect is broken on x32
2020-09-12 2:34 [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
@ 2020-09-12 2:35 ` hjl.tools at gmail dot com
2020-09-12 2:53 ` [Bug libc/26606] [2.33 Regression] pselect is broken hjl.tools at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-12 2:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26606
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adhemerval.zanella at linaro dot o
| |rg
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/26606] [2.33 Regression] pselect is broken
2020-09-12 2:34 [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
2020-09-12 2:35 ` [Bug libc/26606] " hjl.tools at gmail dot com
@ 2020-09-12 2:53 ` hjl.tools at gmail dot com
2020-09-12 2:57 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-12 2:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26606
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|x32 |
Summary|[2.33 Regression] pselect |[2.33 Regression] pselect
|is broken on x32 |is broken
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
x86-64 is also missing sigmask and __NSIG_BYTES. I suspect that many
targets are broken.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/26606] [2.33 Regression] pselect is broken
2020-09-12 2:34 [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
2020-09-12 2:35 ` [Bug libc/26606] " hjl.tools at gmail dot com
2020-09-12 2:53 ` [Bug libc/26606] [2.33 Regression] pselect is broken hjl.tools at gmail dot com
@ 2020-09-12 2:57 ` hjl.tools at gmail dot com
2020-09-12 2:57 ` [Bug libc/26606] [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
2020-09-15 12:03 ` hjl.tools at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-12 2:57 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26606
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #1)
> x86-64 is also missing sigmask and __NSIG_BYTES. I suspect that many
> targets are broken.
x86-64 is OK.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/26606] [2.33 Regression] pselect is broken on x32
2020-09-12 2:34 [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
` (2 preceding siblings ...)
2020-09-12 2:57 ` hjl.tools at gmail dot com
@ 2020-09-12 2:57 ` hjl.tools at gmail dot com
2020-09-15 12:03 ` hjl.tools at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-12 2:57 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26606
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x32
Summary|[2.33 Regression] pselect |[2.33 Regression] pselect
|is broken |is broken on x32
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/26606] [2.33 Regression] pselect is broken on x32
2020-09-12 2:34 [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
` (3 preceding siblings ...)
2020-09-12 2:57 ` [Bug libc/26606] [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
@ 2020-09-15 12:03 ` hjl.tools at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-15 12:03 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26606
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |2.33
Resolution|--- |FIXED
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed by
commit 4b564f347fdcd021dbb6c1ada98a18249d9e888a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Sep 11 19:36:12 2020 -0700
pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-15 12:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 2:34 [Bug libc/26606] New: [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
2020-09-12 2:35 ` [Bug libc/26606] " hjl.tools at gmail dot com
2020-09-12 2:53 ` [Bug libc/26606] [2.33 Regression] pselect is broken hjl.tools at gmail dot com
2020-09-12 2:57 ` hjl.tools at gmail dot com
2020-09-12 2:57 ` [Bug libc/26606] [2.33 Regression] pselect is broken on x32 hjl.tools at gmail dot com
2020-09-15 12:03 ` hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).