[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQ55OPgiUOdoXDHqD_p3ntiUctqmVhAmO9fRuoq=uAV7g@mail.gmail.com>
Date: Mon, 4 May 2020 16:18:16 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Siddharth Gupta <sidgup@...eaurora.org>
Cc: Sam Ravnborg <sam@...nborg.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] scripts: headers_install: Exit with error on config leak
On Sun, May 3, 2020 at 12:29 PM Siddharth Gupta <sidgup@...eaurora.org> wrote:
>
> Misuse of CONFIG_* in UAPI headers should result in an error as it exposes
> configuration of different targets to userspace.
Sorry, I missed to point out this.
This statement is not precious; it does not expose the kernel
configuration at all.
include/generated/autoconf.h is not available from userspace.
So, all the CONFIG options are undefined.
Could you reword the commit somehow?
>
> Signed-off-by: Siddharth Gupta <sidgup@...eaurora.org>
> ---
> scripts/headers_install.sh | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
> index a07668a..94a8335 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
>
> --
> Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists