From 5c26c890ede40b5649d2ea23c51ea3ef34216486 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 15 Apr 2024 03:26:17 -0700 Subject: [PATCH 01/13] mallocng: prevent stray ';' at top-level The LOCK_OBJ_DEF macro is used with a trailing semicolon. However, since the macro definition ends with the closing brace of a function definition, the ISO C grammar does not allow an extra semicolon. To fix this, swap the order of the two definitions, and drop the semicolon from the __malloc_lock declaration. --- src/malloc/mallocng/glue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/malloc/mallocng/glue.h b/src/malloc/mallocng/glue.h index 77f4c812..8c2586fb 100644 --- a/src/malloc/mallocng/glue.h +++ b/src/malloc/mallocng/glue.h @@ -62,8 +62,8 @@ __attribute__((__visibility__("hidden"))) extern int __malloc_lock[1]; #define LOCK_OBJ_DEF \ -int __malloc_lock[1]; \ -void __malloc_atfork(int who) { malloc_atfork(who); } +void __malloc_atfork(int who) { malloc_atfork(who); } \ +int __malloc_lock[1] static inline void rdlock() { From 4268281ab48896ca2a2f6f0a3bbcd332eee55834 Mon Sep 17 00:00:00 2001 From: RocketDev Date: Mon, 2 Mar 2026 00:21:58 +0800 Subject: [PATCH 02/13] getifaddr: fix typo ssl to sll sll_addr is a member of sockaddr_ll, but it is misspelled as ssl_addr in comment. Please cc me back when reply. Signed-off-by: RocketDev --- src/network/getifaddrs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/getifaddrs.c b/src/network/getifaddrs.c index 74df4d6c..55039bd8 100644 --- a/src/network/getifaddrs.c +++ b/src/network/getifaddrs.c @@ -13,8 +13,8 @@ /* getifaddrs() reports hardware addresses with PF_PACKET that implies * struct sockaddr_ll. But e.g. Infiniband socket address length is - * longer than sockaddr_ll.ssl_addr[8] can hold. Use this hack struct - * to extend ssl_addr - callers should be able to still use it. */ + * longer than sockaddr_ll.sll_addr[8] can hold. Use this hack struct + * to extend sll_addr - callers should be able to still use it. */ struct sockaddr_ll_hack { unsigned short sll_family, sll_protocol; int sll_ifindex; From 5c901bb36041035575e2732b75a6759849bf4560 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 1 Mar 2026 15:28:33 +0100 Subject: [PATCH 03/13] update syscalls up to linux 6.19 Add two missing syscalls from v5.14 and new syscalls from v6.4 .. v6.19 add __NR_quotactl_fd from linux v5.14 see linux commit 9dfa23c8de925041b7b45637a1a80a98a22f19dd quota: Add mountpath based quota support linux commit fa8b90070a80bb1a3042b4b25af4b3ee2c4c27e1 quota: wire up quotactl_path linux commit 64c2c2c62f92339b176ea24403d8db16db36f9e6 quota: Change quotactl_path() systcall to an fd-based one add __NR_memfd_secret from linux v5.14 see linux commit 7bb7f2ac24a028b20fca466b9633847b289b156a arch, mm: wire up memfd_secret system call where relevant linux commit 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 mm: introduce memfd_secret system call to create "secret" memory areas note: was already added on x86 and s390, now on aarch64 and riscv*. add riscv __NR_riscv_hwprobe from linux v6.4 see linux commit ea3de9ce8aa280c5175c835bd3e94a3a9b814b74 RISC-V: Add a syscall for HW probing add x86_64 only map_shadow_stack syscall from linux v6.6 see linux commit c35559f94ebc3e3bc82e56e07161bb5986cd9761 x86/shstk: Introduce map_shadow_stack syscall add map_shadow_stack syscall from linux v6.7 see linux commit 2fd0ebad27bcd4c8fc61c61a98d4283c47054bcf arch: Reserve map_shadow_stack() syscall number for all architectures add futex_* syscalls from linux v6.7 see linux commit 9f6c532f59b20580acf8ede9409c9b8dce6e74e1 futex: Add sys_futex_wake() linux commit cb8c4312afca1b2dc64107e7e7cea81911055612 futex: Add sys_futex_wait() linux commit 0f4b5f972216782a4acb1ae00dcb55173847c2ff futex: Add sys_futex_requeue() add statmount, listmount syscalls from linux v6.8 see linux commit d8b0f5465012538cc4bb10ddc4affadbab73465b wire up syscalls for statmount/listmount linux commit b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d add listmount(2) syscall linux commit 46eae99ef73302f9fb3dddcd67c374b3dffe8fd6 add statmount(2) syscall add lsm_* syscalls from linux v6.8 see linux commit 5f42375904b08890f2e8e7cd955c5bf0c2c0d05a LSM: wireup Linux Security Module syscalls linux commit ad4aff9ec25f400608283c10d634cc4eeda83a02 LSM: Create lsm_list_modules system call linux commit a04a1198088a1378d0389c250cc684f649bcc91e LSM: syscalls for current process attributes add mseal syscall from linux v6.10 see linux commit ff388fe5c481d39cc0a5940d1ad46f7920f1d646 mseal: wire up mseal syscall on sh add sync_file_range2 from linux v6.10 see linux commit 30766f1105d6d2459c3b9fe34a3e52b637a72950 sh: rework sync_file_range ABI on x86 add uretprobe from linux v6.11 see linux commit 54233a4254036efca91b9bffbd398ecf39e90555 uretprobe: change syscall number, again add *xattrat syscalls from linux v6.13 see linux commit 6140be90ec70c39fa844741ca3cc807dd0866394 fs/xattr: add *at family syscalls add open_tree_attr from linux v6.15 see linux commit c4a16820d90199409c9bf01c4f794e1e9e8d8fd8 fs: add open_tree_attr() add file_{get,set}attr from linux v6.17 see linux commit be7efb2d20d67f334a7de2aef77ae6c69367e646 fs: introduce file_getattr and file_setattr syscalls on x86 add uprobe from linux v6.18 see linux commit 56101b69c9190667f473b9f93f8b6d8209aaa816 uprobes/x86: Add uprobe syscall to speed up uprobe add listns from linux v6.19 see linux commit b36d4b6aa88ef039647228b98c59a875e92f8c8e arch: hookup listns() system call --- arch/aarch64/bits/syscall.h.in | 20 ++++++++++++++++++++ arch/arm/bits/syscall.h.in | 19 +++++++++++++++++++ arch/i386/bits/syscall.h.in | 19 +++++++++++++++++++ arch/loongarch64/bits/syscall.h.in | 14 ++++++++++++++ arch/m68k/bits/syscall.h.in | 19 +++++++++++++++++++ arch/microblaze/bits/syscall.h.in | 19 +++++++++++++++++++ arch/mips/bits/syscall.h.in | 19 +++++++++++++++++++ arch/mips64/bits/syscall.h.in | 19 +++++++++++++++++++ arch/mipsn32/bits/syscall.h.in | 19 +++++++++++++++++++ arch/or1k/bits/syscall.h.in | 19 +++++++++++++++++++ arch/powerpc/bits/syscall.h.in | 19 +++++++++++++++++++ arch/powerpc64/bits/syscall.h.in | 19 +++++++++++++++++++ arch/riscv32/bits/syscall.h.in | 20 ++++++++++++++++++++ arch/riscv64/bits/syscall.h.in | 21 +++++++++++++++++++++ arch/s390x/bits/syscall.h.in | 19 +++++++++++++++++++ arch/sh/bits/syscall.h.in | 20 ++++++++++++++++++++ arch/x32/bits/syscall.h.in | 21 +++++++++++++++++++++ arch/x86_64/bits/syscall.h.in | 21 +++++++++++++++++++++ 18 files changed, 346 insertions(+) diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in index ea5a152a..bb158f36 100644 --- a/arch/aarch64/bits/syscall.h.in +++ b/arch/aarch64/bits/syscall.h.in @@ -296,12 +296,32 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 +#define __NR_memfd_secret 447 #define __NR_process_mrelease 448 #define __NR_futex_waitv 449 #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in index 157b304d..fb5fa975 100644 --- a/arch/arm/bits/syscall.h.in +++ b/arch/arm/bits/syscall.h.in @@ -396,6 +396,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -404,6 +405,24 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 #define __ARM_NR_breakpoint 0x0f0001 #define __ARM_NR_cacheflush 0x0f0002 diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in index 55e91cc4..30e38405 100644 --- a/arch/i386/bits/syscall.h.in +++ b/arch/i386/bits/syscall.h.in @@ -433,6 +433,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -442,4 +443,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/loongarch64/bits/syscall.h.in b/arch/loongarch64/bits/syscall.h.in index 2afb4ea1..66c0d7b9 100644 --- a/arch/loongarch64/bits/syscall.h.in +++ b/arch/loongarch64/bits/syscall.h.in @@ -305,6 +305,20 @@ #define __NR_futex_wake 454 #define __NR_futex_wait 455 #define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 #define __NR_fcntl __NR3264_fcntl #define __NR_statfs __NR3264_statfs #define __NR_fstatfs __NR3264_fstatfs diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in index 5cd84602..548fd02d 100644 --- a/arch/m68k/bits/syscall.h.in +++ b/arch/m68k/bits/syscall.h.in @@ -413,6 +413,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -421,3 +422,21 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in index 40860e6d..e98944a9 100644 --- a/arch/microblaze/bits/syscall.h.in +++ b/arch/microblaze/bits/syscall.h.in @@ -434,6 +434,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -442,4 +443,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in index 55e35742..4048ae88 100644 --- a/arch/mips/bits/syscall.h.in +++ b/arch/mips/bits/syscall.h.in @@ -415,6 +415,7 @@ #define __NR_process_madvise 4440 #define __NR_epoll_pwait2 4441 #define __NR_mount_setattr 4442 +#define __NR_quotactl_fd 4443 #define __NR_landlock_create_ruleset 4444 #define __NR_landlock_add_rule 4445 #define __NR_landlock_restrict_self 4446 @@ -423,4 +424,22 @@ #define __NR_set_mempolicy_home_node 4450 #define __NR_cachestat 4451 #define __NR_fchmodat2 4452 +#define __NR_map_shadow_stack 4453 +#define __NR_futex_wake 4454 +#define __NR_futex_wait 4455 +#define __NR_futex_requeue 4456 +#define __NR_statmount 4457 +#define __NR_listmount 4458 +#define __NR_lsm_get_self_attr 4459 +#define __NR_lsm_set_self_attr 4460 +#define __NR_lsm_list_modules 4461 +#define __NR_mseal 4462 +#define __NR_setxattrat 4463 +#define __NR_getxattrat 4464 +#define __NR_listxattrat 4465 +#define __NR_removexattrat 4466 +#define __NR_open_tree_attr 4467 +#define __NR_file_getattr 4468 +#define __NR_file_setattr 4469 +#define __NR_listns 4470 diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in index 50cec45a..1d80ebe6 100644 --- a/arch/mips64/bits/syscall.h.in +++ b/arch/mips64/bits/syscall.h.in @@ -345,6 +345,7 @@ #define __NR_process_madvise 5440 #define __NR_epoll_pwait2 5441 #define __NR_mount_setattr 5442 +#define __NR_quotactl_fd 5443 #define __NR_landlock_create_ruleset 5444 #define __NR_landlock_add_rule 5445 #define __NR_landlock_restrict_self 5446 @@ -353,4 +354,22 @@ #define __NR_set_mempolicy_home_node 5450 #define __NR_cachestat 5451 #define __NR_fchmodat2 5452 +#define __NR_map_shadow_stack 5453 +#define __NR_futex_wake 5454 +#define __NR_futex_wait 5455 +#define __NR_futex_requeue 5456 +#define __NR_statmount 5457 +#define __NR_listmount 5458 +#define __NR_lsm_get_self_attr 5459 +#define __NR_lsm_set_self_attr 5460 +#define __NR_lsm_list_modules 5461 +#define __NR_mseal 5462 +#define __NR_setxattrat 5463 +#define __NR_getxattrat 5464 +#define __NR_listxattrat 5465 +#define __NR_removexattrat 5466 +#define __NR_open_tree_attr 5467 +#define __NR_file_getattr 5468 +#define __NR_file_setattr 5469 +#define __NR_listns 5470 diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in index 9a4bd301..34b2f395 100644 --- a/arch/mipsn32/bits/syscall.h.in +++ b/arch/mipsn32/bits/syscall.h.in @@ -369,6 +369,7 @@ #define __NR_process_madvise 6440 #define __NR_epoll_pwait2 6441 #define __NR_mount_setattr 6442 +#define __NR_quotactl_fd 6443 #define __NR_landlock_create_ruleset 6444 #define __NR_landlock_add_rule 6445 #define __NR_landlock_restrict_self 6446 @@ -377,4 +378,22 @@ #define __NR_set_mempolicy_home_node 6450 #define __NR_cachestat 6451 #define __NR_fchmodat2 6452 +#define __NR_map_shadow_stack 6453 +#define __NR_futex_wake 6454 +#define __NR_futex_wait 6455 +#define __NR_futex_requeue 6456 +#define __NR_statmount 6457 +#define __NR_listmount 6458 +#define __NR_lsm_get_self_attr 6459 +#define __NR_lsm_set_self_attr 6460 +#define __NR_lsm_list_modules 6461 +#define __NR_mseal 6462 +#define __NR_setxattrat 6463 +#define __NR_getxattrat 6464 +#define __NR_listxattrat 6465 +#define __NR_removexattrat 6466 +#define __NR_open_tree_attr 6467 +#define __NR_file_getattr 6468 +#define __NR_file_setattr 6469 +#define __NR_listns 6470 diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in index 00812bf8..93c7fd2e 100644 --- a/arch/or1k/bits/syscall.h.in +++ b/arch/or1k/bits/syscall.h.in @@ -318,6 +318,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -326,4 +327,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in index ea95f3ed..5e633e4a 100644 --- a/arch/powerpc/bits/syscall.h.in +++ b/arch/powerpc/bits/syscall.h.in @@ -422,6 +422,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -430,4 +431,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in index 43551079..033082d7 100644 --- a/arch/powerpc64/bits/syscall.h.in +++ b/arch/powerpc64/bits/syscall.h.in @@ -394,6 +394,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -402,4 +403,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/riscv32/bits/syscall.h.in b/arch/riscv32/bits/syscall.h.in index 9228d840..dcd0e9f7 100644 --- a/arch/riscv32/bits/syscall.h.in +++ b/arch/riscv32/bits/syscall.h.in @@ -289,12 +289,32 @@ #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 +#define __NR_memfd_secret 447 #define __NR_process_mrelease 448 #define __NR_futex_waitv 449 #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 #define __NR_futex __NR_futex_time64 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 #define __NR_sysriscv __NR_arch_specific_syscall #define __NR_riscv_flush_icache (__NR_sysriscv + 15) +#define __NR_riscv_hwprobe (__NR_sysriscv + 14) diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in index e362bd0e..e196a11e 100644 --- a/arch/riscv64/bits/syscall.h.in +++ b/arch/riscv64/bits/syscall.h.in @@ -296,14 +296,35 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 +#define __NR_memfd_secret 447 #define __NR_process_mrelease 448 #define __NR_futex_waitv 449 #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 #define __NR_sysriscv __NR_arch_specific_syscall #define __NR_riscv_flush_icache (__NR_sysriscv + 15) +#define __NR_riscv_hwprobe (__NR_sysriscv + 14) diff --git a/arch/s390x/bits/syscall.h.in b/arch/s390x/bits/syscall.h.in index e60711a6..da9be41a 100644 --- a/arch/s390x/bits/syscall.h.in +++ b/arch/s390x/bits/syscall.h.in @@ -359,6 +359,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -368,4 +369,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in index 915a79cd..5613ebf4 100644 --- a/arch/sh/bits/syscall.h.in +++ b/arch/sh/bits/syscall.h.in @@ -357,6 +357,7 @@ #define __NR_pkey_alloc 385 #define __NR_pkey_free 386 #define __NR_rseq 387 +#define __NR_sync_file_range2 388 #define __NR_semget 393 #define __NR_semctl 394 #define __NR_shmget 395 @@ -406,6 +407,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -414,4 +416,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in index 1d065eea..7912034b 100644 --- a/arch/x32/bits/syscall.h.in +++ b/arch/x32/bits/syscall.h.in @@ -286,6 +286,8 @@ #define __NR_statx (0x40000000 + 332) #define __NR_io_pgetevents (0x40000000 + 333) #define __NR_rseq (0x40000000 + 334) +#define __NR_uretprobe (0x40000000 + 335) +#define __NR_uprobe (0x40000000 + 336) #define __NR_pidfd_send_signal (0x40000000 + 424) #define __NR_io_uring_setup (0x40000000 + 425) #define __NR_io_uring_enter (0x40000000 + 426) @@ -305,6 +307,7 @@ #define __NR_process_madvise (0x40000000 + 440) #define __NR_epoll_pwait2 (0x40000000 + 441) #define __NR_mount_setattr (0x40000000 + 442) +#define __NR_quotactl_fd (0x40000000 + 443) #define __NR_landlock_create_ruleset (0x40000000 + 444) #define __NR_landlock_add_rule (0x40000000 + 445) #define __NR_landlock_restrict_self (0x40000000 + 446) @@ -314,6 +317,24 @@ #define __NR_set_mempolicy_home_node (0x40000000 + 450) #define __NR_cachestat (0x40000000 + 451) #define __NR_fchmodat2 (0x40000000 + 452) +#define __NR_map_shadow_stack (0x40000000 + 453) +#define __NR_futex_wake (0x40000000 + 454) +#define __NR_futex_wait (0x40000000 + 455) +#define __NR_futex_requeue (0x40000000 + 456) +#define __NR_statmount (0x40000000 + 457) +#define __NR_listmount (0x40000000 + 458) +#define __NR_lsm_get_self_attr (0x40000000 + 459) +#define __NR_lsm_set_self_attr (0x40000000 + 460) +#define __NR_lsm_list_modules (0x40000000 + 461) +#define __NR_mseal (0x40000000 + 462) +#define __NR_setxattrat (0x40000000 + 463) +#define __NR_getxattrat (0x40000000 + 464) +#define __NR_listxattrat (0x40000000 + 465) +#define __NR_removexattrat (0x40000000 + 466) +#define __NR_open_tree_attr (0x40000000 + 467) +#define __NR_file_getattr (0x40000000 + 468) +#define __NR_file_setattr (0x40000000 + 469) +#define __NR_listns (0x40000000 + 470) #define __NR_rt_sigaction (0x40000000 + 512) diff --git a/arch/x86_64/bits/syscall.h.in b/arch/x86_64/bits/syscall.h.in index 6543bbba..66d150dd 100644 --- a/arch/x86_64/bits/syscall.h.in +++ b/arch/x86_64/bits/syscall.h.in @@ -333,6 +333,8 @@ #define __NR_statx 332 #define __NR_io_pgetevents 333 #define __NR_rseq 334 +#define __NR_uretprobe 335 +#define __NR_uprobe 336 #define __NR_pidfd_send_signal 424 #define __NR_io_uring_setup 425 #define __NR_io_uring_enter 426 @@ -352,6 +354,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 #define __NR_landlock_create_ruleset 444 #define __NR_landlock_add_rule 445 #define __NR_landlock_restrict_self 446 @@ -361,4 +364,22 @@ #define __NR_set_mempolicy_home_node 450 #define __NR_cachestat 451 #define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 +#define __NR_setxattrat 463 +#define __NR_getxattrat 464 +#define __NR_listxattrat 465 +#define __NR_removexattrat 466 +#define __NR_open_tree_attr 467 +#define __NR_file_getattr 468 +#define __NR_file_setattr 469 +#define __NR_listns 470 From b37d241dfe2d5a747089a2dc66864d564b6ea333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 27 Sep 2025 04:28:14 +0200 Subject: [PATCH 04/13] fenv: add missing C dummy functions for loongarch64 soft float analogous to fenv-sf.c for all other archs with softfloat variants. --- src/fenv/loongarch64/fenv-sf.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/fenv/loongarch64/fenv-sf.c diff --git a/src/fenv/loongarch64/fenv-sf.c b/src/fenv/loongarch64/fenv-sf.c new file mode 100644 index 00000000..41154673 --- /dev/null +++ b/src/fenv/loongarch64/fenv-sf.c @@ -0,0 +1,3 @@ +#ifdef __loongarch_soft_float +#include "../fenv.c" +#endif From 38b00812ef2ebc944063d70bf63a09a9ebb98dbf Mon Sep 17 00:00:00 2001 From: Jingyun Hua Date: Sat, 4 Jan 2025 16:41:44 +0800 Subject: [PATCH 05/13] loongarch64: add new reloc types and NT_LOONGARCH_HW_* into elf.h These new LoongArch reloc types(101 to 126) have been added in LoongArch psABI v2.30 and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH sync with Linux 6.12 elf.h. --- include/elf.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/elf.h b/include/elf.h index d6ae539a..2555b906 100644 --- a/include/elf.h +++ b/include/elf.h @@ -712,6 +712,8 @@ typedef struct { #define NT_LOONGARCH_LSX 0xa02 #define NT_LOONGARCH_LASX 0xa03 #define NT_LOONGARCH_LBT 0xa04 +#define NT_LOONGARCH_HW_BREAK 0xa05 +#define NT_LOONGARCH_HW_WATCH 0xa06 @@ -3408,6 +3410,32 @@ enum #define R_LARCH_TLS_GD_HI20 98 #define R_LARCH_32_PCREL 99 #define R_LARCH_RELAX 100 +#define R_LARCH_DELETE 101 +#define R_LARCH_ALIGN 102 +#define R_LARCH_PCREL20_S2 103 +#define R_LARCH_CFA 104 +#define R_LARCH_ADD6 105 +#define R_LARCH_SUB6 106 +#define R_LARCH_ADD_ULEB128 107 +#define R_LARCH_SUB_ULEB128 108 +#define R_LARCH_64_PCREL 109 +#define R_LARCH_CALL36 110 +#define R_LARCH_TLS_DESC_PC_HI20 111 +#define R_LARCH_TLS_DESC_PC_LO12 112 +#define R_LARCH_TLS_DESC64_PC_LO20 113 +#define R_LARCH_TLS_DESC64_PC_HI12 114 +#define R_LARCH_TLS_DESC_HI20 115 +#define R_LARCH_TLS_DESC_LO12 116 +#define R_LARCH_TLS_DESC64_LO20 117 +#define R_LARCH_TLS_DESC64_HI12 118 +#define R_LARCH_TLS_DESC_LD 119 +#define R_LARCH_TLS_DESC_CALL 120 +#define R_LARCH_TLS_LE_HI20_R 121 +#define R_LARCH_TLS_LE_ADD_R 122 +#define R_LARCH_TLS_LE_LO12_R 123 +#define R_LARCH_TLS_LD_PCREL20_S2 124 +#define R_LARCH_TLS_GD_PCREL20_S2 125 +#define R_LARCH_TLS_DESC_PCREL20_S2 126 #ifdef __cplusplus } From b5146b83ab2bb91b42a7fc60fa07c41914f1ff54 Mon Sep 17 00:00:00 2001 From: JianTao Shan Date: Mon, 23 Sep 2024 02:52:29 +0000 Subject: [PATCH 06/13] loongarch64: add fpu and simd context to signal.h The signal stack extension field of loongarch64 is mutable, and the types are distinguished according to some magic. --- arch/loongarch64/bits/signal.h | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/loongarch64/bits/signal.h b/arch/loongarch64/bits/signal.h index 5a9ed8c9..70ce9402 100644 --- a/arch/loongarch64/bits/signal.h +++ b/arch/loongarch64/bits/signal.h @@ -18,6 +18,10 @@ #endif #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define SC_USED_FP (1U << 0) +#define SC_ADDRERR_RD (1U << 30) +#define SC_ADDRERR_WR (1U << 31) + typedef unsigned long greg_t, gregset_t[32]; struct sigcontext { @@ -26,6 +30,45 @@ struct sigcontext { unsigned sc_flags; unsigned long sc_extcontext[] __attribute__((__aligned__(16))); }; + +#define CONTEXT_INFO_ALIGN 16 +struct sctx_info { + unsigned magic; + unsigned size; + unsigned long padding; +}; + +#define FPU_CTX_MAGIC 0x46505501 +#define FPU_CTX_ALIGN 8 +struct fpu_context { + unsigned long regs[32]; + unsigned long fcc; + unsigned fcsr; +}; + +#define LSX_CTX_MAGIC 0x53580001 +#define LSX_CTX_ALIGN 16 +struct lsx_context { + unsigned long regs[2*32]; + unsigned long fcc; + unsigned fcsr; +}; + +#define LASX_CTX_MAGIC 0x41535801 +#define LASX_CTX_ALIGN 32 +struct lasx_context { + unsigned long regs[4*32]; + unsigned long fcc; + unsigned fcsr; +}; + +#define LBT_CTX_MAGIC 0x42540001 +#define LBT_CTX_ALIGN 8 +struct lbt_context { + unsigned long regs[4]; + unsigned eflags; + unsigned ftop; +}; #endif typedef struct { From 9355c443116969d93c920b57b3f8f3252a912ca5 Mon Sep 17 00:00:00 2001 From: Xing Li Date: Tue, 10 Sep 2024 09:17:57 +0800 Subject: [PATCH 07/13] loongarch64: add lsx and lasx regset definition --- arch/loongarch64/bits/user.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/loongarch64/bits/user.h b/arch/loongarch64/bits/user.h index fd9b7b22..e4aee0d3 100644 --- a/arch/loongarch64/bits/user.h +++ b/arch/loongarch64/bits/user.h @@ -22,3 +22,17 @@ typedef union { float f; } elf_fpreg_t; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +typedef union +{ + __attribute__((__aligned__(16))) + double d[2]; + float f[4]; +} elf_lsxregset_t[32]; + +typedef union +{ + __attribute__((__aligned__(32))) + double d[4]; + float f[8]; +} elf_lasxregset_t[32]; From bb5693fa5e93a2cadcb82e238632714b7c71c5b6 Mon Sep 17 00:00:00 2001 From: Michal Biesek Date: Tue, 8 Aug 2023 11:46:09 +0200 Subject: [PATCH 08/13] sys/mman.h: add MADV_POPULATE_(READ|WRITE) from linux v5.14 Add madvise flags to populate(prefault) page tables see linux commit 4ca9b3859dac14bbef0c27d00667bb5b10917adb mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables --- include/sys/mman.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/mman.h b/include/sys/mman.h index 3d5d0f9c..ba371539 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -95,6 +95,8 @@ extern "C" { #define MADV_KEEPONFORK 19 #define MADV_COLD 20 #define MADV_PAGEOUT 21 +#define MADV_POPULATE_READ 22 +#define MADV_POPULATE_WRITE 23 #define MADV_HWPOISON 100 #define MADV_SOFT_OFFLINE 101 #endif From 56df2e1fc1528ece18001ed430d714356ea10340 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 15 Mar 2026 16:24:56 -0400 Subject: [PATCH 09/13] sys/mman.h: add MADV_DONTNEED_LOCKED from linux v6.0 this flag works like MADV_DONTNEED but also applies to locked memory ranges. see linux commit 9457056ac426e5ed0671356509c8dcce69f8dee0 mm: madvise: MADV_DONTNEED_LOCKED --- include/sys/mman.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/mman.h b/include/sys/mman.h index ba371539..0184f642 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -97,6 +97,7 @@ extern "C" { #define MADV_PAGEOUT 21 #define MADV_POPULATE_READ 22 #define MADV_POPULATE_WRITE 23 +#define MADV_DONTNEED_LOCKED 24 #define MADV_HWPOISON 100 #define MADV_SOFT_OFFLINE 101 #endif From 19f9aeaaba1bde5b541b7758cbf661ba29fb9cea Mon Sep 17 00:00:00 2001 From: Michal Biesek Date: Tue, 8 Aug 2023 21:41:06 +0200 Subject: [PATCH 10/13] sys/mman.h: add MADV_COLLAPSE from linux v6.1 Add madvise flag which performs a best-effort synchronous collapse of the native pages mapped by the memory range into Transparent Huge Pages (THPs) see linux commit 7d8faaf155454f8798ec56404faca29a82689c77 mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse --- include/sys/mman.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/mman.h b/include/sys/mman.h index 0184f642..aa2c4817 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -98,6 +98,7 @@ extern "C" { #define MADV_POPULATE_READ 22 #define MADV_POPULATE_WRITE 23 #define MADV_DONTNEED_LOCKED 24 +#define MADV_COLLAPSE 25 #define MADV_HWPOISON 100 #define MADV_SOFT_OFFLINE 101 #endif From 149d872970312e56a3052f51708b1da2c78ef641 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 17 Mar 2026 21:59:45 -0400 Subject: [PATCH 11/13] getgr*: validate group member lists from nscd backend this corrects missing validation when using alternate group database backends via nscd, as reported by 0rbitingZer0, which could result in a heap-based buffer overflow. while the source of truth for user (passwd) and group definitions is generally an equal or higher-privilege domain than the application, and compromise of nscd could inherently lead to bypass of some access controls, it is still worthwhile to harden against direct attacks from a compromised nscd. this patch adds validation in the least invasive way possible, erroring out at the point where a write past the end of the buffer would previously have occurred. a check is also added for member counts that would cause arithmetic overflow in the existing buffer size computations, including negative counts. this could be handled better by making adjustments where the arithmetic is performed, but the way it's done here avoids making any changes except for the actual bounds check. --- src/passwd/getgr_a.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/passwd/getgr_a.c b/src/passwd/getgr_a.c index afeb1ece..84550404 100644 --- a/src/passwd/getgr_a.c +++ b/src/passwd/getgr_a.c @@ -71,6 +71,10 @@ int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t goto cleanup_f; } + if (groupbuf[GRMEMCNT] > (size_t)(INT32_MAX-1)) { + rv = ENOMEM; + goto cleanup_f; + } if (groupbuf[GRNAMELEN] > SIZE_MAX - groupbuf[GRPASSWDLEN]) { rv = ENOMEM; goto cleanup_f; @@ -127,7 +131,13 @@ int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t if (groupbuf[GRMEMCNT]) { mem[0][0] = *buf + groupbuf[GRNAMELEN] + groupbuf[GRPASSWDLEN]; for (ptr = mem[0][0], i = 0; ptr != mem[0][0]+grlist_len; ptr++) - if (!*ptr) mem[0][++i] = ptr+1; + if (!*ptr) + if (i Date: Sat, 23 Aug 2025 00:54:04 +0200 Subject: [PATCH 12/13] vdso: add support for GNU hash tables on some kernel builds, the vdso exports symbols with DT_GNU_HASH but omits DT_HASH, causing the vdso not to get used and for clock_gettime to fall back to using a syscall. our vdso resolver does not use the hash table anyway, but does need the symbol count from the standard sysv hash table. if it's missing, use the GNU hashtable to calculate the number of symbols. --- src/internal/vdso.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/internal/vdso.c b/src/internal/vdso.c index d46d3228..2b6e1ae2 100644 --- a/src/internal/vdso.c +++ b/src/internal/vdso.c @@ -40,6 +40,24 @@ static int checkver(Verdef *def, int vsym, const char *vername, char *strings) #define OK_TYPES (1< nsym) + nsym = buckets[i]; + } + if (nsym) { + hashval = buckets + gh[0] + (nsym - gh[1]); + do nsym++; + while (!(*hashval++ & 1)); + } + return nsym; +} + + void *__vdsosym(const char *vername, const char *name) { size_t i; @@ -60,6 +78,7 @@ void *__vdsosym(const char *vername, const char *name) char *strings = 0; Sym *syms = 0; Elf_Symndx *hashtab = 0; + uint32_t *ghashtab = 0; uint16_t *versym = 0; Verdef *verdef = 0; @@ -69,15 +88,20 @@ void *__vdsosym(const char *vername, const char *name) case DT_STRTAB: strings = p; break; case DT_SYMTAB: syms = p; break; case DT_HASH: hashtab = p; break; + case DT_GNU_HASH: ghashtab = p; break; case DT_VERSYM: versym = p; break; case DT_VERDEF: verdef = p; break; } } - if (!strings || !syms || !hashtab) return 0; + if (!strings || !syms) return 0; if (!verdef) versym = 0; + size_t nsym = 0; - for (i=0; i>4) & OK_BINDS)) continue; if (!syms[i].st_shndx) continue; From 9fa28ece75d8a2191de7c5bb53bed224c5947417 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 20 Mar 2026 11:40:00 -0400 Subject: [PATCH 13/13] release 1.2.6 --- VERSION | 2 +- WHATSNEW | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c813fe11..3c43790f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.5 +1.2.6 diff --git a/WHATSNEW b/WHATSNEW index 7bd90728..bb2cd9bd 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -2438,3 +2438,56 @@ arch-specific bugs fixed: - riscv64 icache flush operation was non-functional - sh sigsetjmp failed to properly restore call-saved register r8 on return - sh dlsym RTLD_NEXT did not identify calling module correctly + + + +1.2.6 release notes + +new features: +- posix_getdents interface (new in POSIX-2024) +- renameat2 interface (linux extension) +- iconv support for CP858 +- vdso clock_gettime for riscv{32,64}, powerpc{,64}, and s390x +- loongarch64 TLSDESC support +- exposed __getauxval for compiler runtime use detecting cpu features + +compatibility: +- initgroups no longer artificially limits number of supplementary groups +- getusershell now skips blank lines and comments +- exit is now explicitly thread-safe (possible future requirement) +- atexit now fails rather than deadlocking if called from late dtor +- strerror now has error strings for EUCLEAN and ENAVAIL +- isatty no longer collapses errors to ENOTTY +- sched.h namespace pollution with _GNU_SOURCE is reduced +- hasmntopt now matches only whole options, not arbitrary substrings +- shadow.h no longer declares an unimplemented sgetspent interface +- vdso with missing sysv hash table (only gnu hash) is now supported + +conformance: +- pwrite now handles O_APPEND correctly, reports error if it can't +- mbnrtowcs now conforms to new POSIX-2024 requirement for partial character +- iconv GBK now properly includes euro symbol +- strptime now accepts conversion specifiers added in POSIX-2024 +- inet_ntop IPv6 "zero compression" now conforms to RFC 5952 + +bugs fixed: +- iconv euc-kr decoder could do oob writes on invalid inputs (CVE-2025-26519) +- iconv shift_jis decoder could produce wrong outputs for some invalid inputs +- printf did not honor hex float precision correctly in some cases +- lost or delayed wakes in sem_post under race condition +- termios input speed handling was wrong +- strcasestr failed to match zero-length needle +- fma handled corner case with negative zero wrongly +- syslog LOG_MAKEPRI macro was incorrect +- timer_create is no longer affected by known pthread_barrier bugs +- sysconf(_SC_MINSIGSTKSZ) computed min size incorrectly +- statx emulation left some fields uninitialized +- mntent wrongly included final newline in parsed field output +- SIGEV_THREAD timers could abort process if SIGTIMER became unblocked +- bind_textdomain_codeset returned wrong value + +arch-specific bugs fixed: +- early dynamic linker handled page size wrong on dynamic pagesize archs +- arm and aarch64 crti/n files had wrong alignment +- m68k POLLWRNORM and POLLWRBAND values were incorrect +- x32 mq ABI was mismatched