logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: c5a61c5054fc50d257c5d3e808a3dcebb8647581
parent b51f440d5ed15316633824c6a6adc3ec35578bb0
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  4 Dec 2020 13:14:36 -0800

musl: Update to 1.2.2

Diffstat:

M.gitmodules1-
Mpkg/musl/base.lua11+++++++++++
Dpkg/musl/patch/0001-avoid-set-id-setrlimit-misbehavior-and-hang-in-vfork.patch49-------------------------------------------------
Dpkg/musl/patch/0002-add-support-for-SIGEV_THREAD_ID-timers.patch77-----------------------------------------------------------------------------
Mpkg/musl/ver2+-
Mpkg/musl/x86_64.lua1-
6 files changed, 12 insertions(+), 129 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -198,7 +198,6 @@ [submodule "pkg/musl/src"] path = pkg/musl/src url = git://git.musl-libc.org/musl - ignore = all [submodule "pkg/ncompress/src"] path = pkg/ncompress/src url = https://github.com/vapier/ncompress.git diff --git a/pkg/musl/base.lua b/pkg/musl/base.lua @@ -149,6 +149,7 @@ return { 'src/errno/strerror.c', 'src/exit/_Exit.c', 'src/exit/abort.c', + 'src/exit/abort_lock.c', 'src/exit/assert.c', 'src/exit/at_quick_exit.c', 'src/exit/atexit.c', @@ -231,6 +232,7 @@ return { 'src/linux/flock.c', 'src/linux/getdents.c', 'src/linux/getrandom.c', + 'src/linux/gettid.c', 'src/linux/inotify.c', 'src/linux/ioperm.c', 'src/linux/iopl.c', @@ -303,9 +305,13 @@ return { 'src/locale/wcscoll.c', 'src/locale/wcsxfrm.c', 'src/malloc/calloc.c', + 'src/malloc/free.c', + 'src/malloc/libc_calloc.c', 'src/malloc/lite_malloc.c', 'src/malloc/memalign.c', 'src/malloc/posix_memalign.c', + 'src/malloc/realloc.c', + 'src/malloc/reallocarray.c', 'src/malloc/replaced.c', 'src/math/__cos.c', 'src/math/__cosdf.c', @@ -320,6 +326,7 @@ return { 'src/math/__math_divzerof.c', 'src/math/__math_invalid.c', 'src/math/__math_invalidf.c', + 'src/math/__math_invalidl.c', 'src/math/__math_oflow.c', 'src/math/__math_oflowf.c', 'src/math/__math_uflow.c', @@ -523,6 +530,7 @@ return { 'src/math/sinhl.c', 'src/math/sinl.c', 'src/math/sqrt.c', + 'src/math/sqrt_data.c', 'src/math/sqrtf.c', 'src/math/sqrtl.c', 'src/math/tan.c', @@ -727,6 +735,7 @@ return { 'src/prng/random.c', 'src/prng/seed48.c', 'src/prng/srand48.c', + 'src/process/_Fork.c', 'src/process/execl.c', 'src/process/execle.c', 'src/process/execlp.c', @@ -1073,8 +1082,10 @@ return { 'src/termios/tcflush.c', 'src/termios/tcgetattr.c', 'src/termios/tcgetsid.c', + 'src/termios/tcgetwinsize.c', 'src/termios/tcsendbreak.c', 'src/termios/tcsetattr.c', + 'src/termios/tcsetwinsize.c', 'src/thread/__lock.c', 'src/thread/__set_thread_area.c', 'src/thread/__syscall_cp.c', diff --git a/pkg/musl/patch/0001-avoid-set-id-setrlimit-misbehavior-and-hang-in-vfork.patch b/pkg/musl/patch/0001-avoid-set-id-setrlimit-misbehavior-and-hang-in-vfork.patch @@ -1,49 +0,0 @@ -From 1fce9805c251a187b75bd527cad0b1e1021c296b Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 17 Sep 2020 15:09:46 -0400 -Subject: [PATCH] avoid set*id/setrlimit misbehavior and hang in vforked/cloned - child - -taking the deprecated/dropped vfork spec strictly, doing pretty much -anything but execve in the child is wrong and undefined. however, -these are commonly needed operations to setup the child state before -exec, and historical implementations tolerated them. - -for single-threaded parents, these operations already worked as -expected in the vforked child. however, due to the need for __synccall -to synchronize id/resource limit changes among all threads, calling -these functions in the vforked child of a multithreaded parent caused -a misdirected broadcast signaling of all threads in the parent. these -signals could kill the parent entirely if the synccall signal handler -had never been installed in the parent, or could be ignored if it had, -or could signal/kill one or more utterly wrong processes if the parent -already terminated (due to vfork semantics, only possible via fatal -signal) and the parent tids were recycled. in any case, the expected -number of semaphore posts would never happen, so the child would -permanently hang (with all signals blocked) waiting for them. - -to mitigate this, and also make the normal usage case work as -intended, treat the condition where the caller's actual tid does not -match the tid in its thread structure as single-threaded, and bypass -the entire synccall broadcast operation. ---- - src/thread/synccall.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/thread/synccall.c b/src/thread/synccall.c -index 648a6ad4..d58c851f 100644 ---- a/src/thread/synccall.c -+++ b/src/thread/synccall.c -@@ -63,7 +63,8 @@ void __synccall(void (*func)(void *), void *ctx) - sem_init(&target_sem, 0, 0); - sem_init(&caller_sem, 0, 0); - -- if (!libc.threads_minus_1) goto single_threaded; -+ if (!libc.threads_minus_1 || __syscall(SYS_gettid) != self->tid) -+ goto single_threaded; - - callback = func; - context = ctx; --- -2.28.0 - diff --git a/pkg/musl/patch/0002-add-support-for-SIGEV_THREAD_ID-timers.patch b/pkg/musl/patch/0002-add-support-for-SIGEV_THREAD_ID-timers.patch @@ -1,77 +0,0 @@ -From fd3bc4cba48c8da106618fe9c025a9ebbb0da7be Mon Sep 17 00:00:00 2001 -From: James Y Knight <jyknight@google.com> -Date: Sun, 30 Jun 2019 21:55:20 -0400 -Subject: [PATCH] add support for SIGEV_THREAD_ID timers - -This is like SIGEV_SIGNAL, but targeted to a particular thread's -tid, rather than the process. ---- - include/signal.h | 16 +++++++++++++--- - src/time/timer_create.c | 8 ++++++-- - 2 files changed, 19 insertions(+), 5 deletions(-) - -diff --git a/include/signal.h b/include/signal.h -index fbdf667b..9ed929e4 100644 ---- a/include/signal.h -+++ b/include/signal.h -@@ -180,14 +180,24 @@ struct sigevent { - union sigval sigev_value; - int sigev_signo; - int sigev_notify; -- void (*sigev_notify_function)(union sigval); -- pthread_attr_t *sigev_notify_attributes; -- char __pad[56-3*sizeof(long)]; -+ union { -+ char __pad[64 - 2*sizeof(int) - sizeof(union sigval)]; -+ pid_t sigev_notify_thread_id; -+ struct { -+ void (*sigev_notify_function)(union sigval); -+ pthread_attr_t *sigev_notify_attributes; -+ } __sev_thread; -+ } __sev_fields; - }; - -+#define sigev_notify_thread_id __sev_fields.sigev_notify_thread_id -+#define sigev_notify_function __sev_fields.__sev_thread.sigev_notify_function -+#define sigev_notify_attributes __sev_fields.__sev_thread.sigev_notify_attributes -+ - #define SIGEV_SIGNAL 0 - #define SIGEV_NONE 1 - #define SIGEV_THREAD 2 -+#define SIGEV_THREAD_ID 4 - - int __libc_current_sigrtmin(void); - int __libc_current_sigrtmax(void); -diff --git a/src/time/timer_create.c b/src/time/timer_create.c -index 455d49fc..4015673f 100644 ---- a/src/time/timer_create.c -+++ b/src/time/timer_create.c -@@ -83,11 +83,15 @@ int timer_create(clockid_t clk, struct sigevent *restrict evp, timer_t *restrict - switch (evp ? evp->sigev_notify : SIGEV_SIGNAL) { - case SIGEV_NONE: - case SIGEV_SIGNAL: -+ case SIGEV_THREAD_ID: - if (evp) { - ksev.sigev_value = evp->sigev_value; - ksev.sigev_signo = evp->sigev_signo; - ksev.sigev_notify = evp->sigev_notify; -- ksev.sigev_tid = 0; -+ if (evp->sigev_notify == SIGEV_THREAD_ID) -+ ksev.sigev_tid = evp->sigev_notify_thread_id; -+ else -+ ksev.sigev_tid = 0; - ksevp = &ksev; - } - if (syscall(SYS_timer_create, clk, ksevp, &timerid) < 0) -@@ -115,7 +119,7 @@ int timer_create(clockid_t clk, struct sigevent *restrict evp, timer_t *restrict - - ksev.sigev_value.sival_ptr = 0; - ksev.sigev_signo = SIGTIMER; -- ksev.sigev_notify = 4; /* SIGEV_THREAD_ID */ -+ ksev.sigev_notify = SIGEV_THREAD_ID; - ksev.sigev_tid = td->tid; - if (syscall(SYS_timer_create, clk, &ksev, &timerid) < 0) - timerid = -1; --- -2.29.0 - diff --git a/pkg/musl/ver b/pkg/musl/ver @@ -1 +1 @@ -1.2.1 r2 +1.2.2 r0 diff --git a/pkg/musl/x86_64.lua b/pkg/musl/x86_64.lua @@ -52,7 +52,6 @@ return { }, bits={ -- <cd src/arch/x86_64/bits && printf "\t\t'%s',\n" *.h - 'fcntl.h', 'fenv.h', 'float.h', 'io.h',