Hello community,

here is the log from the commit of package stress-ng for openSUSE:Factory 
checked in at 2017-11-21 15:34:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stress-ng (Old)
 and      /work/SRC/openSUSE:Factory/.stress-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "stress-ng"

Tue Nov 21 15:34:19 2017 rev:22 rq:544076 version:0.09.03

Changes:
--------
--- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes      2017-11-10 
14:57:58.690817746 +0100
+++ /work/SRC/openSUSE:Factory/.stress-ng.new/stress-ng.changes 2017-11-21 
15:34:26.208720930 +0100
@@ -1,0 +2,15 @@
+Mon Nov 20 19:15:59 UTC 2017 - mar...@gmx.de
+
+- Update to version 0.09.03
+  * Makefile: bump version
+  * Manual: update date
+  * stress-physpage: move unsupported function
+  * Add new physpage stressor
+  * Manual: add more notes on the OOM behaviour of the stack stressor
+  * Add in stressor name or core context as prefix in pr_dbg messages
+  * stress-fanotify: write "test" rather than "foo"
+  * stress-exec: don't allow this to run as root, skip rather than fail
+  * stress-ng: remove semaphore.h, it is in stress-ng.h already
+  * stress-hrtimers: don't kill pid 0
+
+-------------------------------------------------------------------

Old:
----
  stress-ng-0.09.02.tar.gz

New:
----
  stress-ng-0.09.03.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ stress-ng.spec ++++++
--- /var/tmp/diff_new_pack.Bhu7t6/_old  2017-11-21 15:34:27.576671359 +0100
+++ /var/tmp/diff_new_pack.Bhu7t6/_new  2017-11-21 15:34:27.576671359 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           stress-ng
-Version:        0.09.02
+Version:        0.09.03
 Release:        0
 Summary:        Tool to load and stress a computer
 License:        GPL-2.0

++++++ stress-ng-0.09.02.tar.gz -> stress-ng-0.09.03.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/Makefile 
new/stress-ng-0.09.03/Makefile
--- old/stress-ng-0.09.02/Makefile      2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/Makefile      2017-11-19 17:02:40.000000000 +0100
@@ -16,7 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
 #
 
-VERSION=0.09.02
+VERSION=0.09.03
 #
 # Codename "harmful hardware harasser"
 #
@@ -156,6 +156,7 @@
        stress-opcode.c \
        stress-open.c \
        stress-personality.c \
+       stress-physpage.c \
        stress-pipe.c \
        stress-poll.c \
        stress-procfs.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/helper.c 
