From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0F25C79F89 for ; Fri, 4 Sep 2026 19:51:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gKvrApOf9jgXHh+kIKbB/lxHw8T6wciYNAI3UcyL4Jg=; b=z60vZcRYIdgn1K I1eQR/MFwDJup4/Gaf74eQTpwuZ+rgmbxbrzWri5x8MX14PY8vCOi0/OJfiKtKkghMG7YGOLALlBb pcE28wQbmTZEgIvDi9zsN21cDi9cUKpMxQTT1IP+YWSfyb8ADUrYFBRg6iWa1K1uzN3oJhfb5ujpJ Q2OKrFhYC4jjR+tUmN/X7uM04rjyiCvDlIRLS87Dy9TWrC2mKol8k831sIKREeMT/Yq75ty0Wxe8N D9hSgUbNsab/ReB4na//pBFaWMdyoPHZkr8pP7V3uB4zKm6kBSEl3ef5tVdPWLXr98Fe3sqBmBj8i hxmlHUfxbq15MsrEi/cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x2Zwt-00000003DAn-3BQd; Fri, 04 Sep 2026 19:51:43 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x2Zwq-00000003D8L-14ww for linux-riscv@lists.infradead.org; Fri, 04 Sep 2026 19:51:41 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-855d2bfae95so3070608b3a.1 for ; Fri, 04 Sep 2026 12:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788551500; x=1789156300; darn=lists.infradead.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=sQVUWoA7x45iUD9G/BjlX2mTaB7Twjm1Fp1QyKVPw8I=; b=mchpmFS8r+tOp0C31rW9ULeo8uMYtrQfTZnRhdfLNdy04J58iLbpopYGE1+0ndfREc H/hQhLe9Vv1gGWo6S+xGsTCJrEEHbyDKPfKsdXdQk0T65m5qJbGm07ITWNeKYYcazqMU GpZcnyAOnTDV/ryzmEwjjNKlsLXy1wrbvVj0dKUd9BBNnJ+X7R7c5b23Ql62hoye7hsL SDUYsGGrE3A5oc9elZq3G7H3Zewf5T9I09+pxsmyfvenfy1FA/ZxjfrQFhCNpDHXmHF6 /5tEgcKEDGxxSkDs+nfUDoiZsuPKg3AwIWBq7P7ZvzZpdIy27ZGKHqkmiQfaM/jm+vQm e5HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788551500; x=1789156300; 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=sQVUWoA7x45iUD9G/BjlX2mTaB7Twjm1Fp1QyKVPw8I=; b=izN1gEs2vzQmcBvlymq6dQ2117C1xYgGmL5WJQONzzNkJslC6p1ZgA7DiHUB8derH2 M9qA6j77+6NUDf85ml3XpNwwNl8X5yH68k35NK/7zskPJ9ACb5vAyQl4fn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yr4g/K9BNJS/3sXcrGQzlrQuxjw4NE1OTN7tDk76ulKjLndoOctO4UGc = X-Received: by 2002:a05:6a00:159a:b0:84a:65e8:137e with SMTP id d2e1a72fcca58-85ffe1099ecmr11049338b3a.17.1788551499491; Fri, 04 Sep 2026 12:51:39 -0700 (PDT) Received: from sid-dev-env.cgrhrlrrq2nuffriizdlnb1x4b.xx.internal.cloudapp.net ([4.155.54.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8615404876fsm1497684b3a.59.2026.09.04.12.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2026 12:51:39 -0700 (PDT) From: Siddharth Chintamaneni To: bpf@vger.kernel.org Cc: Siddharth Chintamaneni , Jeremy Jean , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Ihor Solodrai , Anton Protopopov , Puranjay Mohan , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-riscv@lists.infradead.org, rlmenge@gmail.com, hargar@linux.microsoft.com, apais@microsoft.com Subject: [PATCH bpf-next v1 4/7] bpf, powerpc64: Use resolved pointer for timed may_goto Date: Fri, 4 Sep 2026 19:51:29 +0000 Message-ID: <20260904195132.141068-5-sidchintamaneni@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260904195132.141068-1-sidchintamaneni@gmail.com> References: <20260904195132.141068-1-sidchintamaneni@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260904_125140_295611_E12AC2E7 X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The timed may_goto fixup now passes the resolved counter pointer through BPF_REG_AX instead of a stack offset. Copy the pointer directly into the first argument register rather than adding it to the BPF frame pointer again. Fixes: b55b6b9ad76c ("powerpc64/bpf: Add powerpc64 JIT support for timed may_goto") Reported-by: Jeremy Jean Link: https://lore.kernel.org/all/20260824213158.3755932-2-Jeremy.Jean@oss.cyber.gouv.fr/ Assisted-by: Copilot:gpt-5.6-sol Signed-off-by: Siddharth Chintamaneni --- arch/powerpc/net/bpf_timed_may_goto.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/net/bpf_timed_may_goto.S b/arch/powerpc/net/bpf_timed_may_goto.S index 84ecf6fa7f5d..d88825dd34fe 100644 --- a/arch/powerpc/net/bpf_timed_may_goto.S +++ b/arch/powerpc/net/bpf_timed_may_goto.S @@ -8,7 +8,7 @@ * arch_bpf_timed_may_goto() trampoline for powerpc64 * * Custom BPF convention (verifier/JIT): - * - input: stack offset in BPF_REG_AX (r12) + * - input: count and timestamp pointer in BPF_REG_AX (r12) * - output: updated count in BPF_REG_AX (r12) * * Call bpf_check_timed_may_goto(ptr) with normal powerpc64 ABI: @@ -32,10 +32,10 @@ SYM_FUNC_START(arch_bpf_timed_may_goto) std r8, 72(r1) /* - * r3 = BPF_REG_FP + BPF_REG_AX - * BPF_REG_FP is r31; BPF_REG_AX is r12 (stack offset in bytes). + * BPF_REG_AX (r12) contains the count and timestamp pointer; pass it as + * the first argument in r3. */ - add r3, r31, r12 + mr r3, r12 bl CFUNC(bpf_check_timed_may_goto) /* Put return value back into AX */ -- 2.43.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv