* [PATCH] scripts: headers_install: Exit with error on config leak
@ 2020-05-01 21:54 Siddharth Gupta
2020-05-02 15:03 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Siddharth Gupta @ 2020-05-01 21:54 UTC (permalink / raw)
To: Masahiro Yamada, Sam Ravnborg; +Cc: Siddharth Gupta, linux-kernel
Misuse of CONFIG_* in UAPI headers should result in an error as it exposes
configuration of different targets to userspace.
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
---
| 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--git a/scripts/headers_install.sh b/scripts/headers_install.sh
index a07668a..bd6c93a 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -109,7 +109,8 @@ do
done
if [ "$warn" = 1 ]; then
- echo "warning: $INFILE: leak $c to user-space" >&2
+ 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts: headers_install: Exit with error on config leak
2020-05-01 21:54 [PATCH] scripts: headers_install: Exit with error on config leak Siddharth Gupta
@ 2020-05-02 15:03 ` Masahiro Yamada
2020-05-03 3:27 ` Siddharth Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2020-05-02 15:03 UTC (permalink / raw)
To: Siddharth Gupta; +Cc: Sam Ravnborg, Linux Kernel Mailing List
On Sat, May 2, 2020 at 6:55 AM Siddharth Gupta <sidgup@codeaurora.org> wrote:
>
> Misuse of CONFIG_* in UAPI headers should result in an error as it exposes
> configuration of different targets to userspace.
>
> Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
> ---
> scripts/headers_install.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
> index a07668a..bd6c93a 100755
> --- a/scripts/headers_install.sh
> +++ b/scripts/headers_install.sh
> @@ -109,7 +109,8 @@ do
> done
>
> if [ "$warn" = 1 ]; then
> - echo "warning: $INFILE: leak $c to user-space" >&2
> + echo "error: $INFILE: leak $c to user-space" >&2
> + exit 1
> fi
> done
If you want to change this,
please update the comment at line 67.
Also, rename the variable $warn to
something else, $error or $leak_error, etc. ?
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts: headers_install: Exit with error on config leak
2020-05-02 15:03 ` Masahiro Yamada
@ 2020-05-03 3:27 ` Siddharth Gupta
0 siblings, 0 replies; 3+ messages in thread
From: Siddharth Gupta @ 2020-05-03 3:27 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Sam Ravnborg, Linux Kernel Mailing List
Sure I will make the recommended changes and send a v2 of the patch.
Thanks,
Siddharth
On 5/2/2020 8:03 AM, Masahiro Yamada wrote:
> On Sat, May 2, 2020 at 6:55 AM Siddharth Gupta <sidgup@codeaurora.org> wrote:
>> Misuse of CONFIG_* in UAPI headers should result in an error as it exposes
>> configuration of different targets to userspace.
>>
>> Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
>> ---
>> scripts/headers_install.sh | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
>> index a07668a..bd6c93a 100755
>> --- a/scripts/headers_install.sh
>> +++ b/scripts/headers_install.sh
>> @@ -109,7 +109,8 @@ do
>> done
>>
>> if [ "$warn" = 1 ]; then
>> - echo "warning: $INFILE: leak $c to user-space" >&2
>> + echo "error: $INFILE: leak $c to user-space" >&2
>> + exit 1
>> fi
>> done
>
> If you want to change this,
> please update the comment at line 67.
>
> Also, rename the variable $warn to
> something else, $error or $leak_error, etc. ?
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-03 3:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 21:54 [PATCH] scripts: headers_install: Exit with error on config leak Siddharth Gupta
2020-05-02 15:03 ` Masahiro Yamada
2020-05-03 3:27 ` Siddharth Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).