diff mbox series

[bpf-next,03/11] bpf: fixup error message from gpl helpers on license mismatch

Message ID 20180528004344.3606-4-daniel@iogearbox.net
State Changes Requested, archived
Delegated to: BPF Maintainers
Headers show
Series Misc BPF improvements | expand

Commit Message

Daniel Borkmann May 28, 2018, 12:43 a.m. UTC
Stating 'proprietary program' in the error is just silly since it
can also be a different open source license than that which is just
not compatible.

Reference: https://twitter.com/majek04/status/998531268039102465
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jesper Dangaard Brouer May 29, 2018, 5:16 p.m. UTC | #1
On Mon, 28 May 2018 02:43:36 +0200
Daniel Borkmann <daniel@iogearbox.net> wrote:

> Stating 'proprietary program' in the error is just silly since it
> can also be a different open source license than that which is just
> not compatible.
> 
> Reference: https://twitter.com/majek04/status/998531268039102465
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

Thank you for cleaning up this confusion :-)

> ---
>  kernel/bpf/verifier.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 1fd9667b..4f4786e 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -2462,7 +2462,7 @@ static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn
>  
>  	/* eBPF programs must be GPL compatible to use GPL-ed functions */
>  	if (!env->prog->gpl_compatible && fn->gpl_only) {
> -		verbose(env, "cannot call GPL only function from proprietary program\n");
> +		verbose(env, "cannot call GPL-restricted function from non-GPL compatible program\n");
>  		return -EINVAL;
>  	}
>
Song Liu May 29, 2018, 6:10 p.m. UTC | #2
On Tue, May 29, 2018 at 10:16 AM, Jesper Dangaard Brouer
<brouer@redhat.com> wrote:
> On Mon, 28 May 2018 02:43:36 +0200
> Daniel Borkmann <daniel@iogearbox.net> wrote:
>
>> Stating 'proprietary program' in the error is just silly since it
>> can also be a different open source license than that which is just
>> not compatible.
>>
>> Reference: https://twitter.com/majek04/status/998531268039102465
>> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
>> Acked-by: Alexei Starovoitov <ast@kernel.org>
>
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
>
> Thank you for cleaning up this confusion :-)
>

Acked-by: Song Liu <songliubraving@fb.com>

>> ---
>>  kernel/bpf/verifier.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
>> index 1fd9667b..4f4786e 100644
>> --- a/kernel/bpf/verifier.c
>> +++ b/kernel/bpf/verifier.c
>> @@ -2462,7 +2462,7 @@ static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn
>>
>>       /* eBPF programs must be GPL compatible to use GPL-ed functions */
>>       if (!env->prog->gpl_compatible && fn->gpl_only) {
>> -             verbose(env, "cannot call GPL only function from proprietary program\n");
>> +             verbose(env, "cannot call GPL-restricted function from non-GPL compatible program\n");
>>               return -EINVAL;
>>       }
>>
>
>
>
> --
> Best regards,
>   Jesper Dangaard Brouer
>   MSc.CS, Principal Kernel Engineer at Red Hat
>   LinkedIn: http://www.linkedin.com/in/brouer
diff mbox series

Patch

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 1fd9667b..4f4786e 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2462,7 +2462,7 @@  static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn
 
 	/* eBPF programs must be GPL compatible to use GPL-ed functions */
 	if (!env->prog->gpl_compatible && fn->gpl_only) {
-		verbose(env, "cannot call GPL only function from proprietary program\n");
+		verbose(env, "cannot call GPL-restricted function from non-GPL compatible program\n");
 		return -EINVAL;
 	}