[PATCH] bpf, x32: Fix regression caused by commit 24dea04767e6

2018-07-25 Thread Wang YanQing
fix it. Fixes: 24dea04767e6 ("bpf, x32: remove ld_abs/ld_ind") Signed-off-by: Wang YanQing --- arch/x86/net/bpf_jit_comp32.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c index 5579987..8f6cc71

[PATCH] bpf, doc: clarification for the meaning of 'id'

2018-05-09 Thread Wang YanQing
For me, as a reader whose mother language isn't English, the old words bring a little difficulty to catch the meaning, this patch rewords the subsection in a more clarificatory way. This patch also add blank lines as separator at two places to improve readability. Signed-off-by: Wang Ya

Re: [PATCH] bpf: fix misaligned access for BPF_PROG_TYPE_PERF_EVENT program type on x86_32 platform

2018-05-07 Thread Wang YanQing
On Sat, Apr 28, 2018 at 01:29:17PM +0800, Wang YanQing wrote: > On Sat, Apr 28, 2018 at 01:33:15AM +0200, Daniel Borkmann wrote: > > On 04/28/2018 12:48 AM, Alexei Starovoitov wrote: > > > On Thu, Apr 26, 2018 at 05:57:49PM +0800, Wang YanQing wrote: > >

[PATCH v6] bpf, x86_32: add eBPF JIT compiler for ia32

2018-05-02 Thread Wang YanQing
% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- Changes v5-v6: 1:Add do {} while (0) to RETPOLINE_RAX_BPF_JIT for consistence reason. 2:Clean up non-standard comments, reported by Daniel Borkmann. 3:Fix a memory leak issue

