From c0a826267428eee3c175efc320fb86ea6086c5d5 Mon Sep 17 00:00:00 2001 From: Jiri Vozar Date: Wed, 10 Jun 2020 01:40:13 +0200 Subject: [PATCH 1/2] Specify python version in shebang of verify_names.py --- suites/verify_names.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suites/verify_names.py b/suites/verify_names.py index dcae195..9994d45 100755 --- a/suites/verify_names.py +++ b/suites/verify_names.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright 2012 Red Hat, Inc. From 7bb45c6a88dadd2deb17340a81f5815c8a2a0d4c Mon Sep 17 00:00:00 2001 From: Jiri Vozar Date: Wed, 10 Jun 2020 01:40:43 +0200 Subject: [PATCH 2/2] Fix mprotect crash with lower step than page size --- bench.sh | 2 +- libmicro.h | 2 +- mprotect.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bench.sh b/bench.sh index 981f186..4ae97a5 100644 --- a/bench.sh +++ b/bench.sh @@ -36,7 +36,7 @@ DIRNAME=$(dirname $0) -bench_version=0.4.1-rh.31 +bench_version=0.4.1-rh.32 libmicro_version=`$DIRNAME/bin/tattle -V` case $libmicro_version in diff --git a/libmicro.h b/libmicro.h index 63433d1..c1cc515 100644 --- a/libmicro.h +++ b/libmicro.h @@ -34,7 +34,7 @@ #include -#define LIBMICRO_VERSION "0.4.1-rh.31" +#define LIBMICRO_VERSION "0.4.1-rh.32" #define STRSIZE 1024 diff --git a/mprotect.c b/mprotect.c index 120c96d..3a87a01 100644 --- a/mprotect.c +++ b/mprotect.c @@ -127,6 +127,9 @@ benchmark_initrun(void) int flags; int i; + // Round mapping length up to first higher multiple of page size + optl = (optl + pagesize - 1) / pagesize * pagesize; + if (!anon) { fd = open(optf, O_RDWR); if (fd < 0) {