From b4dd3d24d59f58bb8d96efd9be4212b7eac69bc6 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Fri, 27 Jun 2025 09:46:41 -0400 Subject: [PATCH] Rebase to stress-ng-0.19.01 upstream Resolves: RHEL-86707 Signed-off-by: John Kacur --- ...other-kernel-commit-to-the-2024-kern.patch | 26 -- ...im-to-ppoll-and-workaround-fortifica.patch | 224 ------------------ ..._FORTIFY_SOURCE-to-2-for-ALT-linux-g.patch | 104 -------- ...-use-shim-d-types-for-shim_poll-args.patch | 42 ---- ...-stress-fflush-opened-writable-files.patch | 83 ------- ...es-add-more-power9-10-11-target-clon.patch | 51 ---- sources | 2 +- ...e-the-failure-sbrk-errno-is-being-ch.patch | 71 ------ stress-fp-error-remove-duplicated-sqrt.patch | 34 --- stress-ng.spec | 15 +- 10 files changed, 6 insertions(+), 646 deletions(-) delete mode 100644 README.md-add-another-kernel-commit-to-the-2024-kern.patch delete mode 100644 core-shim-add-shim-to-ppoll-and-workaround-fortifica.patch delete mode 100644 core-shim-limit-_FORTIFY_SOURCE-to-2-for-ALT-linux-g.patch delete mode 100644 core-shim-use-shim-d-types-for-shim_poll-args.patch delete mode 100644 core-stress-fflush-opened-writable-files.patch delete mode 100644 core-target-clones-add-more-power9-10-11-target-clon.patch delete mode 100644 stress-brk-ensure-the-failure-sbrk-errno-is-being-ch.patch delete mode 100644 stress-fp-error-remove-duplicated-sqrt.patch diff --git a/README.md-add-another-kernel-commit-to-the-2024-kern.patch b/README.md-add-another-kernel-commit-to-the-2024-kern.patch deleted file mode 100644 index cbd4d8c..0000000 --- a/README.md-add-another-kernel-commit-to-the-2024-kern.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9fc2f3ae54d9ce11b8c390d198ed540850f70cb2 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Mon, 4 Nov 2024 11:25:46 +0000 -Subject: [PATCH 3/8] README.md: add another kernel commit to the 2024 kernel - bug list - -Signed-off-by: Colin Ian King ---- - README.md | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/README.md b/README.md -index 40953ac81200..47ec76a3ea91 100644 ---- a/README.md -+++ b/README.md -@@ -487,6 +487,7 @@ stress-ng has found various Kernel, QEMU bugs/regressions, and libc bugs; approp - * [cygwin: timer_delete: Fix return value](https://sourceware.org/pipermail/cygwin-patches/2024q4/012803.html) - * [security/keys: fix slab-out-of-bounds in key_task_permission](https://www.spinics.net/lists/kernel/msg5392458.html) - * [sched_ext: Don't hold scx_tasks_lock for too long](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?b07996c7abac0fe3f70bf74b0b3f76eb7852ef5a) -+* [sched/numa: Fix the potential null pointer dereference in task_numa_work()](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?9c70b2a33cd2aa6a5a59c5523ef053bd42265209) - - ## Kernel improvements that used stress-ng - --- -2.47.0 - diff --git a/core-shim-add-shim-to-ppoll-and-workaround-fortifica.patch b/core-shim-add-shim-to-ppoll-and-workaround-fortifica.patch deleted file mode 100644 index 20c289f..0000000 --- a/core-shim-add-shim-to-ppoll-and-workaround-fortifica.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 9b3e9418715b013889e487ac40d14b85a2def7c4 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Mon, 4 Nov 2024 14:29:09 +0000 -Subject: [PATCH 4/8] core-shim: add shim to ppoll() and workaround - fortification issues - -It appears that ppoll() on 32 bit builds with _FORTIFY_SOURCE > 2 can -cause some issues on some build environments. Workaround this by -adding a shim_ppoll() wrapper with reduced _FORTIFY_SOURCE settings -to workaround this issue. - -Signed-off-by: Colin Ian King ---- - core-shim.c | 37 +++++++++++++++++++++++++++++++++++++ - core-shim.h | 20 ++++++++++++++++++++ - stress-poll.c | 6 +++--- - stress-procfs.c | 2 +- - stress-sysbadaddr.c | 8 ++++---- - stress-syscall.c | 2 +- - stress-sysfs.c | 2 +- - 7 files changed, 67 insertions(+), 10 deletions(-) - -diff --git a/core-shim.c b/core-shim.c -index e291f2364640..8f51991137e3 100644 ---- a/core-shim.c -+++ b/core-shim.c -@@ -2824,3 +2824,40 @@ int shim_mseal(void *addr, size_t len, unsigned long flags) - return shim_enosys(0, addr, len, flags); - #endif - } -+ -+ -+/* -+ * shim_ppoll() -+ * shim wrapper for ppoll -+ */ -+int shim_ppoll( -+ struct pollfd *fds, -+ nfds_t nfds, -+ const struct timespec *tmo_p, -+ const sigset_t *sigmask) -+{ -+ -+#if defined(HAVE_PPOLL) -+ -+#if defined(_FORTIFY_SOURCE) -+#undef STRESS__FORTIFY_SOURCE -+#define STRESS__FORTIFY_SOURCE _FORTIFY_SOURCE -+#undef _FORTIFY_SOURCE -+#define _FORTIFY_SOURCE 2 -+#endif -+ -+ return ppoll(fds, nfds, tmo_p, sigmask); -+ -+#if defined(STRESS__FORTIFY_SOURCE) -+#undef _FORTIFY_SOURCE -+#define _FORTIFY_SOURCE STRESS__FORTIFY_SOURCE -+#undef STRESS__FORTIFY_SOURCE -+#endif -+ -+#elif defined(__NR_ppoll) -+ return (int)syscall(__NR_ppoll, fds, nfds, tmo_p, sigmask); -+#else -+ return shim_enosys(0, fds, nfds, tmo_p, sigmask); -+#endif -+} -+ -diff --git a/core-shim.h b/core-shim.h -index 604f187828ac..2ec591f00ba4 100644 ---- a/core-shim.h -+++ b/core-shim.h -@@ -23,6 +23,10 @@ - #include - #endif - -+#if defined(HAVE_POLL_H) -+#include -+#endif -+ - #include - #include - #include -@@ -325,6 +329,20 @@ typedef struct shim_timex { - } shim_timex_t; - #endif - -+#if defined(HAVE_PPOLL) -+typedef nfds_t shim_nfds_t; -+ -+typedef struct pollfd shim_pollfd_t; -+#else -+typedef unsigned int shim_nfds_t; -+ -+typedef struct shim_pollfd { -+ int fd; -+ short events; -+ short revents; -+} shim_pollfd_t; -+#endif -+ - /* - * shim_unconstify_ptr() - * some older system calls require non-const void * -@@ -502,5 +520,7 @@ extern int shim_lstat(const char *pathname, struct stat *statbuf); - extern int shim_stat(const char *pathname, struct stat *statbuf); - extern unsigned char shim_dirent_type(const char *path, const struct dirent *d); - extern int shim_mseal(void *addr, size_t len, unsigned long flags); -+extern int shim_ppoll(struct pollfd *fds, nfds_t nfds, -+ const struct timespec *tmo_p, const sigset_t *sigmask); - - #endif -diff --git a/stress-poll.c b/stress-poll.c -index 83d6c55c7375..406b106aa365 100644 ---- a/stress-poll.c -+++ b/stress-poll.c -@@ -277,7 +277,7 @@ abort: - (void)sigemptyset(&sigmask); - (void)sigaddset(&sigmask, SIGPIPE); - -- ret = ppoll(poll_fds, max_fds, &ts, &sigmask); -+ ret = shim_ppoll(poll_fds, max_fds, &ts, &sigmask); - if ((g_opt_flags & OPT_FLAGS_VERIFY) && - (ret < 0) && (errno != EINTR)) { - pr_fail("%s: ppoll failed, errno=%d (%s)\n", -@@ -298,7 +298,7 @@ abort: - /* Exercise illegal poll timeout */ - ts.tv_sec = 0; - ts.tv_nsec = 1999999999; -- VOID_RET(int, ppoll(poll_fds, max_fds, &ts, &sigmask)); -+ VOID_RET(int, shim_ppoll(poll_fds, max_fds, &ts, &sigmask)); - if (!stress_continue(args)) - break; - -@@ -317,7 +317,7 @@ abort: - if (LIKELY(setrlimit(RLIMIT_NOFILE, &new_rlim) == 0)) { - ts.tv_sec = 0; - ts.tv_nsec = 0; -- VOID_RET(int, ppoll(poll_fds, max_fds, &ts, &sigmask)); -+ VOID_RET(int, shim_ppoll(poll_fds, max_fds, &ts, &sigmask)); - - (void)setrlimit(RLIMIT_NOFILE, &old_rlim); - if (!stress_continue(args)) -diff --git a/stress-procfs.c b/stress-procfs.c -index 90b045e1368b..94dece7494ed 100644 ---- a/stress-procfs.c -+++ b/stress-procfs.c -@@ -516,7 +516,7 @@ mmap_test: - fds[0].events = POLLIN; - fds[0].revents = 0; - -- VOID_RET(int, ppoll(fds, 1, &ts, &sigmask)); -+ VOID_RET(int, shim_ppoll(fds, 1, &ts, &sigmask)); - } - #endif - -diff --git a/stress-sysbadaddr.c b/stress-sysbadaddr.c -index d77e3f2c9004..e7622bab059c 100644 ---- a/stress-sysbadaddr.c -+++ b/stress-sysbadaddr.c -@@ -1515,7 +1515,7 @@ static void bad_ppoll1(stress_bad_addr_t *ba, volatile uint64_t *counter) - sigset_t *ss = (sigset_t *)(inc_addr(addr, sizeof(struct pollfd) + sizeof(struct timespec))); - - (*counter)++; -- VOID_RET(int, ppoll((struct pollfd *)addr, (nfds_t)1, ts, ss)); -+ VOID_RET(int, shim_ppoll((struct pollfd *)addr, (nfds_t)1, ts, ss)); - } - - static void bad_ppoll2(stress_bad_addr_t *ba, volatile uint64_t *counter) -@@ -1528,7 +1528,7 @@ static void bad_ppoll2(stress_bad_addr_t *ba, volatile uint64_t *counter) - ts.tv_nsec = 0; - - (*counter)++; -- VOID_RET(int, ppoll((struct pollfd *)ba->addr, (nfds_t)16, &ts, &sigmask)); -+ VOID_RET(int, shim_ppoll((struct pollfd *)ba->addr, (nfds_t)16, &ts, &sigmask)); - } - - static void bad_ppoll3(stress_bad_addr_t *ba, volatile uint64_t *counter) -@@ -1543,7 +1543,7 @@ static void bad_ppoll3(stress_bad_addr_t *ba, volatile uint64_t *counter) - (void)sigemptyset(&sigmask); - - (*counter)++; -- VOID_RET(int, ppoll(&pfd, (nfds_t)1, (struct timespec *)ba->addr, &sigmask)); -+ VOID_RET(int, shim_ppoll(&pfd, (nfds_t)1, (struct timespec *)ba->addr, &sigmask)); - } - } - -@@ -1560,7 +1560,7 @@ static void bad_ppoll4(stress_bad_addr_t *ba, volatile uint64_t *counter) - ts.tv_nsec = 0; - - (*counter)++; -- VOID_RET(int, ppoll(&pfd, (nfds_t)1, &ts, (sigset_t *)ba->addr)); -+ VOID_RET(int, shim_ppoll(&pfd, (nfds_t)1, &ts, (sigset_t *)ba->addr)); - } - } - #endif -diff --git a/stress-syscall.c b/stress-syscall.c -index 91fa08e7425f..ca75669acb63 100644 ---- a/stress-syscall.c -+++ b/stress-syscall.c -@@ -4563,7 +4563,7 @@ static int syscall_ppoll(void) - VOID_RET(int, sigemptyset(&sigmask)); - - t1 = syscall_time_now(); -- ret = ppoll(fds, SIZEOF_ARRAY(fds), &ts, &sigmask); -+ ret = shim_ppoll(fds, SIZEOF_ARRAY(fds), &ts, &sigmask); - t2 = syscall_time_now(); - return ret; - } -diff --git a/stress-sysfs.c b/stress-sysfs.c -index 4ee4d8237b87..25f032cbe3eb 100644 ---- a/stress-sysfs.c -+++ b/stress-sysfs.c -@@ -328,7 +328,7 @@ static inline bool stress_sys_rw(stress_ctxt_t *ctxt) - ts.tv_nsec = 1000; - - (void)sigemptyset(&sigmask); -- VOID_RET(int, ppoll(fds, 1, &ts, &sigmask)); -+ VOID_RET(int, shim_ppoll(fds, 1, &ts, &sigmask)); - } - #else - UNEXPECTED --- -2.47.0 - diff --git a/core-shim-limit-_FORTIFY_SOURCE-to-2-for-ALT-linux-g.patch b/core-shim-limit-_FORTIFY_SOURCE-to-2-for-ALT-linux-g.patch deleted file mode 100644 index d1721fc..0000000 --- a/core-shim-limit-_FORTIFY_SOURCE-to-2-for-ALT-linux-g.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 4e832afb77a158a6bb59f7adac6d9db5ecd5a4b8 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Tue, 5 Nov 2024 14:40:21 +0000 -Subject: [PATCH 6/8] core-shim: limit _FORTIFY_SOURCE to 2 for ALT linux gcc - for ppoll workaround - -Fixes: https://github.com/ColinIanKing/stress-ng/issues/452 - -Signed-off-by: Colin Ian King ---- - Makefile | 8 ++++++++ - core-shim.c | 40 ++++++++++++++++++++++------------------ - 2 files changed, 30 insertions(+), 18 deletions(-) - -diff --git a/Makefile b/Makefile -index 2661376a258a..cb395115cd64 100644 ---- a/Makefile -+++ b/Makefile -@@ -52,6 +52,14 @@ ifneq ($(shell $(CC) -v 2>&1 | grep scan-build),) - COMPILER = scan-build - endif - -+# -+# check for ALT linux gcc, define HAVE_ALT_LINUX_GCC, see core-shim.c -+# https://github.com/ColinIanKing/stress-ng/issues/452 -+# -+ifneq ($(shell $(CC) -v 2>&1 | grep Target | grep "alt-linux"),) -+override CFLAGS += -DHAVE_ALT_LINUX_GCC -+endif -+ - KERNEL=$(shell uname -s) - NODENAME=$(shell uname -n) - -diff --git a/core-shim.c b/core-shim.c -index a7813474ab86..2f4b88f8188c 100644 ---- a/core-shim.c -+++ b/core-shim.c -@@ -19,6 +19,17 @@ - */ - #define STRESS_CORE_SHIM - -+/* -+ * For ALT Linux gcc use at most _FORTIFY_SOURCE level 2 -+ * https://github.com/ColinIanKing/stress-ng/issues/452 -+ */ -+#if defined(HAVE_ALT_LINUX_GCC) && \ -+ defined(_FORTIFY_SOURCE) && \ -+ _FORTIFY_SOURCE > 2 -+#undef _FORTIFY_SOURCE -+#define _FORTIFY_SOURCE 2 -+#endif -+ - #include "stress-ng.h" - #include "core-arch.h" - #include "core-attribute.h" -@@ -2825,7 +2836,6 @@ int shim_mseal(void *addr, size_t len, unsigned long flags) - #endif - } - -- - /* - * shim_ppoll() - * shim wrapper for ppoll -@@ -2836,26 +2846,20 @@ int shim_ppoll( - const struct timespec *tmo_p, - const sigset_t *sigmask) - { -- - #if defined(HAVE_PPOLL) -- --#if defined(_FORTIFY_SOURCE) --#undef STRESS__FORTIFY_SOURCE --#define STRESS__FORTIFY_SOURCE _FORTIFY_SOURCE --#undef _FORTIFY_SOURCE --#define _FORTIFY_SOURCE 2 --#endif -- - return ppoll(fds, nfds, tmo_p, sigmask); -+#elif defined(__NR_ppoll) && defined(_NSIG) -+ struct timespec tval; - --#if defined(STRESS__FORTIFY_SOURCE) --#undef _FORTIFY_SOURCE --#define _FORTIFY_SOURCE STRESS__FORTIFY_SOURCE --#undef STRESS__FORTIFY_SOURCE --#endif -- --#elif defined(__NR_ppoll) -- return (int)syscall(__NR_ppoll, fds, nfds, tmo_p, sigmask); -+ /* -+ * The kernel will update the timeout, so use a tmp val -+ * instead -+ */ -+ if (tmo_p != NULL) { -+ tval = *tmo_p; -+ tmo_p = &tval; -+ } -+ return (int)syscall(__NR_ppoll, fds, nfds, tmo_p, sigmask, _NSIG / 8); - #else - return shim_enosys(0, fds, nfds, tmo_p, sigmask); - #endif --- -2.47.0 - diff --git a/core-shim-use-shim-d-types-for-shim_poll-args.patch b/core-shim-use-shim-d-types-for-shim_poll-args.patch deleted file mode 100644 index d48aa68..0000000 --- a/core-shim-use-shim-d-types-for-shim_poll-args.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 15484dc9c24be214059b5bfecccb6f26bd79833c Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Mon, 4 Nov 2024 21:51:19 +0000 -Subject: [PATCH 5/8] core-shim: use shim'd types for shim_poll args - -Signed-off-by: Colin Ian King ---- - core-shim.c | 4 ++-- - core-shim.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/core-shim.c b/core-shim.c -index 8f51991137e3..a7813474ab86 100644 ---- a/core-shim.c -+++ b/core-shim.c -@@ -2831,8 +2831,8 @@ int shim_mseal(void *addr, size_t len, unsigned long flags) - * shim wrapper for ppoll - */ - int shim_ppoll( -- struct pollfd *fds, -- nfds_t nfds, -+ shim_pollfd_t *fds, -+ shim_nfds_t nfds, - const struct timespec *tmo_p, - const sigset_t *sigmask) - { -diff --git a/core-shim.h b/core-shim.h -index 2ec591f00ba4..1ea0910200c1 100644 ---- a/core-shim.h -+++ b/core-shim.h -@@ -520,7 +520,7 @@ extern int shim_lstat(const char *pathname, struct stat *statbuf); - extern int shim_stat(const char *pathname, struct stat *statbuf); - extern unsigned char shim_dirent_type(const char *path, const struct dirent *d); - extern int shim_mseal(void *addr, size_t len, unsigned long flags); --extern int shim_ppoll(struct pollfd *fds, nfds_t nfds, -+extern int shim_ppoll(shim_pollfd_t *fds, shim_nfds_t nfds, - const struct timespec *tmo_p, const sigset_t *sigmask); - - #endif --- -2.47.0 - diff --git a/core-stress-fflush-opened-writable-files.patch b/core-stress-fflush-opened-writable-files.patch deleted file mode 100644 index a875aef..0000000 --- a/core-stress-fflush-opened-writable-files.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 69d710955063add902754f2bd841f9b12e59cc16 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Fri, 1 Nov 2024 12:56:24 +0000 -Subject: [PATCH] core-*, stress-*: fflush opened writable files - -Signed-off-by: Colin Ian King ---- - core-klog.c | 2 ++ - stress-jpeg.c | 1 + - stress-ng.c | 1 + - stress-opcode.c | 3 +++ - stress-rename.c | 1 + - 5 files changed, 8 insertions(+) - -diff --git a/core-klog.c b/core-klog.c -index 419e59b6f922..348608c28ac8 100644 ---- a/core-klog.c -+++ b/core-klog.c -@@ -223,9 +223,11 @@ log_info: - last_logged = stress_time_now(); - } - } -+ (void)fflush(klog_fp); - (void)fclose(klog_fp); - _exit(EXIT_SUCCESS); - } -+ (void)fflush(klog_fp); - (void)fclose(klog_fp); - #endif - } -diff --git a/stress-jpeg.c b/stress-jpeg.c -index 4afe5018bd4b..8a8104f37b2b 100644 ---- a/stress-jpeg.c -+++ b/stress-jpeg.c -@@ -316,6 +316,7 @@ PRAGMA_UNROLL_N(8) - - (void)jpeg_write_scanlines(&cinfo, row_pointer, (JDIMENSION)y_max); - jpeg_finish_compress(&cinfo); -+ (void)fflush(fp); - (void)fclose(fp); - jpeg_destroy_compress(&cinfo); - t2 = stress_time_now(); -diff --git a/stress-ng.c b/stress-ng.c -index a1d38e79cfee..17bd2f42c300 100644 ---- a/stress-ng.c -+++ b/stress-ng.c -@@ -3770,6 +3770,7 @@ static void stress_yaml_close(FILE *yaml) - { - if (yaml) { - pr_yaml(yaml, "...\n"); -+ (void)fflush(yaml); - (void)fclose(yaml); - } - } -diff --git a/stress-opcode.c b/stress-opcode.c -index cec65ec51cde..c7c1a5b2e653 100644 ---- a/stress-opcode.c -+++ b/stress-opcode.c -@@ -513,6 +513,9 @@ again: - * corruption since the child will - * die soon anyhow - */ -+ (void)fflush(stdout); -+ (void)fflush(stderr); -+ - (void)fclose(stdin); - (void)fclose(stdout); - (void)fclose(stderr); -diff --git a/stress-rename.c b/stress-rename.c -index 0dee9e75f04a..b0b3d119e5b6 100644 ---- a/stress-rename.c -+++ b/stress-rename.c -@@ -267,6 +267,7 @@ restart: - #endif - return rc; - } -+ (void)fflush(fp); - (void)fclose(fp); - - while (stress_continue(args)) { --- -2.47.0 - diff --git a/core-target-clones-add-more-power9-10-11-target-clon.patch b/core-target-clones-add-more-power9-10-11-target-clon.patch deleted file mode 100644 index d59f65d..0000000 --- a/core-target-clones-add-more-power9-10-11-target-clon.patch +++ /dev/null @@ -1,51 +0,0 @@ -From a679a1fa9331e9b07e0c3a87f62cbda2511e9453 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Tue, 5 Nov 2024 16:06:01 +0000 -Subject: [PATCH 7/8] core-target-clones: add more power9,10,11 target clone - build time constraints - -Adding a gcc check for the builtins for power9,10,11 makes the target clone -built time constraints more conservative. - -Fixes: https://github.com/ColinIanKing/stress-ng/issues/451 - -Signed-off-by: Colin Ian King ---- - core-target-clones.h | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/core-target-clones.h b/core-target-clones.h -index 874d590cdc2b..c2166e51f339 100644 ---- a/core-target-clones.h -+++ b/core-target-clones.h -@@ -198,21 +198,24 @@ - #if defined(STRESS_ARCH_PPC64) && \ - defined(HAVE_TARGET_CLONES) - --#if defined(HAVE_TARGET_CLONES_POWER9) -+#if defined(HAVE_TARGET_CLONES_POWER9) && \ -+ defined(HAVE_BUILTIN_CPU_IS_POWER10) - #define TARGET_CLONE_POWER9 "cpu=power9", - #define TARGET_CLONE_USE - #else - #define TARGET_CLONE_POWER9 - #endif - --#if defined(HAVE_TARGET_CLONES_POWER10) -+#if defined(HAVE_TARGET_CLONES_POWER10) && \ -+ defined(HAVE_BUILTIN_CPU_IS_POWER10) - #define TARGET_CLONE_POWER10 "cpu=power10", - #define TARGET_CLONE_USE - #else - #define TARGET_CLONE_POWER10 - #endif - --#if defined(HAVE_TARGET_CLONES_POWER11) -+#if defined(HAVE_TARGET_CLONES_POWER11) && \ -+ defined(HAVE_BUILTIN_CPU_IS_POWER11) - #define TARGET_CLONE_POWER11 "cpu=power11", - #define TARGET_CLONE_USE - #else --- -2.47.0 - diff --git a/sources b/sources index e4daedc..0d6daed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (stress-ng-0.18.06.tar.xz) = 2b3da9ae31b7b766d7b727552286e3803a5a5099e844705a63d4952897920ed46deb3f657b48bebd97d7ddaaa2ce20a1037915e06f358aa3e041719fd15625b6 +SHA512 (stress-ng-0.19.01.tar.xz) = 35635f41bfb5c7fe511a7a6da63826c6559d025142a3a3e15abcd6d912a343c828c0707d388a6ae8563c396d1595abab6538935eedcaf2ee28942d0ded068192 diff --git a/stress-brk-ensure-the-failure-sbrk-errno-is-being-ch.patch b/stress-brk-ensure-the-failure-sbrk-errno-is-being-ch.patch deleted file mode 100644 index c1f6086..0000000 --- a/stress-brk-ensure-the-failure-sbrk-errno-is-being-ch.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 29f7704ec82e90d487e364a587bb30c264d0706f Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Wed, 6 Nov 2024 11:51:27 +0000 -Subject: [PATCH 8/8] stress-brk: ensure the failure sbrk errno is being - checked - -The check on errno is using the current value in errno and not the one -from a failed sbrk() call. Save the errno and check this rather than -the current errno. - -Signed-off-by: Colin Ian King ---- - stress-brk.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/stress-brk.c b/stress-brk.c -index f71efa364956..ec3d9b417bdb 100644 ---- a/stress-brk.c -+++ b/stress-brk.c -@@ -140,6 +140,7 @@ static int OPTIMIZE3 stress_brk_child(stress_args_t *args, void *context) - - do { - double t; -+ int saved_errno = 0; - - if (stress_brk_abs(ptr, start_ptr) > brk_bytes) { - ptr = start_ptr; -@@ -174,6 +175,7 @@ static int OPTIMIZE3 stress_brk_child(stress_args_t *args, void *context) - tmp = (uintptr_t *)((uintptr_t)ptr - sizeof(uintptr_t)); - *tmp = (uintptr_t)tmp; - } else { -+ saved_errno = errno; - if (brk_failed_ptr == ptr) { - brk_failed_count++; - if (brk_failed_count > 32) { -@@ -187,6 +189,7 @@ static int OPTIMIZE3 stress_brk_child(stress_args_t *args, void *context) - } else if (i < 9) { - /* brk to same brk position */ - if (UNLIKELY(shim_brk(ptr) < 0)) { -+ saved_errno = errno; - ptr = start_ptr; - i = 0; - } -@@ -194,6 +197,7 @@ static int OPTIMIZE3 stress_brk_child(stress_args_t *args, void *context) - /* Shrink brk by 1 page */ - t = stress_time_now(); - if (LIKELY(shim_sbrk(-page_size) != (void *)-1)) { -+ saved_errno = errno; - sbrk_shr_duration += stress_time_now() - t; - sbrk_shr_count += 1.0; - ptr -= page_size; -@@ -225,13 +229,13 @@ static int OPTIMIZE3 stress_brk_child(stress_args_t *args, void *context) - } - - if (UNLIKELY(ptr == (void *)-1)) { -- if (LIKELY((errno == ENOMEM) || (errno == EAGAIN))) { -+ if (LIKELY((saved_errno == ENOMEM) || (saved_errno == EAGAIN))) { - VOID_RET(int, shim_brk(start_ptr)); - i = 0; - } else { - pr_fail("%s: sbrk(%d) failed: errno=%d (%s)\n", -- args->name, (int)page_size, errno, -- strerror(errno)); -+ args->name, (int)page_size, saved_errno, -+ strerror(saved_errno)); - return EXIT_FAILURE; - } - } --- -2.47.0 - diff --git a/stress-fp-error-remove-duplicated-sqrt.patch b/stress-fp-error-remove-duplicated-sqrt.patch deleted file mode 100644 index 72824ee..0000000 --- a/stress-fp-error-remove-duplicated-sqrt.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7937cf205f653eb056588861e35489c4153c5b1c Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Fri, 1 Nov 2024 18:31:57 +0000 -Subject: [PATCH 2/6] stress-fp-error: remove duplicated sqrt - -The sqrt() is duplictated, remove it. Kudos to Woodrow Shen for spotting -this. - -Closes: https://github.com/ColinIanKing/stress-ng/issues/450 - -Signed-off-by: Colin Ian King ---- - stress-fp-error.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/stress-fp-error.c b/stress-fp-error.c -index d5eac54c7b95..fe4d80146652 100644 ---- a/stress-fp-error.c -+++ b/stress-fp-error.c -@@ -163,11 +163,6 @@ static int stress_fp_error(stress_args_t *args) - stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), (double)NAN, - true, false, EDOM, FE_INVALID, &rc); - #endif --#if defined(EDOM) && defined(FE_INVALID) -- stress_fp_clear_error(); -- stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), (double)NAN, -- true, false, EDOM, FE_INVALID, &rc); --#endif - #if defined(FE_INEXACT) - #if !defined(STRESS_ARCH_ALPHA) - /* --- -2.47.0 - diff --git a/stress-ng.spec b/stress-ng.spec index 8f2d2cb..7329027 100644 --- a/stress-ng.spec +++ b/stress-ng.spec @@ -1,5 +1,5 @@ Name: stress-ng -Version: 0.18.06 +Version: 0.19.01 Release: 1%{?dist} Summary: Stress test a computer system in various ways @@ -25,14 +25,6 @@ BuildRequires: zlib-devel BuildRequires: Judy-devel # Patches -Patch1: core-stress-fflush-opened-writable-files.patch -Patch2: stress-fp-error-remove-duplicated-sqrt.patch -Patch3: README.md-add-another-kernel-commit-to-the-2024-kern.patch -Patch4: core-shim-add-shim-to-ppoll-and-workaround-fortifica.patch -Patch5: core-shim-use-shim-d-types-for-shim_poll-args.patch -Patch6: core-shim-limit-_FORTIFY_SOURCE-to-2-for-ALT-linux-g.patch -Patch7: core-target-clones-add-more-power9-10-11-target-clon.patch -Patch8: stress-brk-ensure-the-failure-sbrk-errno-is-being-ch.patch %description Stress test a computer system in various ways. It was designed to exercise @@ -41,7 +33,6 @@ system kernel interfaces. %prep %setup -q -%patch1 -p1 %build export CFLAGS="%{optflags}" @@ -65,6 +56,10 @@ install -pm 644 bash-completion/%{name} \ %{_datadir}/bash-completion/completions/%{name} %changelog +* Fri Jun 27 2025 John Kacur - 0.19.01-1 +- Rebase to stress-ng-0.19.01 upstream +Resolves: RHEL-86707 + * Wed Nov 06 2024 John Kacur - 0.18.06-1 - Update the stress-ng-0.18.06 upstream - Include some upstream patches after 0.18.06