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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33B5EC64ED6 for ; Mon, 27 Feb 2023 07:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjB0HbF (ORCPT ); Mon, 27 Feb 2023 02:31:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjB0HbD (ORCPT ); Mon, 27 Feb 2023 02:31:03 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C5B81ABCA; Sun, 26 Feb 2023 23:31:01 -0800 (PST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PQBwt0KKhzrSJV; Mon, 27 Feb 2023 15:30:22 +0800 (CST) Received: from [10.67.109.184] (10.67.109.184) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 27 Feb 2023 15:30:27 +0800 Message-ID: <42e9b829-196b-25b2-7c10-c64748af25d9@huawei.com> Date: Mon, 27 Feb 2023 15:30:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration Content-Language: en-US To: Randy Dunlap , CC: kernel test robot , Luke Nelson , Xi Wang , , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Paul Walmsley , Palmer Dabbelt , Albert Ou , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , References: <20230227072016.14618-1-rdunlap@infradead.org> From: Pu Lehui In-Reply-To: <20230227072016.14618-1-rdunlap@infradead.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.109.184] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500020.china.huawei.com (7.221.188.8) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/2/27 15:20, Randy Dunlap wrote: > bpf_jit_comp64.c uses patch_text(), so add to it > to prevent the build error: > > ../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke': > ../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration] > 691 | ret = patch_text(ip, new_insns, ninsns); > | ^~~~~~~~~~ > > Fixes: 596f2e6f9cf4 ("riscv, bpf: Add bpf_arch_text_poke support for RV64") > Signed-off-by: Randy Dunlap > Reported-by: kernel test robot > Link: https://lore.kernel.org/r/202302271000.Aj4nMXbZ-lkp@intel.com > Cc: Pu Lehui > Cc: Luke Nelson > Cc: Xi Wang > Cc: bpf@vger.kernel.org > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: John Fastabend > Cc: Andrii Nakryiko > Cc: Paul Walmsley > Cc: Palmer Dabbelt > Cc: Albert Ou > Cc: "Björn Töpel" > Cc: linux-riscv@lists.infradead.org > --- > v2: add header file directly to bpf_jit_comp64.c (Pu Lehui) > change patch target to bpf (for fixes) > > arch/riscv/net/bpf_jit_comp64.c | 1 + > 1 file changed, 1 insertion(+) > > diff -- a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c > --- a/arch/riscv/net/bpf_jit_comp64.c > +++ b/arch/riscv/net/bpf_jit_comp64.c > @@ -10,6 +10,7 @@ > #include > #include > #include > +#include > #include "bpf_jit.h" > > #define RV_REG_TCC RV_REG_A6 Acked-by: Pu Lehui