* [hurd,commited 3/3] hurd: Fix renameat2 error
2019-12-01 18:53 [hurd,commited 0/3] fixes for hurd port Samuel Thibault
@ 2019-12-01 18:53 ` Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 2/3] hurd: make strerror(0) coherent with other ports Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 1/3] hurd: Fix ld.so link Samuel Thibault
2 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2019-12-01 18:53 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
renameat2 has to exclude RENAME_EXCHANGE | RENAME_NOREPLACE with EINVAL,
as tested by stdio-common/tst-renameat2.
---
sysdeps/mach/hurd/renameat2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sysdeps/mach/hurd/renameat2.c b/sysdeps/mach/hurd/renameat2.c
index 7892e9ca9e..9e8f39d540 100644
--- a/sysdeps/mach/hurd/renameat2.c
+++ b/sysdeps/mach/hurd/renameat2.c
@@ -30,6 +30,8 @@ __renameat2 (int oldfd, const char *old, int newfd, const char *new,
const char *oldname, *newname;
int excl = 0;
+ if ((flags & (RENAME_EXCHANGE | RENAME_NOREPLACE)) == (RENAME_EXCHANGE | RENAME_NOREPLACE))
+ return __hurd_fail (EINVAL);
if (flags & (RENAME_EXCHANGE | RENAME_WHITEOUT))
return __hurd_fail (ENOSYS);
if (flags & RENAME_NOREPLACE)
--
2.24.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [hurd,commited 0/3] fixes for hurd port
@ 2019-12-01 18:53 Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 3/3] hurd: Fix renameat2 error Samuel Thibault
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Samuel Thibault @ 2019-12-01 18:53 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
Samuel Thibault (3):
hurd: Fix ld.so link
hurd: make strerror(0) coherent with other ports
hurd: Fix renameat2 error
mach/err_kern.sub | 2 +-
sysdeps/mach/hurd/Versions | 4 ++--
sysdeps/mach/hurd/dl-sysdep.c | 15 ++++++++++++---
sysdeps/mach/hurd/i386/ld.abilist | 1 +
sysdeps/mach/hurd/i386/libc.abilist | 1 +
sysdeps/mach/hurd/i386/localplt.data | 1 +
sysdeps/mach/hurd/renameat2.c | 2 ++
7 files changed, 20 insertions(+), 6 deletions(-)
--
2.24.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [hurd,commited 1/3] hurd: Fix ld.so link
2019-12-01 18:53 [hurd,commited 0/3] fixes for hurd port Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 3/3] hurd: Fix renameat2 error Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 2/3] hurd: make strerror(0) coherent with other ports Samuel Thibault
@ 2019-12-01 18:53 ` Samuel Thibault
2019-12-01 18:58 ` Florian Weimer
2 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2019-12-01 18:53 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
Since a2e8aa0d9ea6 ("Block signals during the initial part of dlopen") dl_open
uses sigprocmask, so we need a stub implementation.
---
sysdeps/mach/hurd/Versions | 4 ++--
sysdeps/mach/hurd/dl-sysdep.c | 15 ++++++++++++---
sysdeps/mach/hurd/i386/ld.abilist | 1 +
sysdeps/mach/hurd/i386/libc.abilist | 1 +
sysdeps/mach/hurd/i386/localplt.data | 1 +
5 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index f69d5fef67..cd148c820f 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -1,7 +1,7 @@
libc {
GLIBC_2.0 {
# functions with a weak definition in the dynamic linker
- __access; __getcwd; __mmap;
+ __access; __getcwd; __mmap; __sigprocmask;
}
GLIBC_2.2.6 {
# functions with a weak definition in the dynamic linker
@@ -26,7 +26,7 @@ ld {
__mmap; __open; __read; __sbrk; __strtoul_internal;
__write; __writev; __xstat64; __fxstat64;
_exit; _hurd_intr_rpc_mach_msg;
- abort;
+ abort; __sigprocmask;
}
GLIBC_2.2 {
# functions that must be shared with libc
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 719d603f44..fcbbe6a43a 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -264,13 +264,14 @@ _dl_sysdep_start_cleanup (void)
__mach_port_deallocate (__mach_task_self (), __mach_task_self_);
}
\f
-/* Minimal open/close/mmap implementation sufficient for initial loading of
+/* Minimal open/close/mmap/etc. implementation sufficient for initial loading of
shared libraries. These are weak definitions so that when the
dynamic linker re-relocates itself to be user-visible (for -ldl),
it will get the user's definition (i.e. usually libc's).
- They also need to be set in the ld section of sysdeps/mach/hurd/Versions, to
- be overridable, and in libc.abilist and ld.abilist to be checked. */
+ They also need to be set in the libc and ld section of
+ sysdeps/mach/hurd/Versions, to be overridable, and in libc.abilist and
+ ld.abilist to be checked. */
/* This macro checks that the function does not get renamed to be hidden: we do
need these to be overridable by libc's. */
@@ -674,6 +675,14 @@ strong_alias (abort, __GI___chk_fail)
strong_alias (abort, __GI___fortify_fail)
strong_alias (abort, __GI___assert_fail)
strong_alias (abort, __GI___assert_perror_fail)
+
+check_no_hidden(__sigprocmask);
+int weak_function
+__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
+{
+ /* We do not have signals yet at this stage. */
+ return 0;
+}
\f
/* This function is called by interruptible RPC stubs. For initial
dynamic linking, just use the normal mach_msg. Since this defn is
diff --git a/sysdeps/mach/hurd/i386/ld.abilist b/sysdeps/mach/hurd/i386/ld.abilist
index c76b913486..09ff013c1f 100644
--- a/sysdeps/mach/hurd/i386/ld.abilist
+++ b/sysdeps/mach/hurd/i386/ld.abilist
@@ -8,6 +8,7 @@ GLIBC_2.2.6 __open F
GLIBC_2.2.6 __open64 F
GLIBC_2.2.6 __read F
GLIBC_2.2.6 __sbrk F
+GLIBC_2.2.6 __sigprocmask F
GLIBC_2.2.6 __strtoul_internal F
GLIBC_2.2.6 __write F
GLIBC_2.2.6 __writev F
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 7c2cb2b05a..54270e4ce2 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -426,6 +426,7 @@ GLIBC_2.2.6 __signbit F
GLIBC_2.2.6 __signbitf F
GLIBC_2.2.6 __signbitl F
GLIBC_2.2.6 __sigpause F
+GLIBC_2.2.6 __sigprocmask F
GLIBC_2.2.6 __sigsetjmp F
GLIBC_2.2.6 __sigsuspend F
GLIBC_2.2.6 __stpcpy F
diff --git a/sysdeps/mach/hurd/i386/localplt.data b/sysdeps/mach/hurd/i386/localplt.data
index a5b5241b84..1aef944337 100644
--- a/sysdeps/mach/hurd/i386/localplt.data
+++ b/sysdeps/mach/hurd/i386/localplt.data
@@ -40,6 +40,7 @@ ld.so: __sbrk
ld.so: __strtoul_internal
#ld.so: _exit
ld.so: abort
+ld.so: __sigprocmask
ld.so: _hurd_intr_rpc_mach_msg
ld.so: __errno_location
# rtld_hidden is currently disabled to avoid having to special-case the
--
2.24.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [hurd,commited 2/3] hurd: make strerror(0) coherent with other ports
2019-12-01 18:53 [hurd,commited 0/3] fixes for hurd port Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 3/3] hurd: Fix renameat2 error Samuel Thibault
@ 2019-12-01 18:53 ` Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 1/3] hurd: Fix ld.so link Samuel Thibault
2 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2019-12-01 18:53 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
Some tests assume that it is "Success", and it is not necessarily
related to the kernel anyway.
---
mach/err_kern.sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mach/err_kern.sub b/mach/err_kern.sub
index ab00ae40f2..42c38ebd59 100644
--- a/mach/err_kern.sub
+++ b/mach/err_kern.sub
@@ -50,7 +50,7 @@
*/
static char * err_codes_kern[] = {
- "(os/kern) successful",
+ "Success",
"(os/kern) invalid address",
"(os/kern) protection failure",
"(os/kern) no space available",
--
2.24.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [hurd,commited 1/3] hurd: Fix ld.so link
2019-12-01 18:53 ` [hurd,commited 1/3] hurd: Fix ld.so link Samuel Thibault
@ 2019-12-01 18:58 ` Florian Weimer
2019-12-01 19:02 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: Florian Weimer @ 2019-12-01 18:58 UTC (permalink / raw)
To: Samuel Thibault; +Cc: libc-alpha, commit-hurd
* Samuel Thibault:
> diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
> index f69d5fef67..cd148c820f 100644
> --- a/sysdeps/mach/hurd/Versions
> +++ b/sysdeps/mach/hurd/Versions
> @@ -1,7 +1,7 @@
> libc {
> GLIBC_2.0 {
> # functions with a weak definition in the dynamic linker
> - __access; __getcwd; __mmap;
> + __access; __getcwd; __mmap; __sigprocmask;
> }
I think I missed the libc update in the patch I posted. But this is
wrong, you need to add it to GLIBC_PRIVATE for both libc and ld.
Then there will be no abilist update, as expected.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [hurd,commited 1/3] hurd: Fix ld.so link
2019-12-01 18:58 ` Florian Weimer
@ 2019-12-01 19:02 ` Samuel Thibault
2019-12-01 19:16 ` Florian Weimer
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2019-12-01 19:02 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha, commit-hurd
Florian Weimer, le dim. 01 déc. 2019 19:58:51 +0100, a ecrit:
> > diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
> > index f69d5fef67..cd148c820f 100644
> > --- a/sysdeps/mach/hurd/Versions
> > +++ b/sysdeps/mach/hurd/Versions
> > @@ -1,7 +1,7 @@
> > libc {
> > GLIBC_2.0 {
> > # functions with a weak definition in the dynamic linker
> > - __access; __getcwd; __mmap;
> > + __access; __getcwd; __mmap; __sigprocmask;
> > }
>
> I think I missed the libc update in the patch I posted. But this is
> wrong, you need to add it to GLIBC_PRIVATE for both libc and ld.
> Then there will be no abilist update, as expected.
Then it's not only for that symbol, but others from dl-sysdep.c: I just
followed what was done for the others.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [hurd,commited 1/3] hurd: Fix ld.so link
2019-12-01 19:02 ` Samuel Thibault
@ 2019-12-01 19:16 ` Florian Weimer
2019-12-01 20:05 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: Florian Weimer @ 2019-12-01 19:16 UTC (permalink / raw)
To: Samuel Thibault; +Cc: libc-alpha, commit-hurd
* Samuel Thibault:
> Florian Weimer, le dim. 01 déc. 2019 19:58:51 +0100, a ecrit:
>> > diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
>> > index f69d5fef67..cd148c820f 100644
>> > --- a/sysdeps/mach/hurd/Versions
>> > +++ b/sysdeps/mach/hurd/Versions
>> > @@ -1,7 +1,7 @@
>> > libc {
>> > GLIBC_2.0 {
>> > # functions with a weak definition in the dynamic linker
>> > - __access; __getcwd; __mmap;
>> > + __access; __getcwd; __mmap; __sigprocmask;
>> > }
>>
>> I think I missed the libc update in the patch I posted. But this is
>> wrong, you need to add it to GLIBC_PRIVATE for both libc and ld.
>> Then there will be no abilist update, as expected.
>
> Then it's not only for that symbol, but others from dl-sysdep.c: I just
> followed what was done for the others.
That may be so, but we cannot change the symbol sets for historic
releases. If you really want to use a non-private symbol, it would
have to be at version GLIBC_2.31. But given that it's an internal
interface, GLIBC_PRIVATE is the proper choice.
(Initially, GLIBC_PRIVATE was not used for internal symbols.)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [hurd,commited 1/3] hurd: Fix ld.so link
2019-12-01 19:16 ` Florian Weimer
@ 2019-12-01 20:05 ` Samuel Thibault
0 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2019-12-01 20:05 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha, commit-hurd
Florian Weimer, le dim. 01 déc. 2019 20:16:52 +0100, a ecrit:
> That may be so, but we cannot change the symbol sets for historic
> releases.
Ah, right, ok, now fixed.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-12-01 20:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01 18:53 [hurd,commited 0/3] fixes for hurd port Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 3/3] hurd: Fix renameat2 error Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 2/3] hurd: make strerror(0) coherent with other ports Samuel Thibault
2019-12-01 18:53 ` [hurd,commited 1/3] hurd: Fix ld.so link Samuel Thibault
2019-12-01 18:58 ` Florian Weimer
2019-12-01 19:02 ` Samuel Thibault
2019-12-01 19:16 ` Florian Weimer
2019-12-01 20:05 ` Samuel Thibault
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).