summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorJason Zaman <[email protected]>2016-10-29 07:10:00 +0800
committerBrian Behlendorf <[email protected]>2016-10-28 16:10:00 -0700
commitf26eb428622a6f3dc613d81faf905958e231e8b1 (patch)
tree75c2c768a8ae327f0acf6175245e6fb8303d03d4 /Makefile.am
parentc6a89b58a997a2b2c672542542e675447efcf4e4 (diff)
Add paxcheck make lint target
This uses scanelf (from pax-utils) to check for any issues with the binaries. It currently checks for executable stacks and textrels. The checks are in a script so can be extended easily in the future for more checks. Executable stacks and textrels are frequently caused by issues in asm files and lead to security and perf problems. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jason Zaman <[email protected]> Closes #5338
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 26f684d59..0137407e4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,13 +55,18 @@ shellcheck:
done; \
fi
-lint: cppcheck
+lint: cppcheck paxcheck
cppcheck:
@if type cppcheck > /dev/null 2>&1; then \
cppcheck --quiet --force --error-exitcode=2 ${top_srcdir}; \
fi
+paxcheck:
+ @if type scanelf > /dev/null 2>&1; then \
+ scripts/paxcheck.sh ${top_srcdir}; \
+ fi
+
flake8:
@if type flake8 > /dev/null 2>&1; then \
flake8 ${top_srcdir}; \