[V3,05/22] bpf/trace: Remove EXPORT from trace_call_bpf()
diff mbox series

Message ID 20200224145642.953923067@linutronix.de
State Accepted
Delegated to: BPF Maintainers
Headers show
Series
  • Untitled series #160415
Related show

Commit Message

Thomas Gleixner Feb. 24, 2020, 2:01 p.m. UTC
All callers are built in. No point to export this.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
V3: New patch 
---
 kernel/trace/bpf_trace.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Alexei Starovoitov Feb. 24, 2020, 6:16 p.m. UTC | #1
On Mon, Feb 24, 2020 at 03:01:36PM +0100, Thomas Gleixner wrote:
> All callers are built in. No point to export this.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> V3: New patch 
> ---
>  kernel/trace/bpf_trace.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -119,7 +119,6 @@ unsigned int trace_call_bpf(struct trace
>  
>  	return ret;
>  }
> -EXPORT_SYMBOL_GPL(trace_call_bpf);

Thanks for catching this.
Looking at my old commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes")
where I added this line I cannot figure out why I did so five years ago.
I'm guessing some earlier versions of the patches were calling it from
tracepoint macro and since tracepoints can be in modules I exported it.
Definitely shouldn't be an export symbol.

Patch
diff mbox series

--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -119,7 +119,6 @@  unsigned int trace_call_bpf(struct trace
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(trace_call_bpf);
 
 #ifdef CONFIG_BPF_KPROBE_OVERRIDE
 BPF_CALL_2(bpf_override_return, struct pt_regs *, regs, unsigned long, rc)