[PATCH v5] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-29 Thread Wang YanQing
% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- Changes v4-v5: 1:Delete is_on_stack, BPF_REG_AX is the only one on real hardware registers, so just check with it. 2:Apply commit 1612a981b766 ("bpf, x64: fix JIT e

Re: [PATCH] bpf: fix misaligned access for BPF_PROG_TYPE_PERF_EVENT program type on x86_32 platform

2018-04-27 Thread Wang YanQing
On Sat, Apr 28, 2018 at 01:33:15AM +0200, Daniel Borkmann wrote: > On 04/28/2018 12:48 AM, Alexei Starovoitov wrote: > > On Thu, Apr 26, 2018 at 05:57:49PM +0800, Wang YanQing wrote: > >> All the testcases for BPF_PROG_TYPE_PERF_EVENT program type in > >> test_verif

[PATCH v4] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-26 Thread Wang YanQing
% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- Changes v3-v4: 1:Fix changelog in commit. I install llvm-6.0, then test_progs willn't report errors. I submit another patch: "bpf: fix misaligned access for BPF_PROG_TY

[PATCH] bpf: fix misaligned access for BPF_PROG_TYPE_PERF_EVENT program type on x86_32 platform

2018-04-26 Thread Wang YanQing
This patch fix it, the fix isn't only necessary for x86_32, it will fix the same problem for other platforms too, if their size of bpf_user_pt_regs_t can't divide exactly into 8. Signed-off-by: Wang YanQing --- Hi all! After mainline accept this patch, then we need to submit a sync

Re: [PATCH v2] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-25 Thread Wang YanQing
On Wed, Apr 25, 2018 at 02:11:16AM +0200, Daniel Borkmann wrote: > On 04/19/2018 05:54 PM, Wang YanQing wrote: > > Testing results on i5-5200U: > > > > 1) test_bpf: Summary: 349 PASSED, 0 FAILED, [319/341 JIT'ed] > > 2) test_progs: Summary: 81 PASSED, 2 FAILED.

[PATCH v3] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-25 Thread Wang YanQing
test_pkt_access:PASS:ipv6:5092/100=50 test_xdp:PASS:ipv4:131902/100=1319 test_xdp:PASS:ipv6:77932/100=779 test_l4lb:PASS:ipv4:38924/100=389 test_l4lb:PASS:ipv6:57520/100=575 The numbers show we get 30%~50% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wa

Re: [PATCH v2] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-25 Thread Wang YanQing
On Wed, Apr 25, 2018 at 02:11:16AM +0200, Daniel Borkmann wrote: > On 04/19/2018 05:54 PM, Wang YanQing wrote: > > The JIT compiler emits ia32 bit instructions. Currently, It supports > > eBPF only. Classic BPF is supported because of the conversion by BPF core. > > > &

[PATCH v2] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-19 Thread Wang YanQing
turn off jit_harden, if we want to speedup jit_harden, then we need to move BPF_REG_AX to *real* register instead of stack emulation, but when we do it, we need to face all the pain I describe above. We can do it in next step. See Documentation/networking/filter.txt for more information.

Re: [PATCH] bpf, x86_32: add eBPF JIT compiler for ia32 (x86_32)

2018-04-18 Thread Wang YanQing
On Wed, Apr 18, 2018 at 05:31:18PM +0800, Wang YanQing wrote: > The JIT compiler emits ia32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF core. > > Almost all instructions from eBPF ISA supported except the following:

[PATCH] bpf, x86_32: add eBPF JIT compiler for ia32 (x86_32)

2018-04-18 Thread Wang YanQing
but If we do it, we need to face all the pain I describe above. We can do it in next step. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- arch/x86/Kconfig |2 +- arch/x86/include/asm/nospec-branch.h | 26 +- arch/x86/

[PATCH] bpf, doc: Correct one wrong value in "Register value tracking"

2018-01-24 Thread Wang YanQing
If we then OR this with 0x40, then the value of 6th bit (0th is first bit) become known, so the right mask is 0xbf instead of 0xcf. Signed-off-by: Wang YanQing --- Documentation/networking/filter.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/networking

[PATCH v2] rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring

2016-05-06 Thread Wang YanQing
/0x80 [ 7612.095832] [] do_fast_syscall_32+0x84/0x120 [ 7612.095839] [] sysenter_past_esp+0x36/0x55 [ 7612.095844] ---[ end trace 97e9c637a20e8348 ]--- Signed-off-by: Wang YanQing Cc: Stable --- Changes: v1-v2: 1: add a Cc to stable. drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- 1

[PATCH] rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring

2016-05-05 Thread Wang YanQing
/0x80 [ 7612.095832] [] do_fast_syscall_32+0x84/0x120 [ 7612.095839] [] sysenter_past_esp+0x36/0x55 [ 7612.095844] ---[ end trace 97e9c637a20e8348 ]--- Signed-off-by: Wang YanQing --- drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH v2] rtlwifi: Remove double check for cnt_after_linked

2016-05-05 Thread Wang YanQing
rtl_lps_enter does two successive check for cnt_after_linked to make sure some time has elapsed after linked. The second check isn't necessary, because if cnt_after_linked is bigger than 5, it is bigger than 2 of course! This patch remove the second check code. Signed-off-by: Wang Ya

[PATCH v2] rtlwifi: Fix logic error in enter/exit power-save mode

2016-05-02 Thread Wang YanQing
d rtl_lps_enter() to use work queue") Signed-off-by: Wang YanQing CC: Stable [3.10+] --- Hi, Larry! Because commit a269913c52ad is the first commit bring this problem, so maybe use above commit message is ok, right? And stable kernels 3.10-3.18 don't have commit fd09ff9587

[PATCH] rtlwifi:rtl_lps_enter: fix double check cnt_after_linked

2016-05-01 Thread Wang YanQing
We have checked cnt_after_linked in below code: " /*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!! */ if (mac->cnt_after_linked < 5) return; " So the second check isn't necessary. This patch delete second check code. Signed-off-by: Wang YanQ

[PATCH] rtlwifi:rtl_watchdog_wq_callback: fix calling rtl_lps_enter|rtl_lps_leave in opposite condition

2016-05-01 Thread Wang YanQing
for enter/leave power state") follow previous mistake, bring us to current code. This patch fix it. Signed-off-by: Wang YanQing --- I think this patch should be ported back to stable kernels, 3.10+. In my machine, I will lost wifi connection after minutes if I enable fwlps. drivers/