aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
authorSiddharth Gupta <sidgup@codeaurora.org>2020-05-05 18:52:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-24 17:50:33 +0200
commit4c8a62c939840b2ad41ac6c6aadc44535761f9e4 (patch)
tree4f3970bd991f9493c5fa6fedf3ee1aeed1c1356b /scripts
parentusb: gadget: Fix issue with config_ep_by_speed function (diff)
downloadwireguard-linux-4c8a62c939840b2ad41ac6c6aadc44535761f9e4.tar.xz
wireguard-linux-4c8a62c939840b2ad41ac6c6aadc44535761f9e4.zip
scripts: headers_install: Exit with error on config leak
[ Upstream commit 5967577231f9b19acd5a59485e9075964065bbe3 ] Misuse of CONFIG_* in UAPI headers should result in an error. These config options can be set in userspace by the user application which includes these headers to control the APIs and structures being used in a kernel which supports multiple targets. Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/headers_install.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
index a07668a5c36b..94a833597a88 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -64,7 +64,7 @@ configs=$(sed -e '
d
' $OUTFILE)
-# The entries in the following list are not warned.
+# The entries in the following list do not result in an error.
# Please do not add a new entry. This list is only for existing ones.
# The list will be reduced gradually, and deleted eventually. (hopefully)
#
@@ -98,18 +98,19 @@ include/uapi/linux/raw.h:CONFIG_MAX_RAW_DEVS
for c in $configs
do
- warn=1
+ leak_error=1
for ignore in $config_leak_ignores
do
if echo "$INFILE:$c" | grep -q "$ignore$"; then
- warn=
+ leak_error=
break
fi
done
- if [ "$warn" = 1 ]; then
- echo "warning: $INFILE: leak $c to user-space" >&2
+ if [ "$leak_error" = 1 ]; then
+ echo "error: $INFILE: leak $c to user-space" >&2
+ exit 1
fi
done