Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
262003a
fix missing newline in herror output
richfelker Sep 3, 2020
b8b729b
fix missing O_LARGEFILE values on x86_64, x32, and mips64
richfelker Sep 3, 2020
76f42fd
make generic bits/fcntl.h shareable with 64-bit archs
richfelker Sep 3, 2020
ffac0c2
use generic bits/fcntl.h for x86_64 and riscv64
richfelker Sep 3, 2020
d4f2981
netinet/tcp.h: update tcp_info for linux v5.5
Feb 15, 2020
d990090
add pidfd_getfd and openat2 syscall numbers from linux v5.6
Mar 31, 2020
8fca0ea
netinet/in.h: add IPPROTO_ macros from linux v5.6
Mar 31, 2020
c632161
netinet/tcp.h: update for linux v5.6
Mar 31, 2020
1ab341e
netinet/udp.h: add TCP_ENCAP_ESPINTCP from linux v5.6
Mar 31, 2020
8f4aa78
sys/prctl.h: add PR_{SET,GET}_IO_FLUSHER from linux v5.6
Mar 31, 2020
3da18e6
sys/random.h: add GRND_INSECURE from linux v5.6
Mar 31, 2020
43b640c
sched.h: add CLONE_NEWTIME from linux v5.6
Mar 31, 2020
0296baf
aarch64: add HWCAP2_ macros from linux v5.3
Mar 31, 2020
94ab68c
aarch64: add new HWCAP2_ macros from linux v5.6
Mar 31, 2020
8adf42f
sys/fanotify.h: update to linux v5.7
Jul 13, 2020
a6c302b
sys/mman.h: add MREMAP_DONTUNMAP from linux v5.7
Jul 13, 2020
616a8bf
netinet/tcp.h: update to linux v5.7
Jul 13, 2020
9b7ed97
bits/syscall.h: add __NR_faccessat2 from linux v5.8
Jul 28, 2020
6b1741a
elf.h: add .note.gnu.property related definitions
Sep 9, 2020
f035c7b
netinet/if_ether.h: add ETH_P_MRP from linux v5.8
Sep 9, 2020
55fb9a1
use new SYS_faccessat2 syscall to implement faccessat with flags
richfelker Sep 10, 2020
a5aff19
avoid set*id/setrlimit misbehavior and hang in vforked/cloned child
richfelker Sep 17, 2020
34904d8
fix fork of processes with active async io contexts
richfelker Sep 28, 2020
3cd3de6
move __abort_lock to its own file and drop pointless weak_alias trick
richfelker Sep 28, 2020
b115bee
fix missing synchronization of fork with abort
richfelker Sep 28, 2020
69a1b39
drop use of pthread_once in mutexattr kernel support tests
richfelker Sep 29, 2020
1efc8eb
fix stale lock when allocation of ctor queue fails during dlopen
richfelker Sep 29, 2020
5071670
ldso: use pthread_t rather than kernel tid to track ctor visitor
richfelker Sep 29, 2020
e1e98d8
rename fork source file
richfelker Sep 30, 2020
bd15342
implement _Fork and refactor fork using it
richfelker Sep 30, 2020
25ea9f7
fix unintended observability of SIGABRT disposition reset via sigaction
richfelker Oct 1, 2020
b7bc966
fix posix_spawn interaction with fork and abort by taking lock
richfelker Oct 1, 2020
da845d5
fix getgrouplist when nscd reports an empty list
richfelker Oct 11, 2020
47baa03
remove incorrect fflush from assert failure handler
richfelker Oct 14, 2020
6ae2568
remove unused SIGTIMER handler in timer_create
richfelker Oct 14, 2020
85e16ae
drop use of pthread_once in timer_create
richfelker Oct 14, 2020
3733766
remove long-unused struct __timer from pthread_impl.h
richfelker Oct 14, 2020
5576736
move aio implementation details to a proper internal header
richfelker Sep 28, 2020
957c276
remove unused weak definition of __tl_sync in membarrier.c
richfelker Oct 15, 2020
99d5098
update crypt_blowfish to support $2b$ prefix
Oct 18, 2020
0b87551
lift sigaction abort locking to fix posix_spawn child deadlock
richfelker Oct 24, 2020
2d0bbe6
fix pthread_cond_wait paired with with priority-inheritance mutex
richfelker Oct 26, 2020
3437e47
fix reintroduction of errno clobbering by atfork handlers
richfelker Oct 26, 2020
6ce91ef
avoid __synccall for setrlimit on kernels with prlimit syscall
richfelker Oct 27, 2020
4209a7b
fix setgroups behavior in multithreaded process
richfelker Oct 27, 2020
ccba234
ldso: notify the debugger when we're doing a dlopen
rcombs Oct 24, 2020
613ccab
refactor setxid return path to use __syscall_ret
richfelker Oct 27, 2020
f70375d
fix sem_close unmapping of still-referenced semaphore
richfelker Oct 28, 2020
7c71792
add support for SIGEV_THREAD_ID timers
jyknight Jul 1, 2019
27b2fc9
fix missing-wake regression in pthread_cond_wait
richfelker Oct 30, 2020
d91a6cf
fix erroneous pthread_cond_wait mutex waiter count logic due to typo
richfelker Oct 30, 2020
4ffa706
fix vector types in aarch64 register file structures
richfelker Nov 3, 2020
cbecda0
dlerror: don't gratuitously hold freebuf_queue lock while freeing
richfelker Nov 10, 2020
c1e5d24
drop use of getdelim/stdio in dynamic linker
richfelker Nov 11, 2020
8d37958
give libc access to its own malloc even if public malloc is interposed
richfelker Nov 11, 2020
34952fe
convert malloc use under libc-internal locks to use internal allocator
richfelker Nov 11, 2020
167390f
lift child restrictions after multi-threaded fork
richfelker Nov 11, 2020
d26e077
pthread_exit: don't __vm_wait under thread list lock
richfelker Nov 19, 2020
233bb69
protect destruction of process-shared mutexes against robust list races
richfelker Nov 19, 2020
3ab2a4e
rewrite wcsnrtombs to fix buffer overflow and other bugs
richfelker Nov 19, 2020
debbddf
fix regression in pthread_exit
richfelker Nov 20, 2020
585a0a7
explicitly prefer 64-bit/v2 zoneinfo tables
richfelker Nov 22, 2020
c17cda6
parse v3 or future-unknown zoneinfo file versions as v2+
richfelker Nov 22, 2020
e2fa720
work around linux bug in readlink syscall with zero buffer size
richfelker Nov 24, 2020
c8c3e34
fix typo in INSTALL
Nov 26, 2020
6e98924
arm fabs and sqrt: support single-precision-only fpu variants
jinliangli Nov 20, 2020
badc5bb
add missing personality values
woodruffw Nov 18, 2020
3ba370f
bits/syscall.h: add __NR_close_range from linux v5.9
Oct 24, 2020
d078f83
sys/fanotify.h: add new FAN_* macros from linux v5.9
Oct 25, 2020
67f7746
netinet/in.h: add IP_RECVERR_4884 from linux v5.9
Oct 25, 2020
c5d118e
fix segfault in lutimes when tv argument is NULL
Nov 12, 2020
d046ec9
configure: do not use obsolescent form of test -a|o
concatime Nov 2, 2020
5d464f5
fix mallocng regression in malloc_usable_size with null argument
ddcc Nov 25, 2020
29ff759
implement realpath directly instead of using procfs readlink
richfelker Nov 30, 2020
821083a
implement reallocarray
kaniini Aug 1, 2020
738c4e9
s390x: derive float_t from compiler or default to float
mhillenbrand Dec 1, 2020
50c7935
fix failure to preserve r6 in s390x asm; per ABI it is call-saved
richfelker Dec 4, 2020
56f0631
riscv64: fix inconsistent ucontext_t struct tag
ddevault Dec 5, 2020
90ff016
fix omission of non-stub pthread_mutexattr_getprotocol
richfelker Dec 7, 2020
b67d56c
drop use of pthread_once for aio thread stack size init
richfelker Dec 8, 2020
c53e9b2
fix misleading comment in strstr
richfelker Dec 9, 2020
37fcc13
lift locale lock out of internal __get_locale
richfelker Dec 9, 2020
36246b3
drop use of pthread_once in newlocale
richfelker Dec 9, 2020
1e4204d
use libc-internal malloc for newlocale/freelocale
richfelker Dec 9, 2020
db981ff
sh: fix incorrect mcontext_t member naming
kaniini Dec 12, 2020
30f5506
fix v4l2 buffer ioctl fallbacks for pre-5.6 kernels
Dec 14, 2020
3953aec
fix VIDIOC_DQEVENT (v4l2) ioctl fallback for pre-5.6 kernels
richfelker Dec 14, 2020
85e0e35
release 1.2.2
richfelker Jan 15, 2021
6f1536e
Remove ARMSUBARCH relic from configure
sorear Sep 3, 2020
b0023cf
time64: Don't make aliases to nonexistent syscalls
sorear Sep 3, 2020
2e0d719
time64: Only setrlimit if it is implemented
Oct 8, 2021
f19f235
time64: Only getrlimit/setrlimit if they exist
sorear Sep 3, 2020
416050d
time64: Only gettimeofday/settimeofday if exist
sorear Sep 3, 2020
5c62d58
Add src/internal/statx.h
sorear Sep 3, 2020
be5ba55
Only call fstatat if defined
sorear Sep 3, 2020
3f69ca0
Emulate wait4 using waitid
sorear Sep 3, 2020
8765b64
riscv: Fall back to syscall __riscv_flush_icache
sorear Sep 3, 2020
16b0f6d
riscv32: Target and subtarget detection
sorear Sep 3, 2020
30de566
riscv32: add arch kstat.h header
Oct 8, 2021
1b9c061
riscv32: add arch headers
sorear Sep 3, 2020
5e76d97
riscv32: Add fenv and math
sorear Sep 3, 2020
f97a81b
riscv32: Add dlsym
sorear Sep 3, 2020
1a79cc2
riscv32: Add jmp_buf and sigreturn
sorear Sep 3, 2020
ceda0cc
riscv32: Add thread support
sorear Sep 3, 2020
a98701c
Only call faccessat2 if defined
Oct 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ and ABI combinations:

