Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.75 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796100145; b=ZXZ/EYSZTaF7/ugfKHtCph0kB+T0RMGntnBcKsyqofpBPqZAneUXymkECO1MWi3ZWKrg wOFjvti7Df9KuZTwYKr3fYqfSUBnWpCO0shL5uDVmm/UaiAtJUvOWCzOXdJTJhBlTLSY1 FHFCbDFar6dZPgq14OFyMBlnM+Z8H/Q1AiIizTtcyOgSPRJZxNyDDhWQWU7pK0EdLBs8c 6BDhdYIZ1czp4beTfJZnTvPhIV9T+SfB6mvQUySmZ+VD9/FyUnIuMimF1Uk62jKPuvPnM afR/L5kot/MU6BtaYd13RZgoPD2vIhJVmTiA5xgUb7FiQ4eP850Fn/VrOqOoMSdLgtQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796100145; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: X-Developer-Signature:X-Developer-Key:Content-Transfer-Encoding; bh=4vXURyMcaXrjg1JIEZi/127W7OHNTVDuYyd/n3MR8G0=; b=j6juvCs40pBTqc6hmZJYFCl1ognZt06R1PHGkxjsdZr7QHVgSKFkU+ilu3mrncnMXYiO 3SM0ACbTGH2eKFT4xbhTx2OWOTGfzQnN15dnmEmlZyU9npiCP85G30nGAe45hZ5D52uGW 2jeD1rQq+ghddW04Qbyw0rGEp9OhDtPP0smshZPxBtw+Z2HR0GOkz5h4iJlhbOOHD+C6T ABezL2ct7d66PEXfub3a6fAWq7yyJ6XRBT+eQcgQi3z7hagK2DGGKgFNdmK9JC0D7Y8kz ZET0U760fI+/5pQe4N/iDXMkSjqouLE/rrQlwoEsnTp/9oYBmxct9P33MzJ2co5nwNw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=yUWaMjMB; arc=none smtp.remote-ip=74.125.231.75 Received: from mail-oa2-f11.google.com (mail-oa2-f11.google.com [74.125.231.75]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A5BF606A31A for ; Tue, 1 Dec 2026 04:42:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8A5BF606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=yUWaMjMB Received: by mail-oa2-f11.google.com with SMTP id 586e51a60fabf-49e2cb73ba3so3751036fac.1 for ; Mon, 30 Nov 2026 20:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796100143; x=1796704943; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4vXURyMcaXrjg1JIEZi/127W7OHNTVDuYyd/n3MR8G0=; b=yUWaMjMBruO8C9mcjuG1GyIV9Ieh0cF/xIIK5rljl81h/eANZPTBHy+amAeXtrdC2E ApklQNT+9Y21Olxbd/21yPCmN5p6IlgjPYjrwk1v4hgO1seLCoM6yxnGxthLSO0EZPHC P5SxyOGoCevIYjnyZb9Aibo6V79o/VN+La05OW6Tx98Xs317rbow2+bm9OAA37sxmny0 NWLbdvgPhIxVzrkZDbcAJ/LKKXBBVbiFhW8e6VwWQhDvuLGdhRUpI4mvWfQxQMzLbl+j EjF7O+WU+Squx2H/zDIDsijsiM4su23YaoFLMR69vUfRHECTLqc+SPT6JYAPSqQls5tZ oSPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796100143; x=1796704943; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=4vXURyMcaXrjg1JIEZi/127W7OHNTVDuYyd/n3MR8G0=; b=MfAKpffztqW3JptbhlvDgf02e569rd1uHsvGk28vBJ/oQcbG/i2p8FtUf/leeWAzzs 3EXpz3TayU/5WmYZQ5zEm9dpSfJQgla+DZOortzFdwM57ovN4lDoVp/We6X2lBQFee1k XhMUskRjKPIjFrx1cUNG8al+xSyuTHXBuPc0utMz2JBaKocySRg8aONNxnm+i30+Z8GB 2v2rjAuyh8R9G1DUCfDyrzFlDI3neunZhGutYzOy54Nmb1vNAJ+lflkX5mWwhqsQfAl3 n+vx/OKt0R/ZrLChmSneKyQmZA1y68OoUty9wwfwDcv4D9HibIzdiC3EkChR5x0DAac0 Zxpw== X-Gm-Message-State: APuU4Z+/3ujJYcn3PPqGsQG86n02W5yDxo5+UXXveiFbvIcC9KLny2wx +cjdFBRWYu2HTBcRaU9uLUDFNPALDCvuBPsHgxdcO3eMxwEfbhvLO3j3RO5RBDRaYiU= X-Gm-Gg: AZFdTZeHiZiZ+/uXsoS14uFOwnklhTgYYjushiKGz5mh+XfpXP2829n/wclImG7K4ac YBuZcRC+DHat2Bq9ujeoMyBiLR2ILnl8R9gwUYwzUqaHjHCYkxV9+PxtL40QjnM6HlxIZx00yJm xVyt7Xb4elUMvgnZLeiCrNlCiluvG7YTKx0uHV2Ggx5+vfucz+REeKv4LRy522e6wEvKDmlFfl5 daF1r+IsGPH3eGUCzRCti6FcNRsTDjE09u03xdvTPfQphB9cG/Jy8ZIIMDGum7pjisUGnaOKstf cl/JASDncGqztPAbQUJ634p5WiS+2ybj2v7LPdK3v5N/v2DUJLKYvJTEmfNzFNstVOjDez08E0U bAxsRI9d26fcRcF2bgQpFcOhKDr9vsgbg64mY9ED0/12J76v4angssho0S0q0IMBWIiuo/vTssm xrlkLrI3aXf7pQtTuYWktP1SectbhDRwT9gDzLAKCpw+TiUDTWuIsZ+t2j3ioZKyD6JT4km9AyL UHQSx/mHIKwO9U924thmSPMKzKfdzvmTjAG/2oEbX2Tl7B+t1rAyYMYasHtZBAUdit/7wx1oNDp gfOX7Z434yBcWFFMq5kybh7wYhQeFQOar+TpqLUSmL4UDm4NkPW9+Kme2yIl98GcuEfwMq5XTXy AVs1aXTM7dpdwkDhtuWsZrfGClHEuBVevllE= X-Received: by 2002:a05:6871:384b:b0:4b7:f1be:44aa with SMTP id 586e51a60fabf-4bc84c23c1cmr32289828fac.49.1796100143517; Mon, 30 Nov 2026 20:42:23 -0800 (PST) Received: from localhost ([2a03:2880:10ff:6::]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4bcf0794755sm30203570fac.10.2026.11.30.20.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 20:42:22 -0800 (PST) From: Kumar Kartikeya Dwivedi To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Eduard Zingerman , Emil Tsalapatis , Ihor Solodrai , kkd@meta.com, kernel-team@meta.com Subject: [PATCH bpf-next v1 46/73] powerpc64/bpf: Remove the exception boundary Date: Tue, 1 Dec 2026 05:39:13 +0100 Message-ID: X-Mailer: git-send-email 2.53.1 In-Reply-To: References: X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12348; i=memxor@gmail.com; h=from:subject:message-id; bh=ed3+khqatliN4QRbqxw1gIE+IdWJhkwelb9B19GR9nc=; b=owGbwMvMwCXmrmtenRyi38x4Wi2JIZvPbyHj7NpiZ0exbVc2iM4p3nhPzW5m7jLlz5s9Vq03vy6+ 2vVjRykLgxgXg6yYIkvJ/31MxicqfwfaLuOGmcPKBDKEgYtTACbycT8jwyEb4WKZm+ctvxpM9dqaPm /xBv4iqXcN8ntXB7fpGq0Uamf4n88WbtLPG7fzcZNd6aXNMzhPJ2TnKy3se2jWnviAqaiPDwA= X-Developer-Key: i=memxor@gmail.com; a=openpgp; fpr=B34BD741DE8494B76E2F717880EF20021D46C59B Content-Transfer-Encoding: 8bit From: Alexei Starovoitov The powerpc64 JIT still has the code of the exception boundary, which served the stack walk of bpf_throw(). A main program that could throw had a larger frame and saved r14-r25 in each invocation, on top of the registers that hold R6-R10. The exception callback took over that frame and restored them in its epilogue. A call of bpf_throw() is a jump to a landing pad now, and landing pads need unwind_exit and unwind_goto in the JIT. The powerpc64 JIT has neither, so the verifier rejects a program that calls bpf_throw() there with "JIT does not support unwinding" until the JIT has the two insns. Nothing sets exception_boundary and exception_cb of a program any more. Remove the code that reads them: the two flags of the codegen context, the larger frame with its save area for r14-r25, and the prologue and epilogue of the callback. arch_bpf_stack_walk() stays, because BPF streams print the stack with it. Signed-off-by: Alexei Starovoitov Signed-off-by: Kumar Kartikeya Dwivedi --- arch/powerpc/net/bpf_jit.h | 2 - arch/powerpc/net/bpf_jit_comp.c | 2 - arch/powerpc/net/bpf_jit_comp64.c | 145 ++++-------------------------- 3 files changed, 19 insertions(+), 130 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index 4da8bde92e1e..f65c06039ac5 100644 --- a/arch/powerpc/net/bpf_jit.h +++ b/arch/powerpc/net/bpf_jit.h @@ -183,8 +183,6 @@ struct codegen_context { u64 arena_vm_start; u64 user_vm_start; bool is_subprog; - bool exception_boundary; - bool exception_cb; void __percpu *priv_sp; unsigned int priv_stack_size; }; diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index c246709a15ce..b7147bb31ce3 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c @@ -272,8 +272,6 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_pr cgctx.user_vm_start = bpf_arena_get_user_vm_start(fp->aux->arena); } cgctx.is_subprog = bpf_is_subprog(fp); - cgctx.exception_boundary = fp->aux->exception_boundary; - cgctx.exception_cb = fp->aux->exception_cb; cgctx.priv_sp = priv_stack_ptr; cgctx.priv_stack_size = 0; if (priv_stack_ptr) { diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c index c1e86fe0bd79..63606a123275 100644 --- a/arch/powerpc/net/bpf_jit_comp64.c +++ b/arch/powerpc/net/bpf_jit_comp64.c @@ -33,14 +33,10 @@ * [ prev sp ] <------------- * [ tail_call_info ] 8 | * [ nv gpr save area ] (6 * 8) | - * [ addl. nv gpr save area] (12 * 8) | <--- exception boundary/callback program * [ local_tmp_var ] 24 | * fp (r31) --> [ ebpf stack space ] upto 512 | * [ frame header ] 32/112 | * sp (r1) ---> [ stack pointer ] -------------- - * - * Additional (12 * 8) in 'nv gpr save area' only in case of - * exception boundary/callback. */ /* BPF non-volatile registers save area size */ @@ -48,11 +44,6 @@ /* for bpf JIT code internal usage */ #define BPF_PPC_STACK_LOCALS 24 -/* - * for additional non volatile registers(r14-r25) to be saved - * at exception boundary - */ -#define BPF_PPC_EXC_STACK_SAVE (12 * 8) /* stack frame excluding BPF stack, ensure this is quadword aligned */ #define BPF_PPC_STACKFRAME (STACK_FRAME_MIN_SIZE + \ @@ -60,13 +51,6 @@ BPF_PPC_STACK_SAVE + \ BPF_PPC_TAILCALL) -/* - * same as BPF_PPC_STACKFRAME with save area for additional - * non volatile registers saved at exception boundary. - * This is quad-word aligned. - */ -#define BPF_PPC_EXC_STACKFRAME (BPF_PPC_STACKFRAME + BPF_PPC_EXC_STACK_SAVE) - /* BPF register usage */ #define TMP_REG_1 (MAX_BPF_JIT_REG + 0) #define TMP_REG_2 (MAX_BPF_JIT_REG + 1) @@ -108,16 +92,8 @@ static inline bool bpf_has_stack_frame(struct codegen_context *ctx) * - we call other functions (kernel helpers), or * - the bpf program uses its stack area * The latter condition is deduced from the usage of BPF_REG_FP - * - * bpf_throw() leads to exception callback from a BPF (sub)program. - * The (sub)program is always marked as SEEN_FUNC, creating a stack - * frame. The exception callback uses the frame of the exception - * boundary, so the exception boundary program must have a frame. */ - return ctx->seen & SEEN_FUNC || - bpf_is_seen_register(ctx, bpf_to_ppc(BPF_REG_FP)) || - ctx->exception_cb || - ctx->exception_boundary; + return ctx->seen & SEEN_FUNC || bpf_is_seen_register(ctx, bpf_to_ppc(BPF_REG_FP)); } /* @@ -130,12 +106,8 @@ static inline bool bpf_has_stack_frame(struct codegen_context *ctx) * sp (r1) ---> [ stack pointer ] -------------- * [ tail_call_info ] 8 * [ nv gpr save area ] (6 * 8) - * [ addl. nv gpr save area] (12 * 8) <--- exception boundary/callback program * [ local_tmp_var ] 24 * [ unused red zone ] 224 - * - * Additional (12 * 8) in 'nv gpr save area' only in case of - * exception boundary/callback. */ static int bpf_jit_stack_local(struct codegen_context *ctx) { @@ -144,12 +116,7 @@ static int bpf_jit_stack_local(struct codegen_context *ctx) return STACK_FRAME_MIN_SIZE + ctx->stack_size; } else { /* Stack layout with redzone */ - return -(BPF_PPC_TAILCALL - +BPF_PPC_STACK_SAVE - +(ctx->exception_boundary || ctx->exception_cb ? - BPF_PPC_EXC_STACK_SAVE : 0) - +BPF_PPC_STACK_LOCALS - ); + return -(BPF_PPC_TAILCALL + BPF_PPC_STACK_SAVE + BPF_PPC_STACK_LOCALS); } } @@ -160,19 +127,9 @@ static int bpf_jit_stack_tailcallinfo_offset(struct codegen_context *ctx) static int bpf_jit_stack_offsetof(struct codegen_context *ctx, int reg) { - int min_valid_nvreg = BPF_PPC_NVR_MIN; - /* Default frame size for all cases except exception boundary */ - int frame_nvr_size = BPF_PPC_STACKFRAME; - - /* Consider all nv regs for handling exceptions */ - if (ctx->exception_boundary || ctx->exception_cb) { - min_valid_nvreg = _R14; - frame_nvr_size = BPF_PPC_EXC_STACKFRAME; - } - - if (reg >= min_valid_nvreg && reg < 32) + if (reg >= BPF_PPC_NVR_MIN && reg < 32) return (bpf_has_stack_frame(ctx) ? - (frame_nvr_size + ctx->stack_size) : 0) + (BPF_PPC_STACKFRAME + ctx->stack_size) : 0) - (8 * (32 - reg)) - BPF_PPC_TAILCALL; pr_err("BPF JIT is asking about unknown registers"); @@ -226,17 +183,6 @@ static void emit_fp_priv_stack(u32 *image, struct codegen_context *ctx) PRIV_STACK_GUARD_SZ + round_up(ctx->priv_stack_size, 16))); } -/* - * For exception boundary & exception_cb progs: - * return increased size to accommodate additional NVRs. - */ -static int bpf_jit_stack_size(struct codegen_context *ctx) -{ - return ctx->exception_boundary || ctx->exception_cb ? - BPF_PPC_EXC_STACKFRAME : - BPF_PPC_STACKFRAME; -} - void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx) { int i; @@ -262,11 +208,8 @@ void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx) EMIT(PPC_RAW_LI(bpf_to_ppc(TMP_REG_1), 0)); /* this goes in the redzone */ EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), _R1, -(BPF_PPC_TAILCALL))); - } else if (!ctx->exception_cb) { + } else { /* - * Tailcall jitting for non exception_cb progs only. - * exception_cb won't require tail_call_info to be setup. - * * tail_call_info interpretation logic: * * if tail_call_info < MAX_TAIL_CALL_CNT @@ -283,7 +226,7 @@ void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx) EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), _R1, -(BPF_PPC_TAILCALL))); } - if (bpf_has_stack_frame(ctx) && !ctx->exception_cb) { + if (bpf_has_stack_frame(ctx)) { /* * We need a stack frame, but we don't necessarily need to * save/restore LR unless we call other functions @@ -293,63 +236,22 @@ void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx) EMIT(PPC_RAW_STD(_R0, _R1, PPC_LR_STKOFF)); } - EMIT(PPC_RAW_STDU(_R1, _R1, - -(bpf_jit_stack_size(ctx) + ctx->stack_size))); + EMIT(PPC_RAW_STDU(_R1, _R1, -(BPF_PPC_STACKFRAME + ctx->stack_size))); } /* - * Program acting as exception boundary pushes R14..R25 in addition to - * BPF callee-saved non volatile registers. Exception callback uses - * the boundary program's stack frame, recover additionally saved - * registers in epilogue of exception callback. + * Back up non-volatile regs -- BPF registers 6-10 + * If we haven't created our own stack frame, we save these + * in the protected zone below the previous stack frame */ - if (ctx->exception_boundary) { - for (i = _R14; i <= _R25; i++) - EMIT(PPC_RAW_STD(i, _R1, bpf_jit_stack_offsetof(ctx, i))); - } - - if (!ctx->exception_cb) { - /* - * Back up non-volatile regs -- BPF registers 6-10 - * If we haven't created our own stack frame, we save these - * in the protected zone below the previous stack frame - */ - for (i = BPF_REG_6; i <= BPF_REG_10; i++) - if (ctx->exception_boundary || bpf_is_seen_register(ctx, bpf_to_ppc(i))) - EMIT(PPC_RAW_STD(bpf_to_ppc(i), _R1, - bpf_jit_stack_offsetof(ctx, bpf_to_ppc(i)))); + for (i = BPF_REG_6; i <= BPF_REG_10; i++) + if (bpf_is_seen_register(ctx, bpf_to_ppc(i))) + EMIT(PPC_RAW_STD(bpf_to_ppc(i), _R1, bpf_jit_stack_offsetof(ctx, bpf_to_ppc(i)))); - if (ctx->exception_boundary || ctx->arena_vm_start) - EMIT(PPC_RAW_STD(bpf_to_ppc(ARENA_VM_START), _R1, + if (ctx->arena_vm_start) + EMIT(PPC_RAW_STD(bpf_to_ppc(ARENA_VM_START), _R1, bpf_jit_stack_offsetof(ctx, bpf_to_ppc(ARENA_VM_START)))); - } else { - /* - * Exception callback receives Frame Pointer of boundary - * program(main prog) as third arg - */ - EMIT(PPC_RAW_MR(_R1, _R5)); - /* - * Exception callback reuses the stack frame of exception boundary. - * But BPF stack depth of exception callback and exception boundary - * don't have to be same. If BPF stack depth is different, adjust the - * stack frame size considering BPF stack depth of exception callback. - * The non-volatile register save area remains unchanged. These non- - * volatile registers are restored in exception callback's epilogue. - */ - EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), _R5, 0)); - EMIT(PPC_RAW_SUB(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_1), _R1)); - EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_2), - -BPF_PPC_EXC_STACKFRAME)); - EMIT(PPC_RAW_CMPLDI(bpf_to_ppc(TMP_REG_2), ctx->stack_size)); - PPC_BCC_CONST_SHORT(COND_EQ, 12); - EMIT(PPC_RAW_MR(_R1, bpf_to_ppc(TMP_REG_1))); - EMIT(PPC_RAW_STDU(_R1, _R1, -(BPF_PPC_EXC_STACKFRAME + ctx->stack_size))); - } - /* - * Exception_cb not restricted from using stack area or arena. - * Setup frame pointer to point to the bpf stack area - */ if (bpf_is_seen_register(ctx, bpf_to_ppc(BPF_REG_FP))) { if (ctx->priv_sp) { /* Set up fp in private stack */ @@ -371,27 +273,18 @@ static void bpf_jit_emit_common_epilogue(u32 *image, struct codegen_context *ctx /* Restore NVRs */ for (i = BPF_REG_6; i <= BPF_REG_10; i++) - if (ctx->exception_cb || bpf_is_seen_register(ctx, bpf_to_ppc(i))) + if (bpf_is_seen_register(ctx, bpf_to_ppc(i))) EMIT(PPC_RAW_LD(bpf_to_ppc(i), _R1, bpf_jit_stack_offsetof(ctx, bpf_to_ppc(i)))); - if (ctx->exception_cb || ctx->arena_vm_start) + if (ctx->arena_vm_start) EMIT(PPC_RAW_LD(bpf_to_ppc(ARENA_VM_START), _R1, bpf_jit_stack_offsetof(ctx, bpf_to_ppc(ARENA_VM_START)))); - if (ctx->exception_cb) { - /* - * Recover additionally saved non volatile registers from stack - * frame of exception boundary program. - */ - for (i = _R14; i <= _R25; i++) - EMIT(PPC_RAW_LD(i, _R1, bpf_jit_stack_offsetof(ctx, i))); - } - /* Tear down our stack frame */ if (bpf_has_stack_frame(ctx)) { - EMIT(PPC_RAW_ADDI(_R1, _R1, bpf_jit_stack_size(ctx) + ctx->stack_size)); + EMIT(PPC_RAW_ADDI(_R1, _R1, BPF_PPC_STACKFRAME + ctx->stack_size)); - if (ctx->seen & SEEN_FUNC || ctx->exception_cb) { + if (ctx->seen & SEEN_FUNC) { EMIT(PPC_RAW_LD(_R0, _R1, PPC_LR_STKOFF)); EMIT(PPC_RAW_MTLR(_R0)); } -- 2.53.1-Meta