From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f45.google.com (mail-dl1-f45.google.com [74.125.82.45]) (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 583653BED44 for ; Tue, 16 Jun 2026 02:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781576471; cv=none; b=TlblqMnGjRQQZDgiP1ZgVMeaOBFnCrLWVQIvJ510A00LbtWJ5Hg4bCzm3VhzFwOge2QqH3UEyej2odbL5zQyCS0ExUMtOqPaxwMOtp3bboka4sAdcBo2Q8WpPDd1z7JiQjDptQ5Nr0tzTLPHMmu5lQo/ay+SfMouodKutk+vc9Y= 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.45 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-f45.google.com with SMTP id a92af1059eb24-137335bc3caso4809131c88.0 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=GYX9HZUC8nnCwoSBwnBpbcALsAo09R2ptKuSM1SA4pMQfbxdNptXNUJZFRf6w5AGkR mDuoqmaRkfnYgR1qSHywSmG9wI9Gz3fnERzt2RpqP+y3YblXRw/PVVg9aBXHbz8Nzy1b rdw7HXo1TQtpZ1Kdbd8yGI5h0YPYm4Svke7cYtIJ28NtT07NIWG/+Xccz454PKyMnphU A6bukx0D+1KVybaEm0vKKnWEBZRM+b3OB+9V+hcWbjt5OLOBghW4l7oSe810HmskRT6M 4dQDNMoMN4wgUQIbEMasWRzD+9AuTzhzl/gsK6jd1cHScKR8ikLKdomoj02PwNjnNJG5 ufRg== X-Forwarded-Encrypted: i=1; AFNElJ/BhALQRIyfzUi2DAYFVRALoJte95SoFr9kLN5uw+z6Dp4EJZKa0LHhtbGwSiFW+Ti9VFE=@vger.kernel.org X-Gm-Message-State: AOJu0YwjgBNbbxjTlKdKyTkxZGRfYDv57t4nHQjmd4P4AtrhRc5b00od E5GKDyRX1izkoUzINfdUGPEXjsDwedAXTmufrjZXnZc1lNQMEy38QbxC X-Gm-Gg: Acq92OFthKchzkz2b91MjqiQTJAr9WJqq6KJnXSXbrlu0NSpzbZc5W3QsuQRPkomX3+ PNTnd3DLzAhiXmIUJYODvBgawm2hf/DzxPr9KP1WWDCeZ8hgpAX8ZnZnIkF5AbIsg9JSwPzfewu IJKA5s2i5uiCCVH2BSHnpAB4bSx6HGwaHesVzObGXsIjOa24Bu8y/Jr4n3AXtm8p4y65Sv2D4Lz 7dT7ayaVXzkA0Gctl9cYlZ5r5zGKdIGxvJrTxikHZASyrWUXoB4JxOzoodzdR9h+SMXIbCkUkkO 60o+uw/9eEa0t+OD1MvAHAMqGehK6nOwgtKo+t+Ycyxg12a7pB79WOi/ZPi5BZeaMs8XG7ESNSi xJClU1kemUQ0ACYPZc2csd5XdbJngbW28Emj5KFoMTgZxYyf2M0tjRgVQpRzy/6F+ub0moMQ7dk Dt6pfRSlNZb1zqQRehIQx47Zy+6D06DgMf2zuNx8l/vflnI70AzURWDHWOyQ== 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: bpf@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 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 E7B98CD98DE for ; Tue, 16 Jun 2026 02:21:26 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B/0dZulk5In18NI1H8CegoOfqnHc8GPlTS21lKVjXQs=; b=ne+x2x4qlTWKGw /ISUsGo397wTz1dvooMDtoqbuB7I1tyUzNBDVvFl+T+o076YMW5GwxPlU7CqXaJ0BhzWqeZhcXaf5 f+ehpeIicaqFcpa5BJl6pYQ7FTybX/6AMSj+ecpfwD44Gp7G+Y+4MU03jwq6KPqCbd8HdYnRc7p8G TUuMtgFgusc9mvstJgBf3U/7a5xGzJIEe+/pfNRISbPSZGSFfcUC5T1XoV4MFJ0yselPUYaMnzmMF GFMXkC2+4vX6kPtuVzANR22hNT/jdUgT1mFPuToWYQAvq6hdPwLwfWHcdjCRPxLkyZ/hqPT3H+sqP N6cRc0sCdKT+1tAZZYZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wZJQO-0000000F6PP-42UO; Tue, 16 Jun 2026 02:21:12 +0000 Received: from mail-dl1-x122d.google.com ([2607:f8b0:4864:20::122d]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wZJQM-0000000F6P3-1USU for linux-riscv@lists.infradead.org; Tue, 16 Jun 2026 02:21:12 +0000 Received: by mail-dl1-x122d.google.com with SMTP id a92af1059eb24-137335bc3caso4809132c88.0 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=lists.infradead.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=sDYYnsjA3AUKdJ6Uju0zRPJWamAbDB2n7GtEdYvKFICmuzXjPSQI1wi8obaqqgm27L bdp7P6x5F2UuvTpfv1T5ERzSKQUxOmwoL6B9xerb1RmYQFZ8ht5S0hwtV93TH9bFDISU sr7/Sayn4lJnyB2Gf11zbb+opHm68cd1U/V9FJNLRDaFWRxlsCvIrEvfDWCXGCzAJVhO PUtMwURFD0RGRrWr/YCS2BglWClwMGaJ2sG4vWoSPRnfCdGha+B87jMvNIENri+w7t5N u5tKDaqsJlbUm1yUFks1Y9kwCYexlfXfRJO03gfm4LACYCZpM8bcISrE0kcSb6vI32zF 7u2A== 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=P02j3lIrW+reybeKYrhrhzJGuAlWlga6xmxHoK+MO48kpJMa+ZiqYyGj3R+csvYTmU miM55QKtIa0Jwq8meqSkMqLVuKO5R5XDnlQXVcolxCv5jPGOLeO84mKuNKGypAWqS+kE 17so+tQICeKp/t3zma02IB/PeP0H0ZJkCtbO3cOskrwL9fgJxM5KzbrN4vQRNO/qN8Ca IEhs3q7pY5nBLBY9FavLuTjT4euNA3XCYOJ0DuUoKJM3FZnTfnHKBrAiLby/1EsvHlRd 5bKF6m7pyoiNpRpZRz+AA3k4AkBIy2F9HfEDrjGpoRch4KKy1tFYxev9jns5l3BE2+HF 0YLA== X-Forwarded-Encrypted: i=1; AFNElJ+4wKEMeBxQJezHyJcXcATtl3MQIbxPMracfyXCC1zhhM1oC6W8K4Il3QKVmWJLmlhZJSlpqBDFsddYHA==@lists.infradead.org X-Gm-Message-State: AOJu0YyfrCdt89MwKh8ypxsmG716xD2NusWUTfaDekAE/0rkPBwGSh3E mUYveAHOVtx74ZW5BGlnV8uWbaIlpe7KuxX4MHj7mQzU8TMPrtT62ZUI X-Gm-Gg: Acq92OEerNqNKTu12pf7Ckho/ckBVDkuy8MAvOIguCXkGoeOv0ITg8dQaVD+6MNACQ7 O1lxLcPorL/91ZUw8gIILuY4cyQpvYsEC9fV8iiHdGXTq3MTieXdLI8MLZU2w47x+IpTqLA0t+O yaCiBJmRANjyq0RS/LgcUC6wZVdFM5/n/UyipdDKmVTO52QHMqSTgG57W6eEp7mTw0uKzK4VF9x CV25Q4xDR0jGyG1529SzjnUoEioTTZejvq4loDl+QBUGhJvOVGp81MIFBvIpFzQjPz0sGmtAFT7 IZAPXDydDGA57vPmdjMBUhyPGENWJkp7IEhlOH8QSGJmwknsOlg9D7p0JyN3hnXoShZfDwDcT2Y 4/9kM1GlTzMfTKeWfe2iBuA7tEQlMl2yy1znKXtMbQj5WzeN5iPEOsFyf3VCc8aUqEl9bxCZ2HT FyUOuA0DgNY92cUEQZ/LYG56xlskxckKig6KPwOWRxubMBNnJEwLms5hvZjw== 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <216ee1df-2945-4266-9c70-ebcd36faeb7f@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260615_192110_403346_5E7B105D X-CRM114-Status: GOOD ( 30.05 ) 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 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv