lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151025091411.GE24337@gmail.com>
Date:	Sun, 25 Oct 2015 10:14:11 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Alexei Starovoitov <ast@...mgrid.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Wang Nan <wangnan0@...wei.com>, He Kuang <hekuang@...wei.com>,
	Kaixu Xia <xiakaixu@...wei.com>,
	Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] bpf: make tracing helpers gpl only


* Alexei Starovoitov <ast@...mgrid.com> wrote:

> exported perf symbols are GPL only, mark eBPF helper functions
> used in tracing as GPL only as well.
> 
> Suggested-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Signed-off-by: Alexei Starovoitov <ast@...nel.org>
> ---
> this is on top of this patch that touches the same file:
> http://patchwork.ozlabs.org/patch/534664/
> 
>  kernel/trace/bpf_trace.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> index 003df3887287..4228fd3682c3 100644
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -214,7 +214,7 @@ static u64 bpf_perf_event_read(u64 r1, u64 index, u64 r3, u64 r4, u64 r5)
>  
>  static const struct bpf_func_proto bpf_perf_event_read_proto = {
>  	.func		= bpf_perf_event_read,
> -	.gpl_only	= false,
> +	.gpl_only	= true,
>  	.ret_type	= RET_INTEGER,
>  	.arg1_type	= ARG_CONST_MAP_PTR,
>  	.arg2_type	= ARG_ANYTHING,
> @@ -255,7 +255,7 @@ static u64 bpf_perf_event_output(u64 r1, u64 r2, u64 index, u64 r4, u64 size)
>  
>  static const struct bpf_func_proto bpf_perf_event_output_proto = {
>  	.func		= bpf_perf_event_output,
> -	.gpl_only	= false,
> +	.gpl_only	= true,
>  	.ret_type	= RET_INTEGER,
>  	.arg1_type	= ARG_PTR_TO_CTX,
>  	.arg2_type	= ARG_CONST_MAP_PTR,

So there's a lot more 'gpl_only = false' cases that I can see:

triton:~/tip> git grep gpl_only | grep false
kernel/bpf/core.c: .gpl_only    = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/bpf/helpers.c: .gpl_only = false,
kernel/trace/bpf_trace.c:       .gpl_only   = false,
net/core/filter.c: .gpl_only    = false,
net/core/filter.c: .gpl_only    = false,
net/core/filter.c: .gpl_only    = false,
net/core/filter.c: .gpl_only       = false,
net/core/filter.c: .gpl_only       = false,
net/core/filter.c: .gpl_only       = false,
net/core/filter.c: .gpl_only       = false,
net/core/filter.c: .gpl_only    = false,
net/core/filter.c: .gpl_only    = false,

and only a handful of 'true' cases:

triton:~/tip> git grep gpl_only | grep true
kernel/bpf/helpers.c: .gpl_only = true,
kernel/trace/bpf_trace.c:       .gpl_only   = true,
kernel/trace/bpf_trace.c:       .gpl_only   = true,

so I don't know the netfilter ones, but in particular the tracing ones I'm sure 
should be gpl-only. Do we really, really want proprietary modules mucking with 
such internals??

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists