Date
1 - 5 of 5
trace_printk
SARANKUMAR KRISHNAN
Hi -
When I use bpf_trace_printk - I am getting this NOTICE. Does it mean, that eBPF shouldn't be used in the production kernel.
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] **********************************************************
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] ** ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467519] ** trace_printk() being used. Allocating extra memory. ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467519] ** ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** This means that this is a DEBUG kernel and it is ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** unsafe for production use. ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467521] ** If you see this message and you are not debugging ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** the kernel, report this immediately to your vendor! ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467523] **********************************************************
|
|
Yonghong Song
No, this can still be used. The warning just tells you this should
mostly be used in debug mode. On Wed, Mar 28, 2018 at 11:59 AM, Saran Kumar Krishnan via iovisor-dev <iovisor-dev@...> wrote: Hi - |
|
Quentin Monnet
Just to make it clear, Yonghong means that *the helper function
toggle quoted message
Show quoted text
bpf_trace_printk()* should be used mostly for debug. eBPF itself can perfectly be used in production. If you needed to stream data from eBPF programs to user space in production applications, the way to go would be to use perf maps and related helpers. This would provide better performances than bpf_trace_printk(). Best regards, Quentin 2018-03-28 13:14 UTC-0700 ~ Y Song via iovisor-dev <iovisor-dev@...> No, this can still be used. The warning just tells you this should |
|
SARANKUMAR KRISHNAN
Thanks for the clarification.
I assumed enabling the options specified in https://github.com/iovisor/bcc/blob/master/INSTALL.md rendered the kernel as DEBUG which is unsafe for production use.
Is my assumption untrue?
Regards Saran From: Quentin Monnet <quentin.monnet@...>
Sent: Thursday, March 29, 2018 9:49 AM To: Saran Kumar Krishnan Cc: Y Song; iovisor-dev@... Subject: Re: [iovisor-dev] trace_printk Just to make it clear, Yonghong means that *the helper function
bpf_trace_printk()* should be used mostly for debug. eBPF itself can perfectly be used in production. If you needed to stream data from eBPF programs to user space in production applications, the way to go would be to use perf maps and related helpers. This would provide better performances than bpf_trace_printk(). Best regards, Quentin 2018-03-28 13:14 UTC-0700 ~ Y Song via iovisor-dev <iovisor-dev@...> > No, this can still be used. The warning just tells you this should > mostly be used in debug mode. > > On Wed, Mar 28, 2018 at 11:59 AM, Saran Kumar Krishnan via iovisor-dev > <iovisor-dev@...> wrote: >> Hi - >> >> >> When I use bpf_trace_printk - I am getting this NOTICE. Does it mean, that >> eBPF shouldn't be used in the production kernel. >> >> >> >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] >> ********************************************************** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] ** NOTICE NOTICE NOTICE >> NOTICE NOTICE NOTICE NOTICE ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] ** >> ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467519] ** trace_printk() being >> used. Allocating extra memory. ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467519] ** >> ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** This means that this >> is a DEBUG kernel and it is ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** unsafe for production >> use. ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** >> ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467521] ** If you see this >> message and you are not debugging ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** the kernel, report >> this immediately to your vendor! ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** >> ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** NOTICE NOTICE NOTICE >> NOTICE NOTICE NOTICE NOTICE ** >> Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467523] >> ********************************************************** >> >> >> >> Regards >> Saran |
|
Quentin Monnet
Untrue. All these options can be used (and are used by big companies)
toggle quoted message
Show quoted text
with production kernels. I believe many distributions enable them by default. Quentin 2018-03-29 14:34 UTC+0000 ~ Saran Kumar Krishnan <sarankumar.k@...> Thanks for the clarification. |
|