]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
musl: Update riscv syscalls till 6.10 kernel
authorKhem Raj <raj.khem@gmail.com>
Wed, 4 Dec 2024 20:01:53 +0000 (12:01 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Dec 2024 09:17:50 +0000 (09:17 +0000)
Some packages e.g. ffmpeg have started using __NR_riscv_hwprobe
to detect Zba and Zbb at run-time.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/musl/musl/0001-Update-syscalls-for-r32-rv64-from-kernel-6.4-through.patch [new file with mode: 0644]
meta/recipes-core/musl/musl_git.bb

diff --git a/meta/recipes-core/musl/musl/0001-Update-syscalls-for-r32-rv64-from-kernel-6.4-through.patch b/meta/recipes-core/musl/musl/0001-Update-syscalls-for-r32-rv64-from-kernel-6.4-through.patch
new file mode 100644 (file)
index 0000000..78ba903
--- /dev/null
@@ -0,0 +1,70 @@
+From 31dce8e958f5185e7fda653214da12bbc75f244e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 Dec 2024 11:16:43 -0800
+Subject: [PATCH] Update syscalls for r32/rv64 from kernel 6.4 through 6.10
+
+Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2024/12/04/3]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ arch/riscv32/bits/syscall.h.in | 11 +++++++++++
+ arch/riscv64/bits/syscall.h.in | 11 +++++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/arch/riscv32/bits/syscall.h.in b/arch/riscv32/bits/syscall.h.in
+index 9228d840..a54d9ffc 100644
+--- a/arch/riscv32/bits/syscall.h.in
++++ b/arch/riscv32/bits/syscall.h.in
+@@ -216,6 +216,7 @@
+ #define __NR_perf_event_open 241
+ #define __NR_accept4 242
+ #define __NR_arch_specific_syscall 244
++#define __NR_riscv_hwprobe 258
+ #define __NR_prlimit64 261
+ #define __NR_fanotify_init 262
+ #define __NR_fanotify_mark 263
+@@ -295,6 +296,16 @@
+ #define __NR_cachestat                451
+ #define __NR_fchmodat2                452
+ #define __NR_futex __NR_futex_time64
++#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_list_modules 461
++#define __NR_lsm_set_self_attr 460
++#define __NR_mseal 462
+ #define __NR_sysriscv __NR_arch_specific_syscall
+ #define __NR_riscv_flush_icache (__NR_sysriscv + 15)
+diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in
+index e362bd0e..6991a89c 100644
+--- a/arch/riscv64/bits/syscall.h.in
++++ b/arch/riscv64/bits/syscall.h.in
+@@ -242,6 +242,7 @@
+ #define __NR_accept4 242
+ #define __NR_recvmmsg 243
+ #define __NR_arch_specific_syscall 244
++#define __NR_riscv_hwprobe 258
+ #define __NR_wait4 260
+ #define __NR_prlimit64 261
+ #define __NR_fanotify_init 262
+@@ -304,6 +305,16 @@
+ #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_list_modules 461
++#define __NR_lsm_set_self_attr 460
++#define __NR_mseal 462
+ #define __NR_sysriscv __NR_arch_specific_syscall
+ #define __NR_riscv_flush_icache (__NR_sysriscv + 15)
index 2ce16d041dd31d97a657b7817cff4c960c994d00..9d33df4996806578de136f6e556ea221f791c234 100644 (file)
@@ -13,6 +13,7 @@ PV = "${BASEVER}+git"
 SRC_URI = "git://git.musl-libc.org/musl;branch=master \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+           file://0001-Update-syscalls-for-r32-rv64-from-kernel-6.4-through.patch \
           "
 
 S = "${WORKDIR}/git"