slackbuilds_ponce/system/statifier/detect_vdso.diff

25 lines
944 B
Diff
Raw Normal View History

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 "$@"