* SuperH (SH)
* Standard ELF ABI or FDPIC ABI (shared-text without MMU)
* Little-endian by default; big-engian variant also supported
* Little-endian by default; big-endian variant also supported
* Full FPU ABI or soft-float ABI is supported, but the
single-precision-only FPU ABI is not

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.1
1.2.2
51 changes: 51 additions & 0 deletions WHATSNEW
Original file line number Diff line number Diff line change
Expand Up @@ -2236,3 +2236,54 @@ arch-specific bugs fixed:
- mips* had negated error codes for some syscalls (kernel bug)
- mips* SIGEMT was wrongly called SIGSTKFLT
- sh fesetround didn't work correctly on sh



1.2.2 release notes

major changes:
- child restrictions lifted after fork of multithreaded parent

new features:
- _Fork function (POSIX-future)
- reallocarray function (extension from OpenBSD, now widespread)
- gettid function (kernel tid as supported concept)
- SIGEV_THREAD_ID sigevent API (Linux extension)
- tcgetwinsize and tcsetwinsize functions (POSIX-future)

performance:
- faster software sqrt on archs without native sqrt instruction

compatibility:
- realpath no longer depends on procfs availability & accuracy
- time zone parser now always prefers 64-bit tables if present
- crypt_blowfish now supports $2b$ prefix
- res_query now reports errors via h_errno
- set*id and setrlimit are now safe in vforked/cloned child
- setgroups now applies to all threads
- dlopen debugger notification is improved, should work with lldb
- setrlimit no longer needs __synccall broadcast on linux 2.6.36+
- faccessat with AT_EACCESS no longer needs child process on linux 5.8+

bugs fixed:
- buffer overflow and infinite loop errors in wcsnrtombs (CVE-2020-28928)
- sem_close unmapped still-referenced semaphores
- fork of process with active aio could deadlock or crash paren
- pthread_cond_wait was broken with priority-inheritance mutex
- getgrouplist wrongly failed when nscd reported an empty list
- abort could leak modified SIGABRT disposition to fork or posix_spawn child
- regression with mallocng: malloc_usable_size(0) crashed
- readlink wrongly gave EINVAL on zero length dest buffer
- sqrtl was severely inaccurate (not correctly rounded) on ldquad archs
- assert failure wrongly flushed stdio (possible deadlock)
- MUSL_LOCPATH search was broken with multiple components
- missing newline in herror output
- possible deadlock in pthread_exit with pshared mutex or barrier usage
- pthread_mutexattr_getprotocol didn't read back protocol
- v4l2 ioctl translation for pre-time64 kernels didn't work

arch-specific bugs fixed:
- x86_64 longjmp failed to handle 0 argument reliably
- i386 __set_thread_area fallback for pre-2.6 kernels didn't work
- missing O_LARGEFILE macro value on x86_64, x32, mips64
- unpredictable s390x breakage from failure to preserve call-saved registers
10 changes: 10 additions & 0 deletions arch/aarch64/bits/hwcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,13 @@
#define HWCAP2_SVEBITPERM (1 << 4)
#define HWCAP2_SVESHA3 (1 << 5)
#define HWCAP2_SVESM4 (1 << 6)
#define HWCAP2_FLAGM2 (1 << 7)
#define HWCAP2_FRINT (1 << 8)
#define HWCAP2_SVEI8MM (1 << 9)
#define HWCAP2_SVEF32MM (1 << 10)
#define HWCAP2_SVEF64MM (1 << 11)
#define HWCAP2_SVEBF16 (1 << 12)
#define HWCAP2_I8MM (1 << 13)
#define HWCAP2_BF16 (1 << 14)
#define HWCAP2_DGH (1 << 15)
#define HWCAP2_RNG (1 << 16)
4 changes: 2 additions & 2 deletions arch/aarch64/bits/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typedef unsigned long greg_t;
typedef unsigned long gregset_t[34];

typedef struct {
long double vregs[32];
__uint128_t vregs[32];
unsigned int fpsr;
unsigned int fpcr;
} fpregset_t;
Expand All @@ -34,7 +34,7 @@ struct fpsimd_context {
struct _aarch64_ctx head;
unsigned int fpsr;
unsigned int fpcr;
long double vregs[32];
__uint128_t vregs[32];
};
struct esr_context {
struct _aarch64_ctx head;
Expand Down
4 changes: 4 additions & 0 deletions arch/aarch64/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,8 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

2 changes: 1 addition & 1 deletion arch/aarch64/bits/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ struct user_regs_struct {
};

struct user_fpsimd_struct {
long double vregs[32];
__uint128_t vregs[32];
unsigned int fpsr;
unsigned int fpcr;
};
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

#define __ARM_NR_breakpoint 0x0f0001
#define __ARM_NR_cacheflush 0x0f0002
Expand Down
6 changes: 6 additions & 0 deletions arch/generic/bits/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@
#define F_SETSIG 10
#define F_GETSIG 11

#if __LONG_MAX == 0x7fffffffL
#define F_GETLK 12
#define F_SETLK 13
#define F_SETLKW 14
#else
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#endif

#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
Expand Down
4 changes: 4 additions & 0 deletions arch/i386/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,8 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

5 changes: 5 additions & 0 deletions arch/m68k/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,8 @@
#define __NR_fsmount 432
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439
4 changes: 4 additions & 0 deletions arch/microblaze/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,8 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

4 changes: 4 additions & 0 deletions arch/mips/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,8 @@
#define __NR_fspick 4433
#define __NR_pidfd_open 4434
#define __NR_clone3 4435
#define __NR_close_range 4436
#define __NR_openat2 4437
#define __NR_pidfd_getfd 4438
#define __NR_faccessat2 4439

2 changes: 1 addition & 1 deletion arch/mips64/bits/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#define O_ASYNC 010000
#define O_DIRECT 0100000
#define O_LARGEFILE 0
#define O_LARGEFILE 020000
#define O_NOATIME 01000000
#define O_PATH 010000000
#define O_TMPFILE 020200000
Expand Down
4 changes: 4 additions & 0 deletions arch/mips64/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,8 @@
#define __NR_fspick 5433
#define __NR_pidfd_open 5434
#define __NR_clone3 5435
#define __NR_close_range 5436
#define __NR_openat2 5437
#define __NR_pidfd_getfd 5438
#define __NR_faccessat2 5439

4 changes: 4 additions & 0 deletions arch/mipsn32/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -362,4 +362,8 @@
#define __NR_fspick 6433
#define __NR_pidfd_open 6434
#define __NR_clone3 6435
#define __NR_close_range 6436
#define __NR_openat2 6437
#define __NR_pidfd_getfd 6438
#define __NR_faccessat2 6439

4 changes: 4 additions & 0 deletions arch/or1k/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -311,4 +311,8 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

4 changes: 4 additions & 0 deletions arch/powerpc/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -415,4 +415,8 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

4 changes: 4 additions & 0 deletions arch/powerpc64/bits/syscall.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,8 @@
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __NR_close_range 436
#define __NR_openat2 437
#define __NR_pidfd_getfd 438
#define __NR_faccessat2 439

21 changes: 21 additions & 0 deletions arch/riscv32/atomic_arch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#define a_barrier a_barrier
static inline void a_barrier()
{
__asm__ __volatile__ ("fence rw,rw" : : : "memory");
}

#define a_cas a_cas
static inline int a_cas(volatile int *p, int t, int s)
{
int old, tmp;
__asm__ __volatile__ (
"\n1: lr.w.aqrl %0, (%2)\n"
" bne %0, %3, 1f\n"
" sc.w.aqrl %1, %4, (%2)\n"
" bnez %1, 1b\n"
"1:"
: "=&r"(old), "=&r"(tmp)
: "r"(p), "r"((long)t), "r"((long)s)
: "memory");
return old;
}
18 changes: 18 additions & 0 deletions arch/riscv32/bits/alltypes.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#define _Addr int
#define _Int64 long long
#define _Reg int

#define __BYTE_ORDER 1234
#define __LONG_MAX 0x7fffffffL

#ifndef __cplusplus
TYPEDEF int wchar_t;
#endif

TYPEDEF int blksize_t;
TYPEDEF unsigned int nlink_t;

TYPEDEF float float_t;
TYPEDEF double double_t;

TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
File renamed without changes.
17 changes: 17 additions & 0 deletions arch/riscv32/bits/fenv.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#define FE_INVALID 16
#define FE_DIVBYZERO 8
#define FE_OVERFLOW 4
#define FE_UNDERFLOW 2
#define FE_INEXACT 1

#define FE_ALL_EXCEPT 31

#define FE_TONEAREST 0
#define FE_DOWNWARD 2
#define FE_UPWARD 3
#define FE_TOWARDZERO 1

typedef unsigned int fexcept_t;
typedef unsigned int fenv_t;

#define FE_DFL_ENV ((const fenv_t *) -1)
16 changes: 16 additions & 0 deletions arch/riscv32/bits/float.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#define FLT_EVAL_METHOD 0

#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L

#define LDBL_MANT_DIG 113
#define LDBL_MIN_EXP (-16381)
#define LDBL_MAX_EXP 16384

#define LDBL_DIG 33
#define LDBL_MIN_10_EXP (-4931)
#define LDBL_MAX_10_EXP 4932

#define DECIMAL_DIG 36
2 changes: 2 additions & 0 deletions arch/riscv32/bits/posix.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define _POSIX_V6_ILP32_OFFBIG 1
#define _POSIX_V7_ILP32_OFFBIG 1
1 change: 1 addition & 0 deletions arch/riscv32/bits/setjmp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
typedef unsigned long long __jmp_buf[19];
Loading