From 0a8747a2e12faf6bf3fd10c66fa0a3f38290db41 Mon Sep 17 00:00:00 2001 From: panchenbo Date: Wed, 6 Sep 2023 15:21:30 +0800 Subject: [PATCH] add loongarch64 and sw_64 syscall_fork support --- ...-add-loongarch64-support-for-syscall_fork.patch | 13 +++++++++++++ 1001-add-sw_64-support-for-syscall_fork.patch | 14 ++++++++++++++ qt5-qtbase.spec | 11 ++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 1000-add-loongarch64-support-for-syscall_fork.patch create mode 100644 1001-add-sw_64-support-for-syscall_fork.patch diff --git a/1000-add-loongarch64-support-for-syscall_fork.patch b/1000-add-loongarch64-support-for-syscall_fork.patch new file mode 100644 index 0000000..3788b4a --- /dev/null +++ b/1000-add-loongarch64-support-for-syscall_fork.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c +index ffe0e9a5..1ec9fea4 100644 +--- a/src/3rdparty/forkfd/forkfd_linux.c ++++ b/src/3rdparty/forkfd/forkfd_linux.c +@@ -82,7 +82,7 @@ static int sys_clone(unsigned long cloneflags, int *ptid) + return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid); + #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \ + defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \ +- defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) ++ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || defined(__loongarch64) + /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures, + * but since both values are 0, there's no harm. */ + return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls); diff --git a/1001-add-sw_64-support-for-syscall_fork.patch b/1001-add-sw_64-support-for-syscall_fork.patch new file mode 100644 index 0000000..aad6165 --- /dev/null +++ b/1001-add-sw_64-support-for-syscall_fork.patch @@ -0,0 +1,14 @@ +diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c +index 1ec9fea4..2e9a7b68 100644 +--- a/src/3rdparty/forkfd/forkfd_linux.c ++++ b/src/3rdparty/forkfd/forkfd_linux.c +@@ -82,7 +82,8 @@ static int sys_clone(unsigned long cloneflags, int *ptid) + return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid); + #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \ + defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \ +- defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || defined(__loongarch64) ++ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \ ++ defined(__loongarch64) ||defined(__sw_64__) + /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures, + * but since both values are 0, there's no harm. */ + return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls); diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index 13ef052..9f81096 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -34,7 +34,7 @@ BuildRequires: pkgconfig(libsystemd) Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.15.2 -Release: 8 +Release: 9 # See LGPL_EXCEPTIONS.txt, for exception details @@ -122,6 +122,10 @@ Patch0025: CVE-2023-32763.patch # https://download.qt.io/official_releases/qt/5.15/CVE-2023-37369-qtbase-5.15.diff Patch0026: CVE-2023-37369-pre.patch Patch0027: CVE-2023-37369.patch + +Patch1000: 1000-add-loongarch64-support-for-syscall_fork.patch +Patch1001: 1001-add-sw_64-support-for-syscall_fork.patch + # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. # Those themes are there for platform integration. If the required libraries are # not there, the platform to integrate with isn't either. Then Qt will just @@ -384,6 +388,8 @@ Qt5 libraries used for drawing widgets and OpenGL items. %patch0025 -p1 %patch0026 -p1 %patch0027 -p1 +%patch1000 -p1 +%patch1001 -p1 # move some bundled libs to ensure they're not accidentally used pushd src/3rdparty @@ -1026,6 +1032,9 @@ fi %changelog +* Wed Sep 06 2023 panchenbo - 5.15.2-9 +- add loongarch64 and sw_64 syscall_fork support + * Fri Sep 01 2023 wangkai <13474090681@163.com> - 5.15.2-8 - Fix CVE-2023-37369 -- Gitee