Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1160711pxb; Fri, 21 Jan 2022 11:08:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoOSI1HCy0fjHKt8eGohJ0i/Oiz1wZPZ5ag24BT1cdl9Ej5Ld/2P6EdcnoCXP5Hggm/BCR X-Received: by 2002:a63:27c6:: with SMTP id n189mr3881774pgn.253.1642792107292; Fri, 21 Jan 2022 11:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642792107; cv=none; d=google.com; s=arc-20160816; b=WboAkbIjKTSy6dYUlp2kY0a6AWaoA4UHbzK8QpD0DhGiaHBLKzOYfjiIUOpBnwdEYf Uj5ZSYBkNjUd8HO3c0rNEP7Y/2WR70U3yDqRCyxC0nJwAhtTMvnCxZ/Bnq6QWvld3Qf9 gIXTNCVvo+7NjQERQGenVOt8c3YFDCzGaBeKTMTWvH0AIfXfySQIFXN2SLGhPJyi3S6Y SetkJRMfUxkOuGe84PFWy4pL1PoxCO5VEv0TvzK4QPNITaPFQqinnbk7FP2j7VbwkCaI cJm6oP6e5cXPtDjRpQnsRb965xgg7T3RFk20bZ9cnH34m/aOiUgTryq38a/AHpwdNwPy 8uiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=23T4xOW2I0F1J8h1VBHMXa/Hl9U+ZT3rpxlsT4/aGfc=; b=qDOwDgkZIX5wkYV4OG6glzXxR5uHeS6uXR9hr2EYNukN8fNLKpo53IO7/6JTzUirI8 1FogVfhmcn7MBf/zymq9hxI9uQ1Wk9x8gT+6E/Ge18gLpSU32IPsOBBUOlUnyJzCA2Lx vaZygcZ2+20ymcjI/E93kfRtZWMAUY0FgWafsqw4p11YxVGc7R2fw0iDpSKYnsjr5gBX JDomH4aEPLPxvx8bpGFqMCk2c76gILR8dnbJnpnjAFh2NtqRa0XdkqWX3T47IdDluAHJ aNYxSSXL9uwSXFuP2Aat1hEXCni4rhm59bkx9aFhJltiPqdCwmH0xwch98459kQxzF8P yxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YsEHE2Fo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si7709536pfh.140.2022.01.21.11.08.14; Fri, 21 Jan 2022 11:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YsEHE2Fo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236264AbiASKZf (ORCPT + 99 others); Wed, 19 Jan 2022 05:25:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238936AbiASKYa (ORCPT ); Wed, 19 Jan 2022 05:24:30 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2838BC061574; Wed, 19 Jan 2022 02:24:30 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id h206-20020a1c21d7000000b0034d95625e1fso5297258wmh.4; Wed, 19 Jan 2022 02:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=23T4xOW2I0F1J8h1VBHMXa/Hl9U+ZT3rpxlsT4/aGfc=; b=YsEHE2FoxTIEDYdQkjHZoP/fMCSt7QDmBQ4JdVPHxM4mlnOCzYop6XchK4rNHKQtf+ EB550obMnV3f5ZhHcIk/AxpQ8rIFuitjP2WoGDxLwZPMERXqneeB/TZ8sQCaB/Na7dAD gBFFTaU95S2gXYoC1ejMoGbHiqPSliY7DgwtbQkFJB0qfSMMdRfOMiiSSiPIlGi9YkfW SF6KUmqLmY0Vm9eUK4+qdupPRPxxj4ZT74ftdKfK9m/t115DOzfVBBOGbky0j7JF+4xS /laydDlP6PnfNM7FjGBWQC6AyMUnubEMwTk5FqFL60694tozYxQKd8zFSgAVHk04Owxb LpWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=23T4xOW2I0F1J8h1VBHMXa/Hl9U+ZT3rpxlsT4/aGfc=; b=wp71PNOw7uY9/OJcFWEXNEREiiehw2o2wtyR0AoKRfpKxjOVNAeuHDsU1xQhR+e/pf 4vTLMgzUjcBEyzK6XVxR5IaAis1Q4HLs/k5aKuk3I941zWh4DmpY7sGlfLzZlB4wswj/ ibNtmpIIO90BCA+e7IE54qfvDQPO27MCokYnZGddxbpFxldZCdzepuIoaGugLW54xs56 oD8iMR7P+yrCYxQNXecxtfpAL46IQFs+voh3rL2sVh1SNaKN7Sj4zujtnNvX3UxnCpdg tfElr111tKLjJGKQb3yiZOPvW1hxw65giPYVy9B5zNqOVgtRXkIaJAzqxBrx9cCFhyIg 1ghA== X-Gm-Message-State: AOAM530N5Q7n+yD6DH151KyOplkCydNiKxJMv71N/7JN4E21sKh96hvL k0N3MKJuyq9P6kVac7v15wO+2kXi812TE7t8E44= X-Received: by 2002:adf:d08b:: with SMTP id y11mr27706022wrh.384.1642587868723; Wed, 19 Jan 2022 02:24:28 -0800 (PST) MIME-Version: 1.0 References: <20220110165208.1826-1-jszhang@kernel.org> In-Reply-To: From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Date: Wed, 19 Jan 2022 11:24:16 +0100 Message-ID: Subject: Re: [PATCH riscv-next] riscv: bpf: Fix eBPF's exception tables To: Jisheng Zhang , Palmer Dabbelt , palmer@rivosinc.com, Daniel Borkmann Cc: Paul Walmsley , Albert Ou , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Netdev , bpf , linux-riscv , LKML , Tong Tiangen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jisheng/Palmer, On Mon, 10 Jan 2022 at 18:05, Jisheng Zhang wrote: > > On Tue, Jan 11, 2022 at 12:52:08AM +0800, Jisheng Zhang wrote: > > eBPF's exception tables needs to be modified to relative synchronously. > > > > Suggested-by: Tong Tiangen > > Signed-off-by: Jisheng Zhang Nice catch, and apologies for the slow response. Acked-by: Bj=C3=B6rn T=C3=B6pel > > --- > > arch/riscv/net/bpf_jit_comp64.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_c= omp64.c > > index 69bab7e28f91..44c97535bc15 100644 > > --- a/arch/riscv/net/bpf_jit_comp64.c > > +++ b/arch/riscv/net/bpf_jit_comp64.c > > @@ -498,7 +498,7 @@ static int add_exception_handler(const struct bpf_i= nsn *insn, > > offset =3D pc - (long)&ex->insn; > > if (WARN_ON_ONCE(offset >=3D 0 || offset < INT_MIN)) > > return -ERANGE; > > - ex->insn =3D pc; > > + ex->insn =3D offset; > > Hi Palmer, > > Tong pointed out this issue but there was something wrong with my email > forwarding address, so I didn't get his reply. Today, I searched on > lore.kernel.org just found his reply, sorry for inconvenience. > AFAIK, Jisheng's extable work is still in Palmer's for-next tree. Daniel/Alexei: This eBPF must follow commit 1f77ed9422cb ("riscv: switch to relative extable and other improvements"), which is in Palmer's tree. It cannot go via bpf-next. Palmer, please pull this to your for-next tree. Thanks, Bj=C3=B6rn