From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f48.google.com (mail-dl1-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B40A3BFE44 for ; Tue, 16 Jun 2026 02:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781576471; cv=none; b=UjttXUwvZAuq98xQYOz+w1bOVeyP54vD6H8uV4xG2Wh8fPd8k+qcSuo9JOCZa4+MrIPcH0VarXgQxAhZOEtSYi1WaNisomptTYq8ip0BoY4kFh3zIzp4tZF+SpT9KfhbUX8u+T5VnoPDmfoCobHZzBFNQP/8E+h6NNhaewrr3tU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781576471; c=relaxed/simple; bh=6oQjwVA9B/dpSWzK7h9TRxrdJBhQIxFcZOvgsR0/5us=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U1xOuHhAWp1n1P1H+k2Gle2/GN5j5a1V6De4Exiv8tsH4+ph/J8aMUfVkBIi9DZS1kGUlmbALz9K881kKnTHBIcQy4fAZSxSw6RGdD4GAlsigTokvNZB0NI4RvqMfFJA8Zgacgafkh/3ucqk8U9iK6Dc7DeIeJAW1Ooqe0MrL5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZIMoxbEO; arc=none smtp.client-ip=74.125.82.48 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.b="ZIMoxbEO" Received: by mail-dl1-f48.google.com with SMTP id a92af1059eb24-1370417c01cso5257536c88.1 for ; Mon, 15 Jun 2026 19:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781576469; x=1782181269; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=a6IEVsqYp5cYVGQwVC9lenyJSUbd6i5nZsgE+48XJIA=; b=ZIMoxbEOXQ6pGUtgFpkwr05AiChx8CIlKWCEyvpQPDVdTDXiL5rQoyzRQAd3j4mLCx sFJUuwUOxEEtUBLyuP0+wP28rOtgaQM0UL9dbmc+xsvTUt+AWtzVdM4vpAifl5U+ISJ9 3Vt5f64aL0ULrJLtRopi50VZ7qdiAnreGZoTnZzxlzozuie/e3LeW6prZgiWJR/ApCYN 0+5LE/BWElCgeXCyZDy/0EjuJ489Ta8gJ16j5KjJq1pfw8uMx6Gg4O6paixfM/TZMO7K 6gvbDOJ/nWV6Yvj72IM5ys9kyLw5ICcvDEBuegYsFjvzDXXXFKKYA8XzXdG4U3AdSExg 9UIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781576469; x=1782181269; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a6IEVsqYp5cYVGQwVC9lenyJSUbd6i5nZsgE+48XJIA=; b=EjFZ7bRTN7ocxG8am6BYRS3a+X8Yz9wJmeb8dwaCwjL2mGg3CzjtaD9MJtQiQRCN73 J6KbMyBKGjWR+tVDl+5BrGR1vgcuxQm26n+MCCu/AHUpvVKJepxyASNZ5pcrxxB3gL7V 649HNQOg3u5en3jDQq0tkOidvjw4388fRyxYHvEXExlpDy9BaqPSvZL+eRnE9dm4/AlM hfiZmbFv9syBMn2YVoNGH4EAfN2seuR+Bk9zUnsJYeEHx1CgWf7vF+RAs17zvXvobgXa LmI6iBnCgBKFrY+ekntcBdM9EtA+fJW02xM/x/bfR9tbGJec3Pt+IefLQGLvczg5GmIN OSmA== X-Forwarded-Encrypted: i=1; AFNElJ8ApTevqZueE7zpzIktgQVIY9fRNMaVi/jqtqOjL99cUADP4+UC7JzB+0URT63XQ+9wQE8l1faarHSlwOA=@vger.kernel.org X-Gm-Message-State: AOJu0YyWijcTbOmDc9I6yE6E3R15+lVFRDFhOWfJXj1R8eyB2nyCjdDf Ae2XASjWx3wkQDNffCk/cbejHNvgFwmblqpBL/TQy6i5eQQFUeixRubd X-Gm-Gg: Acq92OGzV3uq0TiQmqYJyz1zquuRp7ec6ElBZHP1AIoU/mILzA7kOobMuF6tpv2cadi 2bqMB4ebhw9FIc66E98uPwG0yVHLnhoTD0mEhHvEZbKLkWR9IT7/G9BLgiEKhUFrcmjG9t4T4um s1hmBFVpAKkI/UK2RRmA1Io8SKJduWLT8W5ho5F9wsZLP/jHs3n5jnkHdF4CEOJCtzb2HFH7FbI 9eWiaOjIC6g3yDeO73B7KBcteWKFpbBN1VZE11JaBlqeUEkp2gRdzH8fdI/Tzjl6KQiUq56USg/ kespaEaTcMleTQNiQb9f38Q89zxdSyoKq0p/689W+BYHps+M7Z99YwTz1uHiWUccyegHVUlWvBZ DVnmczyp/rlKi2g68Z6SHTD0OPnuFJYXeR4/YFbq/FmhvhMvaR+lFk6bwZJTEChpxRhxQj/rnYC h1VbbdOuR5IXLPt2zvbqVarLOnuCqcrdXwFAVx7gFTgyoAFBpd2xFt5S+DMA== X-Received: by 2002:a05:7022:250c:b0:137:64ad:76d0 with SMTP id a92af1059eb24-13985e99350mr720917c88.7.1781576469334; Mon, 15 Jun 2026 19:21:09 -0700 (PDT) Received: from google.com ([2a00:79e0:2039:4:7d96:5166:93ee:6926]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b919ef9sm12517464c88.7.2026.06.15.19.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 19:21:08 -0700 (PDT) Date: Tue, 16 Jun 2026 10:21:02 +0800 From: Kuan-Wei Chiu To: Pu Lehui Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com, luke.r.nels@gmail.com, xi.wang@gmail.com, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, alex@ghiti.fr, jserv@ccns.ncku.edu.tw, eleanor15x@gmail.com, marscheng@google.com, bpf@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH bpf-next v2 0/3] riscv, bpf: Fix signed operations and add 32 bit atomics Message-ID: References: <20260511221648.3251464-1-visitorckw@gmail.com> <216ee1df-2945-4266-9c70-ebcd36faeb7f@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <216ee1df-2945-4266-9c70-ebcd36faeb7f@huawei.com> Hi Lehui, On Tue, Jun 16, 2026 at 09:41:21AM +0800, Pu Lehui wrote: > > > On 2026/6/16 0:18, Kuan-Wei Chiu wrote: > > Hi, > > > > On Mon, May 11, 2026 at 10:16:45PM +0000, Kuan-Wei Chiu wrote: > > > Fix miscompiled signed operations and expands 32 bit atomic support in > > > the RV32 BPF JIT. > > > > > > The current implementation ignores the instruction offset field used by > > > the bpf instruction set to specify BPF_SDIV/BPF_SMOD and BPF_MOVSX. > > > This causes these operations to be treated as unsigned or > > > zero-extended, leading to test_bpf failures. Fix this by checking the > > > offset and emitting the correct instructions. > > > > > > Additionally, we leverage the mandatory A extension to natively support > > > 32 bit bpf atomics (and, or, xor, xchg) by mapping them directly to > > > amo*.w instructions. BPF_CMPXCHG continues to fall back to the > > > interpreter. > > > > > > As a result, test_bpf.ko now runs with 0 failures, and the total number > > > of successfully JIT'ed test cases increases from 843 to 902. > > > > Is there anything else I need to do for this patchset to land? > > Hi Kuan-wei, it seems Luke and Xi haven't been as active in the community > for a while, I'll make time to cover the review and testing for this. Thank you for stepping in to help with the review and testing. I really appreciate it. Since Luke and Xi haven't been active for a while, I was wondering if we should consider updating the MAINTAINERS file to reflect the current status? Also, if you need extra hands, I'd be glad to help review and test future RV32 BPF patches. Regards, Kuan-Wei > > Regards, > Lehui > > > > > Regards, > > Kuan-wei > > > > > --- > > > - Add missing Fixes tags. > > > - Fix memory ordering by emitting aq=1, rl=1 > > > > > > Kuan-Wei Chiu (3): > > > riscv, bpf: Fix support for BPF_SDIV and BPF_SMOD in RV32 JIT > > > riscv, bpf: Fix support for BPF_MOVSX in RV32 JIT > > > riscv, bpf: Add 32 bit atomic operations to RV32 JIT > > > > > > arch/riscv/net/bpf_jit_comp32.c | 101 +++++++++++++++++++++++++++----- > > > 1 file changed, 85 insertions(+), 16 deletions(-) > > > > > > -- > > > 2.54.0.563.g4f69b47b94-goog > > > > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv