Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
df18f29
math: move x86_64 fabs, fabsf to C with inline asm
amonakov Jan 5, 2020
23a9046
math: move x87-family fabs functions to C with inline asm
amonakov Jan 6, 2020
37669d4
math: move trivial x86-family sqrt functions to C with inline asm
amonakov Jan 6, 2020
223a309
math: move i386 sqrtf to C with inline asm
amonakov Jan 6, 2020
a9bb6b2
math: move i386 sqrt to C with inline asm
amonakov Jan 7, 2020
2d82911
math: move x86_64 (l)lrint(f) functions to C with inline asm
amonakov Jan 10, 2020
15775ea
math: move x87-family lrint functions to C with inline asm
amonakov Jan 11, 2020
d5c08af
math: move x87-family rint functions to C with inline asm
amonakov Jan 14, 2020
81c6899
math: move x87-family remainder functions to C with inline asm
amonakov Jan 14, 2020
d32b53c
math: move x87-family fmod functions to C with inline asm
amonakov Jan 15, 2020
77fb647
math: add x86_64 remquol
amonakov Jan 16, 2020
1d848a6
fix undefined behavior in scanf core
richfelker Apr 17, 2020
5288e59
fix possible access to uninitialized memory in shgetc (via scanf)
richfelker Apr 17, 2020
2a76c86
combine two calls to memset in fmemopen
richfelker Apr 17, 2020
e0f6fbd
remove spurious repeated semicolon in fmemopen
richfelker Apr 17, 2020
d866a8a
move __string_read into vsscanf source file
richfelker Apr 17, 2020
473f8ff
fix sh fesetround failure to clear old mode
richfelker Apr 18, 2020
39063cd
fix undefined behavior in wcsto[ld] family functions
richfelker Apr 24, 2020
89d5bd7
remove arm (32-bit) support for vdso clock_gettime
richfelker Apr 26, 2020
ba4d957
fix undefined behavior from signed overflow in strstr and memmem
richfelker May 1, 2020
779b476
set AD bit in dns queries, suppress for internal use
richfelker May 19, 2020
f51c8d7
fix handling of errors resolving one of paired A+AAAA query
richfelker May 19, 2020
059c752
fix return value of res_send, res_query on errors from nameserver
richfelker May 19, 2020
a1eddb2
handle possibility that SIGEMT replaces SIGSTKFLT in strsignal
richfelker May 21, 2020
6dd6766
fix incorrect SIGSTKFLT on all mips archs
richfelker May 21, 2020
6aacbb7
reorder thread list unlink in pthread_exit after all locks
richfelker May 22, 2020
6043065
don't use libc.threads_minus_1 as relaxed atomic for skipping locks
richfelker May 22, 2020
de3ed18
cut down size of some libc struct members
richfelker May 22, 2020
11060c4
restore lock-skipping for processes that return to single-threaded state
richfelker May 22, 2020
4770005
suppress unwanted warnings when configuring with clang
richfelker Jun 2, 2020
4d78fc5
fix unbounded heap expansion race in malloc
richfelker Jun 2, 2020
38ce1dc
fix broken time64 clock_adjtime
richfelker Jun 3, 2020
dbebd3e
always use time64 syscall first for clock_adjtime
richfelker Jun 3, 2020
0ecc5e8
reformat clock_adjtime with always-true condition removed
richfelker Jun 3, 2020
3ab8b15
move declaration of interfaces between malloc and ldso to dynlink.h
richfelker Jun 3, 2020
907e463
move malloc_impl.h from src/internal to src/malloc
richfelker Jun 3, 2020
3195b7a
rewrite bump allocator to fix corner cases, decouple from expand_heap
richfelker Jun 3, 2020
ee4c742
remove stale document from malloc src directory
richfelker Jun 3, 2020
3244d64
rename aligned_alloc source file
richfelker Jun 3, 2020
33d1a73
reverse dependency order of memalign and aligned_alloc
richfelker Jun 3, 2020
b30b9ec
rename aligned_alloc source file back to its proper name
richfelker Jun 3, 2020
6118220
rename memalign source file back to its proper name
richfelker Jun 3, 2020
d46d977
move __expand_heap into malloc.c
richfelker Jun 3, 2020
a453ed5
move oldmalloc to its own directory under src/malloc
richfelker Jun 3, 2020
36754b6
switch to a common calloc implementation
richfelker Jun 10, 2020
f3752e3
move __malloc_replaced to a top-level malloc file
richfelker Jun 11, 2020
4c239d1
reintroduce calloc elison of memset for direct-mmapped allocations
richfelker Jun 11, 2020
b6064d1
have ldso track replacement of aligned_alloc
richfelker Jun 11, 2020
8a48f26
only disable aligned_alloc if malloc was replaced but it wasn't
richfelker Jun 11, 2020
f7e62dc
add fallback a_clz_32 implementation
richfelker Jun 11, 2020
758023b
fix invalid use of access function in nftw
richfelker Jun 15, 2020
527a0c0
fix memset overflow in oldmalloc race fix overhaul
richfelker Jun 16, 2020
2ffdd98
only use memcpy realloc to shrink if an exact-sized free chunk exists
richfelker Jun 16, 2020
17a9f88
clear need_locks in child after fork
richfelker Jun 21, 2020
4c450b3
add big-endian support to ARM assembler memcpy
armcc Jan 21, 2020
b1ee0c8
add optimized aarch64 memcpy and memset
richfelker Jun 26, 2020
4d6e737
add glue code for mallocng merge
richfelker Jun 29, 2020
d6a76ef
import mallocng
richfelker Jun 30, 2020
3853388
add malloc implementation selection to configure
richfelker Jun 30, 2020
8fac757
make mallocng the default malloc implementation
richfelker Jun 30, 2020
05fa53b
vfscanf: fix possible invalid free due to uninitialized variable use
Jul 1, 2020
07ff881
fix C implementation of a_clz_32
richfelker Jul 5, 2020
9537dae
make thread killlock async-signal-safe for pthread_kill
richfelker Jul 6, 2020
a3a65f3
fix async-cancel-safety of pthread_cancel
richfelker Jul 6, 2020
2114a3f
getentropy: fix UB if len==0
beevvy Jul 16, 2020
648805a
add m68k sqrtl using native instruction
richfelker Aug 3, 2020
dde3277
release 1.2.1
richfelker Aug 4, 2020
a1f5cf3
in hosts file lookups, use only first match for canonical name
richfelker Aug 4, 2020
155e1fa
in hosts file lookups, honor first canonical name regardless of family
richfelker Aug 6, 2020
c208336
math: new software sqrt
Jun 13, 2020
bfd77d2
math: new software sqrtf
Jun 12, 2020
dc455e9
math: add __math_invalidl
Jun 29, 2020
b01ea2a
math: new software sqrtl
Jun 14, 2020
1574627
prefer new socket syscalls, fallback to SYS_socketcall only if needed
richfelker Aug 9, 2020
d167ed3
setjmp: fix x86-64 longjmp argument adjustment
amonakov Aug 11, 2020
694e3ca
setjmp: avoid useless REX-prefix on xor %eax, %eax
amonakov Aug 11, 2020
94875e1
setjmp: optimize x86 longjmp epilogues
amonakov Aug 11, 2020
65725d7
setjmp: optimize longjmp prologues
amonakov Aug 12, 2020
c51d316
aarch64: fix setjmp return value
Aug 12, 2020
70f05c5
add gettid function
richfelker Aug 18, 2020
fefe3aa
fix MUSL_LOCPATH search
richfelker Aug 22, 2020
24694b3
add tcgetwinsize and tcsetwinsize functions, move struct winsize
richfelker Aug 24, 2020
4180c2e
make h_errno thread-local
richfelker Aug 25, 2020
77c9129
report res_query failures, including nxdomain/nodata, via h_errno
richfelker Aug 25, 2020
90f13b8
deduplicate TP_ADJ logic out of each arch, replace with TP_OFFSET
richfelker Aug 25, 2020
7284830
deduplicate __pthread_self thread pointer adjustment out of each arch
richfelker Aug 25, 2020
47f84dd
remove redundant pthread struct members repeated for layout purposes
richfelker Aug 25, 2020
78aa808
configure: add further -Werror=... options to detected CFLAGS
richfelker Aug 27, 2020
8193782
configure: use additive warnings instead of subtracting from -Wall
richfelker Aug 28, 2020
063dde6
configure: enable warnings by default
richfelker Aug 28, 2020
cdaca1e
fix regression with applications that expect struct winsize in ioctl.h
richfelker Aug 30, 2020
cbafd78
clean up overinclusion in files using TIOCGWINSZ
richfelker Aug 30, 2020
b54bcf9
restore h_errno ABI compatibility with ancient binaries
richfelker Aug 31, 2020
4f24654
fix i386 __set_thread_area fallback
richfelker Aug 31, 2020
0e81c82
fix missing newline in herror output
richfelker Sep 3, 2020
503c808
fix missing O_LARGEFILE values on x86_64, x32, and mips64
richfelker Sep 3, 2020
1ff05e6
make generic bits/fcntl.h shareable with 64-bit archs
richfelker Sep 3, 2020
7ec23ce
use generic bits/fcntl.h for x86_64 and riscv64
richfelker Sep 3, 2020
dfd54be
netinet/tcp.h: update tcp_info for linux v5.5
Feb 15, 2020
98d0efa
add pidfd_getfd and openat2 syscall numbers from linux v5.6
Mar 31, 2020
163b734
netinet/in.h: add IPPROTO_ macros from linux v5.6
Mar 31, 2020
93882b3
netinet/tcp.h: update for linux v5.6
Mar 31, 2020
bcd7c15
netinet/udp.h: add TCP_ENCAP_ESPINTCP from linux v5.6
Mar 31, 2020
d659ca0
sys/prctl.h: add PR_{SET,GET}_IO_FLUSHER from linux v5.6
Mar 31, 2020
bc5c24b
sys/random.h: add GRND_INSECURE from linux v5.6
Mar 31, 2020
2f91b95
sched.h: add CLONE_NEWTIME from linux v5.6
Mar 31, 2020
d788c53
aarch64: add HWCAP2_ macros from linux v5.3
Mar 31, 2020
438438f
aarch64: add new HWCAP2_ macros from linux v5.6
Mar 31, 2020
7858b15
sys/fanotify.h: update to linux v5.7
Jul 13, 2020
ef6d1d3
sys/mman.h: add MREMAP_DONTUNMAP from linux v5.7
Jul 13, 2020
8edcde6
netinet/tcp.h: update to linux v5.7
Jul 13, 2020
2083c3a
bits/syscall.h: add __NR_faccessat2 from linux v5.8
Jul 28, 2020
7e627e6
elf.h: add .note.gnu.property related definitions
Sep 9, 2020
5744cd5
netinet/if_ether.h: add ETH_P_MRP from linux v5.8
Sep 9, 2020
d50d1e2
use new SYS_faccessat2 syscall to implement faccessat with flags
richfelker Sep 10, 2020
78b2a1b
avoid set*id/setrlimit misbehavior and hang in vforked/cloned child
richfelker Sep 17, 2020
83930eb
fix fork of processes with active async io contexts
richfelker Sep 28, 2020
36a7377
move __abort_lock to its own file and drop pointless weak_alias trick
richfelker Sep 28, 2020
5c6d05d
fix missing synchronization of fork with abort
richfelker Sep 28, 2020
6e8b5be
drop use of pthread_once in mutexattr kernel support tests
richfelker Sep 29, 2020
38f8db0
fix stale lock when allocation of ctor queue fails during dlopen
richfelker Sep 29, 2020
d5b3af7
ldso: use pthread_t rather than kernel tid to track ctor visitor
richfelker Sep 29, 2020
4e2e251
rename fork source file
richfelker Sep 30, 2020
b97094b
implement _Fork and refactor fork using it
richfelker Sep 30, 2020
847bfbf
fix unintended observability of SIGABRT disposition reset via sigaction
richfelker Oct 1, 2020
15f7053
fix posix_spawn interaction with fork and abort by taking lock
richfelker Oct 1, 2020
a206620
fix getgrouplist when nscd reports an empty list
richfelker Oct 11, 2020
0c34754
remove incorrect fflush from assert failure handler
richfelker Oct 14, 2020
8412e85
remove unused SIGTIMER handler in timer_create
richfelker Oct 14, 2020
9cca937
drop use of pthread_once in timer_create
richfelker Oct 14, 2020
58e554f
remove long-unused struct __timer from pthread_impl.h
richfelker Oct 14, 2020
c4e0dcc
move aio implementation details to a proper internal header
richfelker Sep 28, 2020
6803c95
remove unused weak definition of __tl_sync in membarrier.c
richfelker Oct 15, 2020
ab5b832
update crypt_blowfish to support $2b$ prefix
Oct 18, 2020
0f3da18
lift sigaction abort locking to fix posix_spawn child deadlock
richfelker Oct 24, 2020
fdf8adc
fix pthread_cond_wait paired with with priority-inheritance mutex
richfelker Oct 26, 2020
f89507b
fix reintroduction of errno clobbering by atfork handlers
richfelker Oct 26, 2020
29a6efd
avoid __synccall for setrlimit on kernels with prlimit syscall
richfelker Oct 27, 2020
8e88649
fix setgroups behavior in multithreaded process
richfelker Oct 27, 2020
0e9dc98
ldso: notify the debugger when we're doing a dlopen
rcombs Oct 24, 2020
3397f8d
refactor setxid return path to use __syscall_ret
richfelker Oct 27, 2020
4f16f15
fix sem_close unmapping of still-referenced semaphore
richfelker Oct 28, 2020
5c339a6
add support for SIGEV_THREAD_ID timers
jyknight Jul 1, 2019
bd1b2fe
fix missing-wake regression in pthread_cond_wait
richfelker Oct 30, 2020
c9682c0
fix erroneous pthread_cond_wait mutex waiter count logic due to typo
richfelker Oct 30, 2020
95694af
fix vector types in aarch64 register file structures
richfelker Nov 3, 2020
40977c7
dlerror: don't gratuitously hold freebuf_queue lock while freeing
richfelker Nov 10, 2020
7d6de0d
drop use of getdelim/stdio in dynamic linker
richfelker Nov 11, 2020
ac3d6b1
give libc access to its own malloc even if public malloc is interposed
richfelker Nov 11, 2020
f524af2
convert malloc use under libc-internal locks to use internal allocator
richfelker Nov 11, 2020
52c29ea
lift child restrictions after multi-threaded fork
richfelker Nov 11, 2020
6674ce7
pthread_exit: don't __vm_wait under thread list lock
richfelker Nov 19, 2020
6669492
protect destruction of process-shared mutexes against robust list races
richfelker Nov 19, 2020
26a2ecf
rewrite wcsnrtombs to fix buffer overflow and other bugs
richfelker Nov 19, 2020
290ca04
fix regression in pthread_exit
richfelker Nov 20, 2020
bbd5e8a
explicitly prefer 64-bit/v2 zoneinfo tables
richfelker Nov 22, 2020
a4a40f6
parse v3 or future-unknown zoneinfo file versions as v2+
richfelker Nov 22, 2020
4f78d92
work around linux bug in readlink syscall with zero buffer size
richfelker Nov 24, 2020
334f535
fix typo in INSTALL
Nov 26, 2020
e29e7d2
arm fabs and sqrt: support single-precision-only fpu variants
jinliangli Nov 20, 2020
07843e6
add missing personality values
woodruffw Nov 18, 2020
ff712f5
bits/syscall.h: add __NR_close_range from linux v5.9
Oct 24, 2020
75a0177
sys/fanotify.h: add new FAN_* macros from linux v5.9
Oct 25, 2020
b0862c9
netinet/in.h: add IP_RECVERR_4884 from linux v5.9
Oct 25, 2020
ef8faa2
fix segfault in lutimes when tv argument is NULL
Nov 12, 2020
1c715dc
configure: do not use obsolescent form of test -a|o
concatime Nov 2, 2020
e1b7a06
fix mallocng regression in malloc_usable_size with null argument
ddcc Nov 25, 2020
a562758
implement realpath directly instead of using procfs readlink
richfelker Nov 30, 2020
5f56349
implement reallocarray
kaniini Aug 1, 2020
eca5e00
s390x: derive float_t from compiler or default to float
mhillenbrand Dec 1, 2020
9734319
fix failure to preserve r6 in s390x asm; per ABI it is call-saved
richfelker Dec 4, 2020
e763976
riscv64: fix inconsistent ucontext_t struct tag
ddevault Dec 5, 2020
258aa22
fix omission of non-stub pthread_mutexattr_getprotocol
richfelker Dec 7, 2020
2079967
drop use of pthread_once for aio thread stack size init
richfelker Dec 8, 2020
ce77816
fix misleading comment in strstr
richfelker Dec 9, 2020
4f8f6ee
lift locale lock out of internal __get_locale
richfelker Dec 9, 2020
1e31a28
drop use of pthread_once in newlocale
richfelker Dec 9, 2020
58bf43c
use libc-internal malloc for newlocale/freelocale
richfelker Dec 9, 2020
687cdf1
sh: fix incorrect mcontext_t member naming
kaniini Dec 12, 2020
0d022f4
fix v4l2 buffer ioctl fallbacks for pre-5.6 kernels
Dec 14, 2020
aa4ce4a
fix VIDIOC_DQEVENT (v4l2) ioctl fallback for pre-5.6 kernels
richfelker Dec 14, 2020
83675e4
release 1.2.2
richfelker Jan 15, 2021
ecac1cc
fail posix_spawn file_actions operations with negative fds
richfelker Jan 30, 2021
392641c
fix inconsistent signature of __libc_start_main
richfelker Jan 30, 2021
2532a23
preserve errno across free
richfelker Jan 30, 2021
de3db73
fix build regression in oldmalloc
richfelker Jan 30, 2021
a49232b
oldmalloc: preserve errno across free
richfelker Jan 30, 2021
721ca8b
Create quic-organization-repolinter.yml
quic-nwtn May 8, 2024
f89e0a7
update repolinter
quic-nwtn Dec 19, 2024
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
31 changes: 31 additions & 0 deletions .github/workflows/quic-organization-repolinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: QuIC Organization Repolinter

on:
push:
branches: [ "hexagon" ]
pull_request:
branches: [ "hexagon" ]
workflow_dispatch:

jobs:
repolinter:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Verify repolinter config file is present
id: check_files
uses: andstor/file-existence-action@v3
with:
files: "repolint.json"
- name: Run Repolinter with local repolint.json
if: steps.check_files.outputs.files_exists == 'true'
uses: todogroup/repolinter-action@v1
with:
config_file: "repolint.json"
- name: Run Repolinter with default ruleset
if: steps.check_files.outputs.files_exists == 'false'
uses: todogroup/repolinter-action@v1
with:
config_url: "https://raw.githubusercontent.com/quic/.github/main/repolint.json"

5 changes: 4 additions & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,13 @@ Copyright © 2017-2018 Arm Limited
and labelled as such in comments in the individual source files. All
have been licensed under extremely permissive terms.

The ARM memcpy code (src/string/arm/memcpy_el.S) is Copyright © 2008
The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008
The Android Open Source Project and is licensed under a two-clause BSD
license. It was taken from Bionic libc, used on Android.

The AArch64 memcpy and memset code (src/string/aarch64/*) are
Copyright © 1999-2019, Arm Limited.

The implementation of DES for crypt (src/crypt/crypt_des.c) is
Copyright © 1994 David Burren. It is licensed under a BSD license.

Expand Down
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ includedir = $(prefix)/include
libdir = $(prefix)/lib
syslibdir = /lib

SRC_DIRS = $(addprefix $(srcdir)/,src/* crt ldso $(COMPAT_SRC_DIRS))
MALLOC_DIR = mallocng
SRC_DIRS = $(addprefix $(srcdir)/,src/* src/malloc/$(MALLOC_DIR) crt ldso $(COMPAT_SRC_DIRS))
BASE_GLOBS = $(addsuffix /*.c,$(SRC_DIRS))
ARCH_GLOBS = $(addsuffix /$(ARCH)/*.[csS],$(SRC_DIRS))
BASE_SRCS = $(sort $(wildcard $(BASE_GLOBS)))
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.2.2
87 changes: 87 additions & 0 deletions WHATSNEW
Original file line number Diff line number Diff line change
Expand Up @@ -2200,3 +2200,90 @@ arch-specific bugs fixed:
- arm dynamic linker chose wrong tls/atomic variants since 1.1.21
- some math library functions returned excess precision on i386
- unconfirmed regression in fchmodat AT_SYMLINK_NOFOLLOW on mips*



1.2.1 release notes

major changes:
- new malloc implementation (mallocng & overhauled bump allocator)

new features:
- DNS queries via res_* now set AD flag, report zone signedness (DNSSEC)
- PTHREAD_NULL macro (POSIX-future)

performance:
- optimized memcpy and memset for aarch64
- optimized memcpy for arm now supports big endian
- optimized x86_64 remquol
- improved strerror without linear search

bugs fixed:
- lock-skipping for processes that returned to single-threaded was wrong
- AF_UNSPEC dns lookups mishandled single failure in paired A+AAAA
- res_send and res_query returned wrong value on errors from nameserver
- corrupted sysvipc timestamps on 32-bit archs with old kernels
- incorrect parsing of timezone offsets after overly-long zone name
- clock_adjtime was broken on 32-bit archs (time64)
- pthread_kill as not async-signal-safe
- pthread_cancel was not async-cancel-safe
- large-ulp errors in various math functions in non-default rounding modes

arch-specific bugs fixed:
- arm clock_gettime was broken on some hw due to bad time64 vdso
- m68k sqrtl lacked long double precision
- mips* syscall mechanism regressions on older kernels
- 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
9 changes: 4 additions & 5 deletions arch/aarch64/pthread_arch.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
static inline struct pthread *__pthread_self()
static inline uintptr_t __get_tp()
{
char *self;
__asm__ ("mrs %0,tpidr_el0" : "=r"(self));
return (void*)(self - sizeof(struct pthread));
uintptr_t tp;
__asm__ ("mrs %0,tpidr_el0" : "=r"(tp));
return tp;
}

#define TLS_ABOVE_TP
#define GAP_ABOVE_TP 16
#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread))

#define MC_PC pc
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
17 changes: 8 additions & 9 deletions arch/arm/pthread_arch.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
|| __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7

static inline pthread_t __pthread_self()
static inline uintptr_t __get_tp()
{
char *p;
__asm__ ( "mrc p15,0,%0,c13,c0,3" : "=r"(p) );
return (void *)(p-sizeof(struct pthread));
uintptr_t tp;
__asm__ ( "mrc p15,0,%0,c13,c0,3" : "=r"(tp) );
return tp;
}

#else
Expand All @@ -16,18 +16,17 @@ static inline pthread_t __pthread_self()
#define BLX "blx"
#endif

static inline pthread_t __pthread_self()
static inline uintptr_t __get_tp()
{
extern hidden uintptr_t __a_gettp_ptr;
register uintptr_t p __asm__("r0");
__asm__ ( BLX " %1" : "=r"(p) : "r"(__a_gettp_ptr) : "cc", "lr" );
return (void *)(p-sizeof(struct pthread));
register uintptr_t tp __asm__("r0");
__asm__ ( BLX " %1" : "=r"(tp) : "r"(__a_gettp_ptr) : "cc", "lr" );
return tp;
}

#endif

#define TLS_ABOVE_TP
#define GAP_ABOVE_TP 8
#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread))

#define MC_PC arm_pc
6 changes: 0 additions & 6 deletions arch/arm/syscall_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
__asm_syscall(R7_OPERAND, "0"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5));
}

#define VDSO_USEFUL
#define VDSO_CGT32_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_VER "LINUX_2.6"
#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"

#define SYSCALL_FADVISE_6_ARG

#define SYSCALL_IPC_BROKEN_MODE
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

10 changes: 4 additions & 6 deletions arch/i386/pthread_arch.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
static inline struct pthread *__pthread_self()
static inline uintptr_t __get_tp()
{
struct pthread *self;
__asm__ ("movl %%gs:0,%0" : "=r" (self) );
return self;
uintptr_t tp;
__asm__ ("movl %%gs:0,%0" : "=r" (tp) );
return tp;
}

#define TP_ADJ(p) (p)

#define MC_PC gregs[REG_EIP]
2 changes: 0 additions & 2 deletions arch/i386/syscall_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,3 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
#define VDSO_CGT32_VER "LINUX_2.6"
#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"

#define SYSCALL_USE_SOCKETCALL
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
7 changes: 3 additions & 4 deletions arch/m68k/pthread_arch.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
static inline struct pthread *__pthread_self()
static inline uintptr_t __get_tp()
{
uintptr_t tp = __syscall(SYS_get_thread_area);
return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
return __syscall(SYS_get_thread_area);
}

#define TLS_ABOVE_TP
#define GAP_ABOVE_TP 0
#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000)

#define TP_OFFSET 0x7000
#define DTP_OFFSET 0x8000

#define MC_PC gregs[R_PC]
1 change: 0 additions & 1 deletion arch/m68k/syscall_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,4 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
return d0;
}

#define SYSCALL_USE_SOCKETCALL
#define SYSCALL_IPC_BROKEN_MODE
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

10 changes: 4 additions & 6 deletions arch/microblaze/pthread_arch.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
static inline struct pthread *__pthread_self()
static inline uintptr_t __get_tp()
{
struct pthread *self;
__asm__ ("ori %0, r21, 0" : "=r" (self) );
return self;
uintptr_t tp;
__asm__ ("ori %0, r21, 0" : "=r" (tp) );
return tp;
}

#define TP_ADJ(p) (p)

#define MC_PC regs.pc
2 changes: 2 additions & 0 deletions arch/microblaze/syscall_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
}

#define SYSCALL_IPC_BROKEN_MODE

#undef SYS_socketcall
Loading