From: Daniel Borkmann <daniel@iogearbox.net>
To: Zvi Effron <zeffron@riotgames.com>
Cc: Y Song <ys114321@gmail.com>, xdp-newbies@vger.kernel.org
Subject: Re: Issues with bpf_trace_printk
Date: Thu, 31 Aug 2017 00:04:10 +0200 [thread overview]
Message-ID: <59A7365A.20409@iogearbox.net> (raw)
In-Reply-To: <CAC1LvL1Kj6Q+XHm-RJdgoivTVCJQf-p1dyQ1DpG6ULjAd38rEQ@mail.gmail.com>
On 08/30/2017 11:50 PM, Zvi Effron wrote:
> I managed to set up my configuration with a VM on VMware Workstation,
> and it did not reproduce the bug. I think it was using one of the
> Intel drivers, though, instead of the generic. Is there a way to force
> the use of the generic driver?
I actually doubt that the trace printk issue you've seen has anything
to do with XDP native/generic side, but verifying it would be good
nevertheless.
For more recent iproute2, you can enforce either side (internally using
the XDP_FLAGS_DRV_MODE and XDP_FLAGS_SKB_MODE flags Dave just mentioned):
* Enforce native mode:
ip link set dev foo xdpdrv obj ./xdp_test_kern.o sec .text
* Enforce generic mode:
ip link set dev foo xdpgeneric obj ./xdp_test_kern.o sec .text
Did anything else change in your setup, like kernel config, etc, that
could play a role here?
Thanks,
Daniel
> On Wed, Aug 30, 2017 at 2:25 PM, Daniel Borkmann <daniel@iogearbox.net> wrote:
>> On 08/30/2017 07:53 PM, Zvi Effron wrote:
>>>
>>> I've uploaded the object file to
>>>
>>> https://drive.google.com/file/d/0B-lMs4mJOgQBU090ZzNtSkVnMTQ/view?usp=sharing
>>>
>>> uname -a output: Linux localhost.localdomain 4.12.8-300.fc26.x86_64 #1
>>> SMP Thu Aug 17 15:30:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> ip -V output: ip utility, iproute2-ss170501
>>>
>>> I tried with latest iproute2 built from source (ip -V output: ip
>>> utility, iproute2-ss170705) and am still having the same issue. (I
>>> also first noticed this with a custom loader I wrote, so I think the
>>> loader can probably be ruled out.)
>>>
>>> sysctl -a 2> /dev/null | grep bpf output:
>>> kernel.unprivileged_bpf_disabled = 0
>>> net.core.bpf_jit_enable = 0
>>> net.core.bpf_jit_harden = 0
>>> net.core.bpf_jit_kallsyms = 0
>>>
>>> Thanks for helping look into this! Let me know if you need any more info.
>>
>> Here are my results with your object file; seems to work fine
>> for me there, good but still strange. ;) I took the actual 4.12.8
>> stable kernel.
>>
>> # uname -a
>> Linux linux-2.home 4.12.8 #1 SMP Wed Aug 30 21:27:51 CEST 2017 x86_64 x86_64
>> x86_64 GNU/Linux
>> # ip -V
>> ip utility, iproute2-ss170705
>> # sysctl -a | grep bpf
>> kernel.unprivileged_bpf_disabled = 0
>> net.core.bpf_jit_enable = 0
>> net.core.bpf_jit_harden = 0
>> net.core.bpf_jit_kallsyms = 0
>> # ip link set dev wlp4s0 xdpgeneric obj ./xdp_test_kern.o sec .text
>> # tc exec bpf dbg # cmd is just finding mount and
>> dumping trace pipe
>> Running! Hang up with ^C!
>>
>> irq/131-iwlwifi-710 [003] .... 892.116200: : Data start: 90941a Data
>> end: 909456
>> irq/131-iwlwifi-710 [003] .... 892.116216: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 893.346855: : Data start: 90801a Data
>> end: 908044
>> irq/131-iwlwifi-710 [003] .... 893.346871: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 893.346917: : Data start: 90801a Data
>> end: 908070
>> irq/131-iwlwifi-710 [003] .... 893.346921: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 893.654076: : Data start: 90801a Data
>> end: 908044
>> irq/131-iwlwifi-710 [003] .... 893.654092: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 901.333823: : Data start: 88dfc1a Data
>> end: 88dfcb8
>> irq/131-iwlwifi-710 [003] .... 901.333839: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 907.578693: : Data start: 90801a Data
>> end: 90804c
>> irq/131-iwlwifi-710 [003] .... 907.578722: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 908.192621: : Data start: 90801a Data
>> end: 908044
>> irq/131-iwlwifi-710 [003] .... 908.192634: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 908.192696: : Data start: 90801a Data
>> end: 908070
>> irq/131-iwlwifi-710 [003] .... 908.192701: : Constant: 1
>> irq/131-iwlwifi-710 [003] .... 908.920655: : Data start: 90801a Data
>> end: 908044
>> irq/131-iwlwifi-710 [003] .... 908.920661: : Constant: 1
>> [...]
>>
>> I attached the config I used just in case you want to try
>> building 4.12.8 kernel whether that changes anything. Would
>> be interesting to see.
next prev parent reply other threads:[~2017-08-30 22:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 17:20 Issues with bpf_trace_printk Zvi Effron
2017-08-28 18:26 ` Daniel Borkmann
2017-08-28 19:54 ` Zvi Effron
2017-08-28 21:16 ` Y Song
2017-08-28 22:12 ` Zvi Effron
2017-08-29 5:39 ` Y Song
2017-08-29 5:53 ` Zvi Effron
2017-08-29 21:56 ` Y Song
2017-08-29 23:17 ` Daniel Borkmann
2017-08-30 17:53 ` Zvi Effron
[not found] ` <59A72D3E.1030909@iogearbox.net>
2017-08-30 21:50 ` Zvi Effron
2017-08-30 21:57 ` David Miller
2017-08-30 22:04 ` Daniel Borkmann [this message]
2017-08-31 18:14 ` Zvi Effron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59A7365A.20409@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=xdp-newbies@vger.kernel.org \
--cc=ys114321@gmail.com \
--cc=zeffron@riotgames.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.