506967 Implement and override mallinfo2
506970 mmap needs an EBADF fd_allowed check
507173 s390x: Crash when constant folding is disabled
+507897 Allow for patching LTP sources
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
echo "$(LTP_SHA256_SUM) $(LTP_TAR)" | @SHA256SUM@ --check -
(cd $(AUX_CHECK_DIR) && \
tar Jxf $(LTP_TAR_NAME) && \
+ $(abs_top_srcdir)/auxprogs/ltp-apply-patches.sh $(LTP_SRC_DIR) && \
cd $(LTP_SRC_DIR) && \
./configure CC="${CC}" CXX="${CXX}" CFLAGS="$(LTP_CFLAGS)" && \
${MAKE} -j $(nproc) -C testcases/kernel/syscalls)
--- /dev/null
+#!/bin/bash
+
+set -xe
+
+LTP_SRC_DIR=$1
+cd $(dirname $(readlink -f $0))
+echo "applying LTP patches ..."
+if compgen -G "ltp-patches/*.patch"; then
+ for i in ltp-patches/*.patch; do
+ patch -d "$LTP_SRC_DIR" -p1 < "$i"
+ done
+ echo "applying LTP patches finished"
+else
+ echo "no patches found, nothing to do"
+fi
--- /dev/null
+From a90b2aac69028bd6b9e0fcc1e36760639b937b99 Mon Sep 17 00:00:00 2001
+From: Martin Cermak <mcermak@redhat.com>
+Date: Mon, 4 Aug 2025 21:46:52 +0200
+Subject: [PATCH] Make sure 32-bit powerpc syscall defs don't leak to 64-bit
+ powerpc systems
+
+generate_syscalls.sh generates the syscalls.h header at the configure
+time. At the moment, that header has a set of 32-bit syscalls defined
+with the __powerpc__ gate, plus another set of 64-bit syscalls defined
+with the __powerpc64__ gate. For 32-bit powerpc systems that's fine.
+But for a 64-bit powerpc system this means that both sets of syscalls
+become defined, which isn't right.
+
+Thing is that on a 64-bit powerpc system, both __powerpc__ and
+__powerpc64__ are defined compiler macros, while on a 32-bit powerpc
+system, only the former is defined while the latter is not.
+
+That said, the correct gate for a 32-bit only powerpc code is:
+ #if defined(__powerpc__) && !defined(__powerpc64__)
+
+Without this patch, e.g. __NR_clock_gettime64 def leaks to
+64-bit powerpc systems, which is wrong. This patch fixes it.
+---
+ include/lapi/syscalls/generate_syscalls.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/lapi/syscalls/generate_syscalls.sh b/include/lapi/syscalls/generate_syscalls.sh
+index b17c72ddf..19f280dfb 100755
+--- a/include/lapi/syscalls/generate_syscalls.sh
++++ b/include/lapi/syscalls/generate_syscalls.sh
+@@ -78,6 +78,7 @@ while IFS= read -r arch; do
+ parisc) echo "#ifdef __hppa__" ;;
+ loongarch64) echo "#ifdef __loongarch__" ;;
+ arm64) echo "#ifdef __aarch64__" ;;
++ powerpc) echo "#if defined(__powerpc__) && !defined(__powerpc64__)" ;;
+ *) echo "#ifdef __${arch}__" ;;
+ esac
+
+--
+2.48.1
+