new/stress-ng-0.09.03/helper.c
--- old/stress-ng-0.09.02/helper.c      2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/helper.c      2017-11-19 17:02:40.000000000 +0100
@@ -610,7 +610,7 @@
        char path[PATH_MAX];
 
        if (getcwd(path, sizeof(path)) == NULL) {
-               pr_dbg("Cannot determine current working directory\n");
+               pr_dbg("cwd: Cannot determine current working directory\n");
                return;
        }
        if (access(path, R_OK | W_OK)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/ignite-cpu.c 
new/stress-ng-0.09.03/ignite-cpu.c
--- old/stress-ng-0.09.02/ignite-cpu.c  2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/ignite-cpu.c  2017-11-19 17:02:40.000000000 +0100
@@ -106,7 +106,7 @@
 
        pid = fork();
        if (pid < 0) {
-               pr_dbg("failed to start ignite cpu daemon, "
+               pr_dbg("ignite-cpu: failed to start ignite cpu daemon, "
                        "errno=%d (%s)\n", errno, strerror(errno));
                return;
        } else if (pid == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/perf.c new/stress-ng-0.09.03/perf.c
--- old/stress-ng-0.09.02/perf.c        2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/perf.c        2017-11-19 17:02:40.000000000 +0100
@@ -393,7 +393,7 @@
        if (!sp->perf_opened) {
                pthread_spin_lock(&g_shared->perf.lock);
                if (!g_shared->perf.no_perf) {
-                       pr_dbg("perf_event_open failed, no "
+                       pr_dbg("perf: perf_event_open failed, no "
                                "perf events [%u]\n", getpid());
                        g_shared->perf.no_perf = true;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/sched.c 
new/stress-ng-0.09.03/sched.c
--- old/stress-ng-0.09.02/sched.c       2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/sched.c       2017-11-19 17:02:40.000000000 +0100
@@ -119,7 +119,7 @@
                        return -EINVAL;
                }
                if (!quiet)
-                       pr_dbg("setting scheduler class '%s', priority %d\n",
+                       pr_dbg("sched: setting scheduler class '%s', priority 
%d\n",
                                name, param.sched_priority);
                break;
 #endif
@@ -150,7 +150,7 @@
                        return -EINVAL;
                }
                if (!quiet)
-                       pr_dbg("setting scheduler class '%s'\n",
+                       pr_dbg("sched: setting scheduler class '%s'\n",
                                name);
                attr.sched_runtime = 10000;
                attr.sched_deadline = 100000;
@@ -174,7 +174,7 @@
                                pr_inf("ignoring priority level for "
                                        "scheduler class '%s'\n", name);
                if (!quiet)
-                       pr_dbg("setting scheduler class '%s'\n", name);
+                       pr_dbg("sched: setting scheduler class '%s'\n", name);
                break;
        }
        rc = sched_setscheduler(pid, sched, &param);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-daemon.c 
new/stress-ng-0.09.03/stress-daemon.c
--- old/stress-ng-0.09.02/stress-daemon.c       2017-11-07 15:55:41.000000000 
+0100
+++ new/stress-ng-0.09.03/stress-daemon.c       2017-11-19 17:02:40.000000000 
+0100
@@ -120,8 +120,9 @@
                        if (n < 0) {
                                (void)close(fds[0]);
                                if (errno != EINTR) {
-                                       pr_dbg("read failed: "
+                                       pr_dbg("%s: read failed: "
                                                "errno=%d (%s)\n",
+                                               args->name,
                                                errno, strerror(errno));
                                }
                                break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-exec.c 
new/stress-ng-0.09.03/stress-exec.c
--- old/stress-ng-0.09.02/stress-exec.c 2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-exec.c 2017-11-19 17:02:40.000000000 +0100
@@ -25,6 +25,24 @@
 #include "stress-ng.h"
 
 /*
+ *  stress_exec_supported()
+ *      check that we don't run this as root
+ */
+int stress_exec_supported(void)
+{
+       /*
+        *  Don't want to run this when running as root as
+        *  this could allow somebody to try and run another
+        *  executable as root.
+        */
+        if (geteuid() == 0) {
+               pr_inf("exec stressor must not run as root, skipping the 
stressor\n");
+                return -1;
+        }
+        return 0;
+}
+
+/*
  *  stress_set_exec_max()
  *     set maximum number of forks allowed
  */
@@ -57,16 +75,6 @@
        (void)get_setting("exec-max", &exec_max);
 
        /*
-        *  Don't want to run this when running as root as
-        *  this could allow somebody to try and run another
-        *  executable as root.
-        */
-       if (geteuid() == 0) {
-               pr_inf("%s: running as root, won't run test.\n", args->name);
-               return EXIT_FAILURE;
-       }
-
-       /*
         *  Determine our own self as the executable, e.g. run stress-ng
         */
        len = readlink("/proc/self/exe", path, sizeof(path));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-fanotify.c 
new/stress-ng-0.09.03/stress-fanotify.c
--- old/stress-ng-0.09.02/stress-fanotify.c     2017-11-07 15:55:41.000000000 
+0100
+++ new/stress-ng-0.09.03/stress-fanotify.c     2017-11-19 17:02:40.000000000 
+0100
@@ -160,7 +160,7 @@
                                (void)kill(args->ppid, SIGALRM);
                                _exit(EXIT_FAILURE);
                        }
-                       n = write(fd, "foo", 3);
+                       n = write(fd, "test", 4);
                        (void)n;
                        (void)close(fd);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-hrtimers.c 
new/stress-ng-0.09.03/stress-hrtimers.c
--- old/stress-ng-0.09.02/stress-hrtimers.c     2017-11-07 15:55:41.000000000 
+0100
+++ new/stress-ng-0.09.03/stress-hrtimers.c     2017-11-19 17:02:40.000000000 
+0100
@@ -189,7 +189,7 @@
 
 reap:
        for (i = 0; i < PROCS_MAX; i++) {
-               if (pids[i] >= 0) {
+               if (pids[i] > 0) {
                        int status, ret;
 
                        (void)kill(pids[i], SIGALRM);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-mq.c 
new/stress-ng-0.09.03/stress-mq.c
--- old/stress-ng-0.09.02/stress-mq.c   2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-mq.c   2017-11-19 17:02:40.000000000 +0100
@@ -114,8 +114,8 @@
                        "size %d messages, maximum of %d allowed\n",
                        args->name, mq_size, sz);
        }
-       pr_dbg("POSIX message queue %s with %lu messages\n",
-               mq_name, (unsigned long)attr.mq_maxmsg);
+       pr_dbg("%s: POSIX message queue %s with %lu messages\n",
+               args->name, mq_name, (unsigned long)attr.mq_maxmsg);
 
        if (time(&time_start) == ((time_t)-1)) {
                do_timed = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-msg.c 
new/stress-ng-0.09.03/stress-msg.c
--- old/stress-ng-0.09.02/stress-msg.c  2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-msg.c  2017-11-19 17:02:40.000000000 +0100
@@ -76,7 +76,7 @@
                pr_fail_dbg("msgget");
                return exit_status(errno);
        }
-       pr_dbg("System V message queue created, id: %d\n", msgq_id);
+       pr_dbg("%s: System V message queue created, id: %d\n", args->name, 
msgq_id);
 
 again:
        pid = fork();
@@ -142,7 +142,7 @@
                if (msgctl(msgq_id, IPC_RMID, NULL) < 0)
                        pr_fail_dbg("msgctl");
                else
-                       pr_dbg("System V message queue deleted, id: %d\n", 
msgq_id);
+                       pr_dbg("%s: System V message queue deleted, id: %d\n", 
args->name, msgq_id);
        }
        return EXIT_SUCCESS;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-ng.1 
new/stress-ng-0.09.03/stress-ng.1
--- old/stress-ng-0.09.02/stress-ng.1   2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-ng.1   2017-11-19 17:02:40.000000000 +0100
@@ -2,7 +2,7 @@
 .\" First parameter, NAME, should be all caps
 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
 .\" other parameters are allowed: see man(7), man(1)
-.TH STRESS-NG 1 "November 7, 2017"
+.TH STRESS-NG 1 "November 19, 2017"
 .\" Please adjust this date whenever revising the manpage.
 .\"
 .\" Some roff macros, for reference:
@@ -2148,6 +2148,15 @@
 .B \-\-personality\-ops N
 stop personality stress workers after N bogo personality operations.
 .TP
+.B \-\-physpage N
+start N workers that use /proc/self/pagemap and /proc/kpagecount to determine
+the physical page and page count of a virtual mapped page and a page that is
+shared among all the stressors. Linux only and must be run with CAP_SYS_ADMIN
+capabilities.
+.TP
+.B \-\-physpage\-ops N
+stop physpage stress workers after N bogo physical address lookups.
+.TP
 .B \-p N, \-\-pipe N
 start N workers that perform large pipe writes and reads to exercise pipe I/O.
 This exercises memory write and reads as well as context switching.  Each
@@ -2600,7 +2609,9 @@
 .TP
 .B \-\-stack N
 start N workers that rapidly cause and catch stack overflows by use of
-alloca(3).
+alloca(3).  Much like the brk stressor, this can eat up pages rapidly and
+may trigger the kernel OOM killer on the process, however, the killed
+stressor is respawned again by a monitoring parent process.
 .TP
 .B \-\-stack\-fill
 the default action is to touch the lowest page on each stack allocation. This
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-ng.c 
new/stress-ng-0.09.03/stress-ng.c
--- old/stress-ng-0.09.02/stress-ng.c   2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-ng.c   2017-11-19 17:02:40.000000000 +0100
@@ -25,7 +25,6 @@
 #include "stress-ng.h"
 
 #include <getopt.h>
-#include <semaphore.h>
 #include <syslog.h>
 
 #if defined(__linux__)
@@ -90,10 +89,12 @@
        { STRESS_APPARMOR,      stress_apparmor_supported },
        { STRESS_CHROOT,        stress_chroot_supported },
        { STRESS_CYCLIC,        stress_cyclic_supported },
+       { STRESS_EXEC,          stress_exec_supported },
        { STRESS_FANOTIFY,      stress_fanotify_supported },
        { STRESS_ICMP_FLOOD,    stress_icmp_flood_supported },
        { STRESS_IOPORT,        stress_ioport_supported },
        { STRESS_NETLINK_PROC,  stress_netlink_proc_supported },
+       { STRESS_PHYSPAGE,      stress_physpage_supported },
        { STRESS_RDRAND,        stress_rdrand_supported },
        { STRESS_SOFTLOCKUP,    stress_softlockup_supported },
        { STRESS_SWAP,          stress_swap_supported },
@@ -309,6 +310,7 @@
        STRESSOR(opcode, OPCODE, CLASS_CPU | CLASS_OS),
        STRESSOR(open, OPEN, CLASS_FILESYSTEM | CLASS_OS),
        STRESSOR(personality, PERSONALITY, CLASS_OS),
+       STRESSOR(physpage, PHYSPAGE, CLASS_VM),
        STRESSOR(pipe, PIPE, CLASS_PIPE_IO | CLASS_MEMORY | CLASS_OS),
        STRESSOR(poll, POLL, CLASS_SCHEDULER | CLASS_OS),
        STRESSOR(procfs, PROCFS, CLASS_FILESYSTEM | CLASS_OS),
@@ -721,6 +723,8 @@
        { "perf",       0,      0,      OPT_PERF_STATS },
        { "personality",1,      0,      OPT_PERSONALITY },
        { "personality-ops",1,  0,      OPT_PERSONALITY_OPS },
+       { "physpage",   1,      0,      OPT_PHYSPAGE },
+       { "physpage-ops",1,     0,      OPT_PHYSPAGE_OPS },
        { "pipe",       1,      0,      OPT_PIPE },
        { "pipe-ops",   1,      0,      OPT_PIPE_OPS },
        { "pipe-data-size",1,   0,      OPT_PIPE_DATA_SIZE },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-ng.h 
new/stress-ng-0.09.03/stress-ng.h
--- old/stress-ng-0.09.02/stress-ng.h   2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-ng.h   2017-11-19 17:02:40.000000000 +0100
@@ -1260,6 +1260,7 @@
        STRESS_OPCODE,
        STRESS_OPEN,
        STRESS_PERSONALITY,
+       STRESS_PHYSPAGE,
        STRESS_PIPE,
        STRESS_POLL,
        STRESS_PROCFS,
@@ -1779,6 +1780,9 @@
 
        OPT_OOMABLE,
 
+       OPT_PHYSPAGE,
+       OPT_PHYSPAGE_OPS,
+
        OPT_OOM_PIPE,
        OPT_OOM_PIPE_OPS,
 
@@ -2461,10 +2465,12 @@
 extern int stress_apparmor_supported(void);
 extern int stress_chroot_supported(void);
 extern int stress_cyclic_supported(void);
+extern int stress_exec_supported(void);
 extern int stress_fanotify_supported(void);
 extern int stress_icmp_flood_supported(void);
 extern int stress_ioport_supported(void);
 extern int stress_netlink_proc_supported(void);
+extern int stress_physpage_supported(void);
 extern int stress_rdrand_supported(void);
 extern int stress_softlockup_supported(void);
 extern int stress_swap_supported(void);
@@ -2834,6 +2840,7 @@
 STRESS(stress_opcode);
 STRESS(stress_open);
 STRESS(stress_personality);
+STRESS(stress_physpage);
 STRESS(stress_pipe);
 STRESS(stress_poll);
 STRESS(stress_procfs);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-physpage.c 
new/stress-ng-0.09.03/stress-physpage.c
--- old/stress-ng-0.09.02/stress-physpage.c     1970-01-01 01:00:00.000000000 
+0100
+++ new/stress-ng-0.09.03/stress-physpage.c     2017-11-19 17:02:40.000000000 
+0100
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2013-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.k...@canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <a...@rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#include "stress-ng.h"
+
+/*
+ *  stress_physpage_supported()
+ *      check if we can run this as root
+ */
+int stress_physpage_supported(void)
+{
+        if (geteuid() != 0) {
+               pr_inf("stress-physpage stressor needs to be run as root to 
access page information\n");
+                return -1;
+        }
+        return 0;
+}
+
+#if defined(__linux__)
+
+#define PAGE_PRESENT   (1ULL << 63)
+#define PFN_MASK       ((1ULL << 54) - 1)
+
+static int stress_virt_to_phys(
+       const args_t *args,
+       const size_t page_size,
+       const int fd_pm,
+       const int fd_pc,
+       const uintptr_t virt_addr)
+{
+       off_t offset;
+       uint64_t pageinfo;
+
+       offset = (virt_addr / page_size) * sizeof(uint64_t);
+       if (lseek(fd_pm, offset, SEEK_SET) != offset) {
+               pr_err("%s: cannot seek on address %p in /proc/self/pagemap, 
errno=%d (%s)\n",
+                       args->name, (void *)virt_addr, errno, strerror(errno));
+               goto err;
+       }
+       if (read(fd_pm, &pageinfo, sizeof(pageinfo)) != sizeof(pageinfo)) {
+               pr_err("%s: cannot read address %p in /proc/self/pagemap, 
errno=%d (%s)\n",
+                       args->name, (void *)virt_addr, errno, strerror(errno));
+               goto err;
+       }
+
+       if (pageinfo & PAGE_PRESENT) {
+               uint64_t page_count;
+               const uint64_t pfn = pageinfo & PFN_MASK;
+               uintptr_t phys_addr = pfn * page_size;
+
+               phys_addr |= (virt_addr & (page_size - 1));
+               offset = pfn * sizeof(uint64_t);
+
+               if (phys_addr == 0) {
+                       pr_err("%s: got zero physical address from virtual 
address %p\n",
+                               args->name, (void *)virt_addr);
+                       goto err;
+               }
+
+               if (fd_pc < 0)
+                       return 0;
+
+               if (lseek(fd_pc, offset, SEEK_SET) != offset) {
+                       pr_err("%s: cannot seek on address %p in 
/proc/kpagecount, errno=%d (%s)\n",
+                               args->name, (void *)virt_addr, errno, 
strerror(errno));
+                       goto err;
+               }
+               if (read(fd_pc, &page_count, sizeof(page_count)) != 
sizeof(page_count)) {
+                       pr_err("%s: cannot read page count for address %p in 
/proc/kpagecount, errno=%d (%s)\n",
+                               args->name, (void *)virt_addr, errno, 
strerror(errno));
+                       goto err;
+               }
+               if (page_count < 1) {
+                       pr_err("%s: got zero page count for physical address 
%p\n",
+                               args->name, (void *)phys_addr);
+                       goto err;
+               }
+               return 0;
+       } else {
+               /*
+                * Page is not present, it may have been swapped
+                * out, so this is not an error, just highly unlikely
+                */
+               return 0;
+       }
+err:
+       return -1;
+}
+
+/*
+ *  stress_physpage()
+ *     stress physical page lookups
+ */
+int stress_physpage(const args_t *args)
+{
+       int fd_pm, fd_pc;
+       const size_t page_size = args->page_size;
+       uint8_t *ptr = NULL;
+
+       fd_pm = open("/proc/self/pagemap", O_RDONLY);
+       if (fd_pm < 0) {
+               pr_err("%s: cannot open /proc/self/pagemap, errno=%d (%s)\n",
+                       args->name, errno, strerror(errno));
+               return EXIT_FAILURE;
+       }
+
+       /*
+        *  this interface may not exist, don't make it a failure
+        */
+       fd_pc = open("/proc/kpagecount", O_RDONLY);
+       if (fd_pc < 0) {
+               if (args->instance == 0)
+                       pr_dbg("%s: cannot open /proc/kpagecount, errno=%d 
(%s)\n",
+                               args->name, errno, strerror(errno));
+               fd_pc = -1;
+       }
+
+       do {
+               ptr = mmap(ptr + page_size, page_size, PROT_READ | PROT_WRITE,
+                       MAP_POPULATE | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+               if (ptr != MAP_FAILED) {
+                       (void)stress_virt_to_phys(args, page_size, fd_pm, 
fd_pc, (uintptr_t)ptr);
+                       (void)munmap(ptr, page_size);
+                       (void)stress_virt_to_phys(args, page_size, fd_pm, 
fd_pc, (uintptr_t)g_shared->stats);
+
+               }
+               inc_counter(args);
+       } while (keep_stressing());
+
+       (void)close(fd_pm);
+       (void)close(fd_pc);
+
+       return EXIT_SUCCESS;
+}
+#else
+int stress_physpage(const args_t *args)
+{
+       return stress_not_implemented(args);
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-sleep.c 
new/stress-ng-0.09.03/stress-sleep.c
--- old/stress-ng-0.09.02/stress-sleep.c        2017-11-07 15:55:41.000000000 
+0100
+++ new/stress-ng-0.09.03/stress-sleep.c        2017-11-19 17:02:40.000000000 
+0100
@@ -201,7 +201,7 @@
        for (i = 0; i < n; i++) {
                ret = pthread_join(ctxts[i].pthread, NULL);
                if (ret)
-                       pr_dbg("pthread join, ret=%d\b", ret);
+                       pr_dbg("%s: pthread join, ret=%d\b", args->name, ret);
        }
 
        if (limited) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.02/stress-vm.c 
new/stress-ng-0.09.03/stress-vm.c
--- old/stress-ng-0.09.02/stress-vm.c   2017-11-07 15:55:41.000000000 +0100
+++ new/stress-ng-0.09.03/stress-vm.c   2017-11-19 17:02:40.000000000 +0100
@@ -1817,7 +1817,7 @@
        (void)max_ops;
 
        if (!n) {
-               pr_dbg("rowhammer: zero uint32_t integers could "
+               pr_dbg("stress-vm: rowhammer: zero uint32_t integers could "
                        "be hammered, aborting\n");
                return 0;
        }
@@ -1855,7 +1855,7 @@
                        errors++;
        if (errors) {
                bit_errors += errors;
-               pr_dbg("rowhammer: %zu errors on addresses "
+               pr_dbg("stress-vm: rowhammer: %zu errors on addresses "
                        "%p and %p\n", errors, addr0, addr1);
        }
        (*counter) += VM_ROWHAMMER_LOOPS;


Reply via email to