mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Add several missing constants
@ 2026-01-17  4:37 Yu Watanabe
  0 siblings, 0 replies; only message in thread
From: Yu Watanabe @ 2026-01-17  4:37 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 114 bytes --]

Hi,

The attached patches add several missing definitions for sys/prctl.h
and sys/stat.h.
Please take a look.

Yu

[-- Attachment #2: 0002-sys-stat.h-add-STATX_DIO_READ_ALIGN-from-kernel-v6.1.patch --]
[-- Type: text/x-patch, Size: 805 bytes --]

From da487380117e1405a2117bc457a296caa9e3d9ad Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sat, 17 Jan 2026 12:49:59 +0900
Subject: [PATCH 2/2] sys/stat.h: add STATX_DIO_READ_ALIGN from kernel v6.14

see
  linux commit 7ed6cbe0f8caa6ee38a2dc8f1b925acb904cc01f
  fs: add STATX_DIO_READ_ALIGN
---
 include/sys/stat.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/sys/stat.h b/include/sys/stat.h
index 4f7dc2b1..61f5bd7c 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -125,6 +125,7 @@ int lchmod(const char *, mode_t);
 #define STATX_MNT_ID_UNIQUE 0x4000U
 #define STATX_SUBVOL 0x8000U
 #define STATX_WRITE_ATOMIC 0x10000U
+#define STATX_DIO_READ_ALIGN 0x20000U
 
 #define STATX_ATTR_COMPRESSED 0x4
 #define STATX_ATTR_IMMUTABLE 0x10
-- 
2.52.0


[-- Attachment #3: 0001-sys-prctl.h-add-several-missing-definitions.patch --]
[-- Type: text/x-patch, Size: 3867 bytes --]

From db0ce1dd876b4aef8f6bb3ed22ad3d887c4349f7 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sat, 17 Jan 2026 12:43:46 +0900
Subject: [PATCH 1/2] sys/prctl.h: add several missing definitions

Synced with linux v6.19-rc5.
---
 include/sys/prctl.h | 78 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/include/sys/prctl.h b/include/sys/prctl.h
index 087a75c9..a7441807 100644
--- a/include/sys/prctl.h
+++ b/include/sys/prctl.h
@@ -114,6 +114,7 @@ struct prctl_mm_map {
 #define PR_GET_TID_ADDRESS      40
 
 #define PR_SET_THP_DISABLE      41
+#define PR_THP_DISABLE_EXCEPT_ADVISED (1 << 1)
 #define PR_GET_THP_DISABLE      42
 
 #define PR_MPX_ENABLE_MANAGEMENT  43
@@ -177,6 +178,83 @@ struct prctl_mm_map {
 #define PR_PAC_SET_ENABLED_KEYS 60
 #define PR_PAC_GET_ENABLED_KEYS 61
 
+#define PR_SCHED_CORE                     62
+#define PR_SCHED_CORE_GET                 0
+#define PR_SCHED_CORE_CREATE              1
+#define PR_SCHED_CORE_SHARE_TO            2
+#define PR_SCHED_CORE_SHARE_FROM          3
+#define PR_SCHED_CORE_MAX                 4
+#define PR_SCHED_CORE_SCOPE_THREAD        0
+#define PR_SCHED_CORE_SCOPE_THREAD_GROUP  1
+#define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2
+
+#define PR_SME_SET_VL                     63
+#define PR_SME_SET_VL_ONEXEC              (1 << 18)
+#define PR_SME_GET_VL                     64
+#define PR_SME_VL_LEN_MASK                0xffff
+#define PR_SME_VL_INHERIT                 (1 << 17)
+
+#define PR_SET_MDWE                       65
+#define PR_MDWE_REFUSE_EXEC_GAIN          (1UL << 0)
+#define PR_MDWE_NO_INHERIT                (1UL << 1)
+
+#define PR_GET_MDWE                       66
+
+#define PR_SET_VMA                        0x53564d41
+#define PR_SET_VMA_ANON_NAME              0
+
+#define PR_GET_AUXV                       0x41555856
+
+#define PR_SET_MEMORY_MERGE               67
+#define PR_GET_MEMORY_MERGE               68
+
+#define PR_RISCV_V_SET_CONTROL            69
+#define PR_RISCV_V_GET_CONTROL            70
+#define PR_RISCV_V_VSTATE_CTRL_DEFAULT    0
+#define PR_RISCV_V_VSTATE_CTRL_OFF        1
+#define PR_RISCV_V_VSTATE_CTRL_ON         2
+#define PR_RISCV_V_VSTATE_CTRL_INHERIT    (1 << 4)
+#define PR_RISCV_V_VSTATE_CTRL_CUR_MASK   0x3
+#define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK  0xc
+#define PR_RISCV_V_VSTATE_CTRL_MASK       0x1f
+
+#define PR_RISCV_SET_ICACHE_FLUSH_CTX     71
+#define PR_RISCV_CTX_SW_FENCEI_ON         0
+#define PR_RISCV_CTX_SW_FENCEI_OFF        1
+#define PR_RISCV_SCOPE_PER_PROCESS        0
+#define PR_RISCV_SCOPE_PER_THREAD         1
+
+#define PR_PPC_GET_DEXCR                  72
+#define PR_PPC_SET_DEXCR                  73
+#define PR_PPC_DEXCR_SBHE                 0
+#define PR_PPC_DEXCR_IBRTPD               1
+#define PR_PPC_DEXCR_SRAPD                2
+#define PR_PPC_DEXCR_NPHIE                3
+#define PR_PPC_DEXCR_CTRL_EDITABLE        0x1
+#define PR_PPC_DEXCR_CTRL_SET             0x2
+#define PR_PPC_DEXCR_CTRL_CLEAR           0x4
+#define PR_PPC_DEXCR_CTRL_SET_ONEXEC      0x8
+#define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC    0x10
+#define PR_PPC_DEXCR_CTRL_MASK            0x1f
+
+#define PR_GET_SHADOW_STACK_STATUS        74
+
+#define PR_SET_SHADOW_STACK_STATUS        75
+#define PR_SHADOW_STACK_ENABLE            (1UL << 0)
+#define PR_SHADOW_STACK_WRITE             (1UL << 1)
+#define PR_SHADOW_STACK_PUSH              (1UL << 2)
+
+#define PR_LOCK_SHADOW_STACK_STATUS       76
+
+#define PR_TIMER_CREATE_RESTORE_IDS       77
+#define PR_TIMER_CREATE_RESTORE_IDS_OFF   0
+#define PR_TIMER_CREATE_RESTORE_IDS_ON    1
+#define PR_TIMER_CREATE_RESTORE_IDS_GET   2
+
+#define PR_FUTEX_HASH                     78
+#define PR_FUTEX_HASH_SET_SLOTS           1
+#define PR_FUTEX_HASH_GET_SLOTS           2
+
 int prctl (int, ...);
 
 #ifdef __cplusplus
-- 
2.52.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-17  4:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-17  4:37 [musl] Add several missing constants Yu Watanabe

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).