From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Daniel Borkmann" <daniel@iogearbox.net>
Cc: <puranjay@kernel.org>, <memxor@gmail.com>,
<xukuohai@huaweicloud.com>, <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 15/20] bpf, arm64: Divide by constants via multiplication with a magic number
Date: Tue, 03 Nov 2026 17:49:29 +0000 [thread overview]
Message-ID: <DMLRKH6WQQ92.34GQL15IOSCH5@gmail.com> (raw)
In-Reply-To: <20261103122733.1383002-16-daniel@iogearbox.net>
On Tue, Nov 03, 2026 at 04:27 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
> LLVM strength-reduces 32-bit divisions by a constant into a 64-bit
> multiplication, but has no high-half multiply for the 64-bit ones, so
> these reach the JIT as BPF_DIV/BPF_MOD with BPF_K and were emitted as
> udiv or sdiv, which take 5 to 20 cycles on Neoverse N1 through V3 and
> block the one divider of the core until done, whereas umulh and smulh
> take 3 cycles and issue twice per cycle on N2 and later, 5 cycles on N1.
> Cilium divides by NSEC_PER_SEC this way in its monotonic clock helper,
> which conntrack, NAT and the load balancer run for every entry they
> stamp or check.
BPF has a high-half multiply since last week:
commit f09c72811afa ("bpf: Add UHMUL and SHMUL instructions")
The x86-64, arm64 and riscv64 JITs support it.
can the verifier do the whole thing now ?
bpf_do_misc_fixups() turns 'r1 /= 1000000000' into
r1 >>= 9
ax = 0x44b82fa09b5a53 ll
r1 uh*= ax
r1 >>= 11
arm64 emits 7 insns for it, the same as this patch.
x86 emits one mov more than today.
riscv64 gets it too, and every JIT that adds uhmul later.
The magic number is computed once, not in every pass of a JIT.
Then no need for patches 7 and 15, and emit_div_const() in x86 goes away.
AX is the only scratch register. The cost:
insn arm64, compared to this patch
------------------------ -----------------------------
udiv, mul and shift same number of insns
udiv, add sequence 1 more insn
sdiv 2 more insns
umod, m fits in 64 bits 1 more insn
umod, m needs 65 bits keeps udiv
smod keeps sdiv
x86 loses the last two rows as well.
The cover letter names the divisors 1000000000, 100 and 1000000.
All three are in the first row.
bpf_magic_udiv() and bpf_magic_sdiv() only move. div_by_const() is new.
The shifts for sdiv by a power of 2 are not in the diff.
Something like this (compile tested only):
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 83b0cb1..691174c 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -2028,218 +2028,6 @@ static void emit_shiftx(u8 **pprog, u32 dst_reg, u8 src_reg, bool is64, u8 op)
*pprog = prog;
}
-struct bpf_div_magic {
- u64 m; /* multiplier, sign extended for signed division */
- int s; /* shift of the high half of the product */
- bool add; /* multiplier has 65 bits, use the add sequence */
-};
-
-/*
- * Multiplier and shift for an unsigned division by the constant d, with
- * 2 <= d < 2^64 and a dividend below 2^(64 - lz): n / d == (mulhu(n, m)
- * >> s), or with the add sequence when m needs 65 bits, (((n - t) >> 1)
- * + t) >> (s - 1) with t = mulhu(n, m). Hacker's Delight, 2nd ed., figure
- * 10-2.
- */
-static void bpf_magic_udiv(u64 d, int lz, struct bpf_div_magic *mag)
-{
- u64 mask = ~0ULL >> (lz & 63);
- u64 nc, delta, q1, r1, q2, r2;
- int p;
-
- mag->add = false;
- /* Largest value with nc mod d == d - 1 */
- nc = mask - (mask % d + 1) % d;
- p = 63;
- q1 = (1ULL << 63) / nc; /* 2^p / nc */
- r1 = (1ULL << 63) - q1 * nc; /* 2^p mod nc */
- q2 = (~0ULL >> 1) / d; /* (2^p - 1) / d */
- r2 = (~0ULL >> 1) - q2 * d; /* (2^p - 1) mod d */
- do {
- p++;
- if (r1 >= nc - r1) {
- q1 = 2 * q1 + 1;
- r1 = 2 * r1 - nc;
- } else {
- q1 = 2 * q1;
- r1 = 2 * r1;
- }
- if (r2 + 1 >= d - r2) {
- if (q2 >= (~0ULL >> 1))
- mag->add = true;
- q2 = 2 * q2 + 1;
- r2 = 2 * r2 + 1 - d;
- } else {
- if (q2 >= (1ULL << 63))
- mag->add = true;
- q2 = 2 * q2;
- r2 = 2 * r2 + 1;
- }
- delta = d - 1 - r2;
- } while (p < 128 && (q1 < delta || (q1 == delta && r1 == 0)));
-
- mag->m = q2 + 1;
- mag->s = p - 64;
-}
-
-/*
- * Multiplier and shift for a signed division by the constant d, with
- * 2 <= |d| < 2^63: q = mulhs(n, m), q += n if d > 0 and m < 0, q -= n
- * if d < 0 and m > 0, q >>= s (arithmetic), n / d == q + (q >>> 63).
- * Hacker's Delight, 2nd ed., figure 10-1.
- */
-static void bpf_magic_sdiv(s64 d, struct bpf_div_magic *mag)
-{
- u64 ad = d < 0 ? -(u64)d : (u64)d;
- u64 t, anc, delta, q1, r1, q2, r2;
- int p;
-
- t = (1ULL << 63) + (d < 0);
- anc = t - 1 - t % ad; /* |nc| */
- p = 63;
- q1 = (1ULL << 63) / anc; /* 2^p / |nc| */
- r1 = (1ULL << 63) - q1 * anc; /* 2^p mod |nc| */
- q2 = (1ULL << 63) / ad; /* 2^p / |d| */
- r2 = (1ULL << 63) - q2 * ad; /* 2^p mod |d| */
- do {
- p++;
- q1 = 2 * q1;
- r1 = 2 * r1;
- if (r1 >= anc) {
- q1++;
- r1 -= anc;
- }
- q2 = 2 * q2;
- r2 = 2 * r2;
- if (r2 >= ad) {
- q2++;
- r2 -= ad;
- }
- delta = ad - r2;
- } while (q1 < delta || (q1 == delta && r1 == 0));
-
- mag->m = q2 + 1;
- if (d < 0)
- mag->m = -mag->m;
- mag->s = p - 64;
- mag->add = false;
-}
-
-/*
- * Divide dst_reg by the constant in insn->imm of a 64-bit division through
- * a multiplication with the magic number from bpf_magic_udiv() or
- * bpf_magic_sdiv(). The dividend goes through rax and the multiplier
- * through r11, the caller saves rax and rdx unless they are dst_reg, and
- * r10 is scratch. Returns false for the divisors left to div/idiv.
- */
-static bool emit_div_const(u8 **pprog, const struct bpf_insn *insn, u32 dst_reg)
-{
- bool is_mod = BPF_OP(insn->code) == BPF_MOD;
- bool is_signed = insn->off == 1;
- u32 n_reg = dst_reg, q_reg;
- s32 imm32 = insn->imm;
- struct bpf_div_magic mag;
- u8 *prog = *pprog;
- int corr = 0, pre = 0, s;
-
- if (is_signed) {
- /* |d| >= 2, the verifier already rewrote d == -1 */
- if (imm32 >= -1 && imm32 <= 1)
- return false;
- bpf_magic_sdiv(imm32, &mag);
- /* q += n for d > 0 and m < 0, q -= n for d < 0 and m > 0 */
- if (imm32 > 0 && (s64)mag.m < 0)
- corr = 1;
- else if (imm32 < 0 && (s64)mag.m > 0)
- corr = -1;
- } else {
- /* d >= 2, a negative imm32 is a divisor above 2^63 */
- if (imm32 < 2)
- return false;
- bpf_magic_udiv(imm32, 0, &mag);
- /*
- * Shift the dividend by the trailing zeros of an even divisor
- * first, the magic number of the odd part then fits without
- * the add sequence.
- */
- if (mag.add && !(imm32 & 1)) {
- pre = __ffs(imm32) & 31;
- bpf_magic_udiv(imm32 >> pre, pre, &mag);
- if (mag.add)
- return false;
- }
- }
- s = mag.s;
- /*
- * The shift is at most 63, or 64 with the add sequence which shifts
- * by s - 1 and needs s >= 1. Never hit for d >= 2, kept as a guard
- * against an unencodable count.
- */
- if (s > 64 - !mag.add || (mag.add && !s))
- return false;
-
- /* Keep the dividend when the multiplication clobbers it */
- if ((is_mod || mag.add || corr) &&
- (dst_reg == BPF_REG_0 || dst_reg == BPF_REG_3)) {
- emit_mov_reg(&prog, true, BPF_REG_AX, dst_reg);
- n_reg = BPF_REG_AX;
- }
-
- /* mov rax, dst_reg; shr rax, pre; mov r11, m; mul r11 or imul r11 */
- if (dst_reg != BPF_REG_0)
- emit_mov_reg(&prog, true, BPF_REG_0, dst_reg);
- if (pre)
- emit_shift_imm(&prog, BPF_RSH, BPF_REG_0, pre, true);
- emit_mov_imm64(&prog, AUX_REG, mag.m >> 32, (u32)mag.m);
- EMIT3(0x49, 0xF7, is_signed ? 0xEB : 0xE3);
- if (is_signed) {
- /* add rdx, n_reg or sub rdx, n_reg */
- if (corr)
- emit_alu_reg(&prog, corr > 0 ? BPF_ADD : BPF_SUB,
- BPF_REG_3, n_reg, true);
- /* sar rdx, s */
- if (s)
- emit_shift_imm(&prog, BPF_ARSH, BPF_REG_3, s, true);
- /* mov rax, rdx; shr rax, 63; add rdx, rax */
- emit_mov_reg(&prog, true, BPF_REG_0, BPF_REG_3);
- emit_shift_imm(&prog, BPF_RSH, BPF_REG_0, 63, true);
- emit_alu_reg(&prog, BPF_ADD, BPF_REG_3, BPF_REG_0, true);
- q_reg = BPF_REG_3;
- } else if (!mag.add) {
- /* shr rdx, s */
- if (s)
- emit_shift_imm(&prog, BPF_RSH, BPF_REG_3, s, true);
- q_reg = BPF_REG_3;
- } else {
- /* mov rax, n_reg; sub rax, rdx; shr rax, 1 */
- emit_mov_reg(&prog, true, BPF_REG_0, n_reg);
- emit_alu_reg(&prog, BPF_SUB, BPF_REG_0, BPF_REG_3, true);
- emit_shift_imm(&prog, BPF_RSH, BPF_REG_0, 1, true);
- /* add rax, rdx; shr rax, s - 1 */
- emit_alu_reg(&prog, BPF_ADD, BPF_REG_0, BPF_REG_3, true);
- if (s > 1)
- emit_shift_imm(&prog, BPF_RSH, BPF_REG_0, s - 1, true);
- q_reg = BPF_REG_0;
- }
-
- if (is_mod) {
- /* imul q_reg, q_reg, imm32 */
- maybe_emit_mod(&prog, q_reg, q_reg, true);
- if (is_imm8(imm32))
- EMIT3(0x6B, add_2reg(0xC0, q_reg, q_reg), imm32);
- else
- EMIT2_off32(0x69, add_2reg(0xC0, q_reg, q_reg), imm32);
- /* sub n_reg, q_reg */
- emit_alu_reg(&prog, BPF_SUB, n_reg, q_reg, true);
- q_reg = n_reg;
- }
- if (q_reg != dst_reg)
- emit_mov_reg(&prog, true, dst_reg, q_reg);
-
- *pprog = prog;
- return true;
-}
-
static void emit_priv_frame_ptr(u8 **pprog, void __percpu *priv_frame_ptr)
{
u8 *prog = *pprog;
@@ -2827,11 +2615,6 @@ static int do_jit(struct bpf_verifier_env *env, struct bpf_prog *bpf_prog, int *
if (dst_reg != BPF_REG_3)
EMIT1(0x52); /* push rdx */
- /* LLVM strength-reduces the 32-bit ones itself */
- if (is64 && BPF_SRC(insn->code) == BPF_K &&
- emit_div_const(&prog, insn, dst_reg))
- goto div_done;
-
if (BPF_SRC(insn->code) == BPF_X) {
if (src_reg == BPF_REG_0 ||
src_reg == BPF_REG_3) {
@@ -2878,7 +2661,7 @@ static int do_jit(struct bpf_verifier_env *env, struct bpf_prog *bpf_prog, int *
dst_reg != BPF_REG_0)
/* mov dst_reg, rax */
emit_mov_reg(&prog, is64, dst_reg, BPF_REG_0);
-div_done:
+
if (dst_reg != BPF_REG_3)
EMIT1(0x5A); /* pop rdx */
if (dst_reg != BPF_REG_0)
diff --git a/kernel/bpf/fixups.c b/kernel/bpf/fixups.c
index ead7871..c26e5e1 100644
--- a/kernel/bpf/fixups.c
+++ b/kernel/bpf/fixups.c
@@ -1796,6 +1796,195 @@ static int may_goto_off(struct bpf_verifier_env *env, const struct bpf_insn *ins
return off;
}
+#ifdef CONFIG_64BIT
+struct bpf_div_magic {
+ u64 m; /* multiplier, sign extended for signed division */
+ int s; /* shift of the high half of the product */
+ bool add; /* multiplier has 65 bits, use the add sequence */
+};
+
+/*
+ * Multiplier and shift for an unsigned division by the constant d, with
+ * 2 <= d < 2^64 and a dividend below 2^(64 - lz): n / d == (mulhu(n, m)
+ * >> s), or with the add sequence when m needs 65 bits, (((n - t) >> 1)
+ * + t) >> (s - 1) with t = mulhu(n, m). Hacker's Delight, 2nd ed., figure
+ * 10-2.
+ */
+static void bpf_magic_udiv(u64 d, int lz, struct bpf_div_magic *mag)
+{
+ u64 mask = ~0ULL >> (lz & 63);
+ u64 nc, delta, q1, r1, q2, r2;
+ int p;
+
+ mag->add = false;
+ /* Largest value with nc mod d == d - 1 */
+ nc = mask - (mask % d + 1) % d;
+ p = 63;
+ q1 = (1ULL << 63) / nc; /* 2^p / nc */
+ r1 = (1ULL << 63) - q1 * nc; /* 2^p mod nc */
+ q2 = (~0ULL >> 1) / d; /* (2^p - 1) / d */
+ r2 = (~0ULL >> 1) - q2 * d; /* (2^p - 1) mod d */
+ do {
+ p++;
+ if (r1 >= nc - r1) {
+ q1 = 2 * q1 + 1;
+ r1 = 2 * r1 - nc;
+ } else {
+ q1 = 2 * q1;
+ r1 = 2 * r1;
+ }
+ if (r2 + 1 >= d - r2) {
+ if (q2 >= (~0ULL >> 1))
+ mag->add = true;
+ q2 = 2 * q2 + 1;
+ r2 = 2 * r2 + 1 - d;
+ } else {
+ if (q2 >= (1ULL << 63))
+ mag->add = true;
+ q2 = 2 * q2;
+ r2 = 2 * r2 + 1;
+ }
+ delta = d - 1 - r2;
+ } while (p < 128 && (q1 < delta || (q1 == delta && r1 == 0)));
+
+ mag->m = q2 + 1;
+ mag->s = p - 64;
+}
+
+/*
+ * Multiplier and shift for a signed division by the constant d, with
+ * 2 <= |d| < 2^63: q = mulhs(n, m), q += n if d > 0 and m < 0, q -= n
+ * if d < 0 and m > 0, q >>= s (arithmetic), n / d == q + (q >>> 63).
+ * Hacker's Delight, 2nd ed., figure 10-1.
+ */
+static void bpf_magic_sdiv(s64 d, struct bpf_div_magic *mag)
+{
+ u64 ad = d < 0 ? -(u64)d : (u64)d;
+ u64 t, anc, delta, q1, r1, q2, r2;
+ int p;
+
+ t = (1ULL << 63) + (d < 0);
+ anc = t - 1 - t % ad; /* |nc| */
+ p = 63;
+ q1 = (1ULL << 63) / anc; /* 2^p / |nc| */
+ r1 = (1ULL << 63) - q1 * anc; /* 2^p mod |nc| */
+ q2 = (1ULL << 63) / ad; /* 2^p / |d| */
+ r2 = (1ULL << 63) - q2 * ad; /* 2^p mod |d| */
+ do {
+ p++;
+ q1 = 2 * q1;
+ r1 = 2 * r1;
+ if (r1 >= anc) {
+ q1++;
+ r1 -= anc;
+ }
+ q2 = 2 * q2;
+ r2 = 2 * r2;
+ if (r2 >= ad) {
+ q2++;
+ r2 -= ad;
+ }
+ delta = ad - r2;
+ } while (q1 < delta || (q1 == delta && r1 == 0));
+
+ mag->m = q2 + 1;
+ if (d < 0)
+ mag->m = -mag->m;
+ mag->s = p - 64;
+ mag->add = false;
+}
+
+/*
+ * 64-bit 'dst /= imm' and 'dst %= imm' as uhmul or shmul by the magic number.
+ * AX is the only scratch register. A modulo has to keep the dividend, so smod
+ * and umod by a divisor that needs the shift of the dividend or the add
+ * sequence keep the division. Returns the number of insns, 0 for no change.
+ */
+static int div_by_const(const struct bpf_insn *insn, struct bpf_insn *buf)
+{
+ bool is_mod = BPF_OP(insn->code) == BPF_MOD;
+ bool is_signed = insn->off == 1;
+ u8 dst = insn->dst_reg, ax = BPF_REG_AX;
+ struct bpf_insn *p = buf;
+ struct bpf_div_magic mag;
+ s32 d = insn->imm;
+ int pre = 0;
+
+ if (is_signed) {
+ /* |d| >= 2, d == -1 is gone already */
+ if (is_mod || (d >= -1 && d <= 1))
+ return 0;
+ bpf_magic_sdiv(d, &mag);
+ } else {
+ /* d >= 2, a negative imm is a divisor above 2^63 */
+ if (d < 2)
+ return 0;
+ bpf_magic_udiv(d, 0, &mag);
+ if (mag.add && is_mod)
+ return 0;
+ /*
+ * Shift the dividend by the trailing zeros of an even divisor
+ * first, the magic number of the odd part then fits without
+ * the add sequence.
+ */
+ if (mag.add && !(d & 1)) {
+ pre = __ffs(d) & 31;
+ bpf_magic_udiv(d >> pre, pre, &mag);
+ if (mag.add)
+ return 0;
+ }
+ }
+ /* The add sequence shifts by s - 1. Never hit for d >= 2. */
+ if (mag.s > 64 - !mag.add || (mag.add && !mag.s))
+ return 0;
+
+ if (pre)
+ *p++ = BPF_ALU64_IMM(BPF_RSH, dst, pre);
+ /* ax = m ll */
+ *p++ = BPF_RAW_INSN(BPF_LD | BPF_DW | BPF_IMM, ax, 0, 0, (u32)mag.m);
+ *p++ = BPF_RAW_INSN(0, 0, 0, 0, mag.m >> 32);
+ if (is_signed) {
+ /* ax = shmul(dst, m) +- dst >> s; dst = ax + (ax >>> 63) */
+ *p++ = BPF_ALU64_REG_OFF(BPF_MUL, ax, dst, BPF_SHMUL);
+ if (d > 0 && (s64)mag.m < 0)
+ *p++ = BPF_ALU64_REG(BPF_ADD, ax, dst);
+ else if (d < 0 && (s64)mag.m > 0)
+ *p++ = BPF_ALU64_REG(BPF_SUB, ax, dst);
+ if (mag.s)
+ *p++ = BPF_ALU64_IMM(BPF_ARSH, ax, mag.s);
+ *p++ = BPF_MOV64_REG(dst, ax);
+ *p++ = BPF_ALU64_IMM(BPF_RSH, dst, 63);
+ *p++ = BPF_ALU64_REG(BPF_ADD, dst, ax);
+ } else if (is_mod) {
+ /* dst -= (uhmul(dst, m) >> s) * d */
+ *p++ = BPF_ALU64_REG_OFF(BPF_MUL, ax, dst, BPF_UHMUL);
+ if (mag.s)
+ *p++ = BPF_ALU64_IMM(BPF_RSH, ax, mag.s);
+ *p++ = BPF_ALU64_IMM(BPF_MUL, ax, d);
+ *p++ = BPF_ALU64_REG(BPF_SUB, dst, ax);
+ } else if (mag.add) {
+ /* ax = uhmul(dst, m); dst = (((dst - ax) >> 1) + ax) >> (s - 1) */
+ *p++ = BPF_ALU64_REG_OFF(BPF_MUL, ax, dst, BPF_UHMUL);
+ *p++ = BPF_ALU64_REG(BPF_SUB, dst, ax);
+ *p++ = BPF_ALU64_IMM(BPF_RSH, dst, 1);
+ *p++ = BPF_ALU64_REG(BPF_ADD, dst, ax);
+ if (mag.s > 1)
+ *p++ = BPF_ALU64_IMM(BPF_RSH, dst, mag.s - 1);
+ } else {
+ /* dst = uhmul(dst, m) >> s */
+ *p++ = BPF_ALU64_REG_OFF(BPF_MUL, dst, ax, BPF_UHMUL);
+ if (mag.s)
+ *p++ = BPF_ALU64_IMM(BPF_RSH, dst, mag.s);
+ }
+ return p - buf;
+}
+#else
+static int div_by_const(const struct bpf_insn *insn, struct bpf_insn *buf)
+{
+ return 0;
+}
+#endif
+
/* Do various post-verification rewrites in a single program pass.
* These rewrites simplify JIT and interpreter implementations.
*/
@@ -1872,6 +2061,20 @@ int bpf_do_misc_fixups(struct bpf_verifier_env *env)
goto next_insn;
}
+ /* LLVM strength-reduces the 32-bit ones itself */
+ if ((insn->code == (BPF_ALU64 | BPF_MOD | BPF_K) ||
+ insn->code == (BPF_ALU64 | BPF_DIV | BPF_K)) &&
+ prog->jit_requested && !prog->blinding_requested &&
+ !bpf_prog_is_offloaded(prog->aux) && bpf_jit_supports_hmul()) {
+ cnt = div_by_const(insn, insn_buf);
+ if (cnt) {
+ insn = bpf_patch_list_add(env, i, insn_buf, cnt);
+ if (IS_ERR(insn))
+ return PTR_ERR(insn);
+ goto next_insn;
+ }
+ }
+
/* Make divide-by-zero and divide-by-minus-one exceptions impossible. */
if (insn->code == (BPF_ALU64 | BPF_MOD | BPF_X) ||
insn->code == (BPF_ALU64 | BPF_DIV | BPF_X) ||
pw-bot: cr
next prev parent reply other threads:[~2026-11-03 17:49 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 12:27 [PATCH bpf-next v2 00/20] bpf: Various arm64 BPF JIT improvements Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 01/20] bpf, arm64: Free the offset table of a subprog in bpf_jit_free Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 02/20] bpf, arm64: Free the private stack when a pass over the image fails Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 03/20] bpf, arm64: Emit ISB SY in the speculation barriers Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 04/20] arm64, insn: Reject sign extending loads of 64 bits Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 05/20] bpf, arm64: Keep the ll/sc atomics address apart from the old value Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 06/20] arm64, insn: Add the LDUR/STUR and TBZ/TBNZ encodings Daniel Borkmann
2026-11-03 17:46 ` Alexei Starovoitov
2026-11-03 12:27 ` [PATCH bpf-next v2 07/20] bpf: Move the division magic number selection out of the x86 JIT Daniel Borkmann
2026-11-03 13:06 ` bot+bpf-ci
2026-11-03 13:16 ` Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 08/20] bpf, arm64: Consolidate the load and store emission into a helper Daniel Borkmann
2026-11-03 17:45 ` Alexei Starovoitov
2026-11-03 12:27 ` [PATCH bpf-next v2 09/20] bpf, arm64: Use the unscaled forms for negative and unaligned offsets Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 10/20] bpf, arm64: Store zero immediates from the zero register Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 11/20] bpf, arm64: Zero extend the arena offset in register offset accesses Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 12/20] bpf, arm64: Adjust compares with unencodable immediates by one Daniel Borkmann
2026-11-03 13:06 ` bot+bpf-ci
2026-11-03 12:27 ` [PATCH bpf-next v2 13/20] bpf, arm64: Materialize immediates with fewer instructions Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 14/20] bpf, arm64: Shorten the tail call sequence Daniel Borkmann
2026-11-03 12:36 ` sashiko-bot
2026-11-03 12:57 ` Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 15/20] bpf, arm64: Divide by constants via multiplication with a magic number Daniel Borkmann
2026-11-03 17:49 ` Alexei Starovoitov [this message]
2026-11-03 12:27 ` [PATCH bpf-next v2 16/20] bpf, arm64: Use a move or mvn for the and and xor with all ones Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 17/20] bpf, arm64: Use cbz, cbnz, tbz and tbnz for zero, sign and bit tests Daniel Borkmann
2026-11-03 17:51 ` Alexei Starovoitov
2026-11-03 12:27 ` [PATCH bpf-next v2 18/20] bpf, arm64: Multiply by constants with shifts, adds and subs Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 19/20] selftests/bpf: Let the arm64 private stack check skip the BTI pad Daniel Borkmann
2026-11-03 12:27 ` [PATCH bpf-next v2 20/20] selftests/bpf: Extend the JIT instruction tests for arm64 encodings Daniel Borkmann
2026-11-03 13:06 ` bot+bpf-ci
2026-11-03 13:15 ` Daniel Borkmann
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=DMLRKH6WQQ92.34GQL15IOSCH5@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=memxor@gmail.com \
--cc=puranjay@kernel.org \
--cc=xukuohai@huaweicloud.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.