From patchwork Mon Feb 27 07:20:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 13152907 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 94760C7EE2E for ; Mon, 27 Feb 2023 07:20:27 +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: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:In-Reply-To:References: List-Owner; bh=ExRt2RMQBRRf71Ldm3T4PTYB3E/G7arVFcpqNew8frI=; b=OCVNdZn/KMyV5H V+PGmfvW+1lUT1Z9u6bjWLt7+0LcRAaagskB1W9AL2H6YIu0Be4qu8s2BKx0jKZ3qpSVh25anHtLr I1v5oVnfY/RRHry42+xMQS3rhTvl47dk0kp7TTK7Xf0xAqrwwakh24+xIVuB+UBSYjnAZmHMvwnvx zk6j7mxhE1BThVY0pN9JLnGnpbhL7/zTtarBWCe0ofko234FhnpL5bqYODsGrvDmQ+7uSYIjhPCtj 021wIcVPWx1WWSiu23abI64PErOI8zQwuQRcBzwCv12BbM/CjHt+izpTZs4Ht9jCy5Cn/K66Ohdl5 X/alj8g+3yU90OsNj6ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWXo3-008etN-QF; Mon, 27 Feb 2023 07:20:19 +0000 Received: from [2601:1c2:980:9ec0::df2f] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWXo1-008esp-Hx; Mon, 27 Feb 2023 07:20:17 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , kernel test robot , Pu Lehui , Luke Nelson , Xi Wang , bpf@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Paul Walmsley , Palmer Dabbelt , Albert Ou , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-riscv@lists.infradead.org Subject: [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration Date: Sun, 26 Feb 2023 23:20:16 -0800 Message-Id: <20230227072016.14618-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 Acked-by: Pu Lehui Acked-by: Björn Töpel --- 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