summaryrefslogtreecommitdiff
path: root/system/statifier/detect_vdso.diff
diff options
context:
space:
mode:
Diffstat (limited to 'system/statifier/detect_vdso.diff')
-rw-r--r--system/statifier/detect_vdso.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/system/statifier/detect_vdso.diff b/system/statifier/detect_vdso.diff
new file mode 100644
index 0000000000..8ff51f75c5
--- /dev/null
+++ b/system/statifier/detect_vdso.diff
@@ -0,0 +1,24 @@
+diff -Naur statifier-1.7.4/src/statifier statifier-1.7.4.patched/src/statifier
+--- statifier-1.7.4/src/statifier 2015-10-23 05:17:13.000000000 -0400
++++ statifier-1.7.4.patched/src/statifier 2018-01-19 15:04:54.809053542 -0500
+@@ -7,4 +7,20 @@
+ # modify it under the terms of the GNU General Public License.
+ # See LICENSE file in the doc directory.
+
++# Modified by B. Watson for the SlackBuilds.org project: detects
++# whether VDSO has been disabled and prints a warning if not.
++if ldd /bin/ls | grep -q 'linux-\(gate\|vdso\)\.'; then
++ echo "VDSO is enabled. Converted binary will likely segfault when run."
++ if [ -e /proc/sys/vm/vdso_enabled ]; then
++ cat <<EOF
++Disable VDSO by running this command, as root:
++ echo "0" > /proc/sys/vm/vdso_enabled
++EOF
++ else
++ cat <<EOF
++To disable VDSO, reboot with 'vdso=0 vdso32=0' on the kernel command line.
++EOF
++ fi
++fi
++
+ ${STATIFIER_ROOT_DIR:-/usr/lib/statifier}/statifier.sh "$@"