Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1406359

[PATCH 4.2.y-ckt 29/53] arm64: bpf: jit JMP_JSET_{X,K}

From Kamal Mostafa <kamal@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 4.2.y-ckt 29/53] arm64: bpf: jit JMP_JSET_{X,K}
Date 2016-05-24 20:10 +0200
Message-ID <rCoWf-6FE-73@gated-at.bofh.it> (permalink)
References <rCoMx-6n2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.2.8-ckt11 -stable review patch.  If anyone has any objections, please let me know.

---8<------------------------------------------------------------

From: Zi Shen Lim <zlim.lnx@gmail.com>

commit 98397fc547e3f4553553a30ea56fa34d613f0a4c upstream.

Original implementation commit e54bcde3d69d ("arm64: eBPF JIT compiler")
had the relevant code paths, but due to an oversight always fail jiting.

As a result, we had been falling back to BPF interpreter whenever a BPF
program has JMP_JSET_{X,K} instructions.

With this fix, we confirm that the corresponding tests in lib/test_bpf
continue to pass, and also jited.

...
[    2.784553] test_bpf: #30 JSET jited:1 188 192 197 PASS
[    2.791373] test_bpf: #31 tcpdump port 22 jited:1 325 677 625 PASS
[    2.808800] test_bpf: #32 tcpdump complex jited:1 323 731 991 PASS
...
[    3.190759] test_bpf: #237 JMP_JSET_K: if (0x3 & 0x2) return 1 jited:1 110 PASS
[    3.192524] test_bpf: #238 JMP_JSET_K: if (0x3 & 0xffffffff) return 1 jited:1 98 PASS
[    3.211014] test_bpf: #249 JMP_JSET_X: if (0x3 & 0x2) return 1 jited:1 120 PASS
[    3.212973] test_bpf: #250 JMP_JSET_X: if (0x3 & 0xffffffff) return 1 jited:1 89 PASS
...

Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler")
Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/arm64/net/bpf_jit_comp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 6217f80..5cc9097 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -449,6 +449,7 @@ emit_cond_jmp:
 		case BPF_JGE:
 			jmp_cond = A64_COND_CS;
 			break;
+		case BPF_JSET:
 		case BPF_JNE:
 			jmp_cond = A64_COND_NE;
 			break;
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[4.2.y-ckt stable] Linux 4.2.8-ckt11 stable review Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:00 +0200
  [PATCH 4.2.y-ckt 19/53] ALSA: usb-audio: Yet another Phoneix Audio device quirk Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:00 +0200
  [PATCH 4.2.y-ckt 32/53] net: fec: only clear a queue's work bit if the queue was emptied Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 27/53] macvtap: segmented packet is consumed Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 42/53] net_sched: update hierarchical backlog too Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 30/53] bridge: fix igmp / mld query parsing Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 24/53] workqueue: fix rebind bound workers warning Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 25/53] ocfs2: fix posix_acl_create deadlock Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 39/53] ipv4/fib: don't warn when primary address is missing if in_dev is dead Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 35/53] decnet: Do not build routes to devices without decnet private data. Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 46/53] net: fix infoleak in llc Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 37/53] net: use skb_postpush_rcsum instead of own implementations Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 34/53] net/route: enforce hoplimit max value Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 16/53] ALSA: hda - Fix subwoofer pin on ASUS N751 and N551 Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 31/53] net/mlx4_en: Fix endianness bug in IPV6 csum calculation Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 36/53] route: do not cache fib route info on local routes with oif Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 43/53] sch_htb: update backlog as well Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 14/53] drm/i915: Bail out of pipe config compute loop on LPT Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 15/53] ALSA: hda - Fix broken reconfig Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 05/53] ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2) Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 28/53] regulator: axp20x: Fix axp22x ldo_io voltage ranges Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 38/53] vlan: pull on __vlan_insert_tag error path and fix csum correction Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 29/53] arm64: bpf: jit JMP_JSET_{X,K} Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 17/53] vfs: add vfs_select_inode() helper Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 41/53] net_sched: introduce qdisc_replace() helper Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 18/53] vfs: rename: check backing inode being equal Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:10 +0200
  [PATCH 4.2.y-ckt 12/53] ALSA: hda - Fix white noise on Asus UX501VW headset Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 08/53] crypto: hash - Fix page length clamping in hash walk Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 02/53] Revert "usb: hub: do not clear BOS field during reset device" Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 07/53] drm/i915/bdw: Add missing delay during L3 SQC credit programming Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 10/53] drm/radeon: fix PLL sharing on DCE6.1 (v2) Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 04/53] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 13/53] Input: max8997-haptic - fix NULL pointer dereference Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 11/53] get_rock_ridge_filename(): handle malformed NM entries Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 03/53] regulator: s2mps11: Fix invalid selector mask and voltages for buck9 Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200
  [PATCH 4.2.y-ckt 09/53] drm/radeon: fix DP link training issue with second 4K monitor Kamal Mostafa <kamal@canonical.com> - 2016-05-24 20:20 +0200

csiph-web