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: 13152906 X-Patchwork-Delegate: bpf@iogearbox.net 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 23586C64ED8 for ; Mon, 27 Feb 2023 07:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229567AbjB0HUX (ORCPT ); Mon, 27 Feb 2023 02:20:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjB0HUW (ORCPT ); Mon, 27 Feb 2023 02:20:22 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A58E3B9; Sun, 26 Feb 2023 23:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=SzNBAEO+HmUg2XhCvzB8GyNus0AL5as/+GanLa2IUdI=; b=a4RotzB3NzKQxisTWmEXktURhp VDuqMEFXS7GGh8QoXglF+7y2Vm4WQn3gnBxElZsVXCO4wiRx3JXJlB95crv/AxnyIlS66mj+hGGNH KsOacAZCu+W6DKrZ1gdNO0QRnX16tPnEPBlw1ud5Irgt8PAg/mlcNWUuQrabD5Mq3Yf75McV0zJ72 K9t0BFZujtFNnpyU8kNPgCclm1POJKWYiykPQD3zcagssQjnf7eESBhZuOYkPFawSV3PKn3a6JLHO yATNlYcIuDIgMzIgOAOhvpWnJu+z7/rBpjM7CKv7n4ssMGxrG/8T9wK46WeNsK2gRSHdBxUveqxUN DWc6zhTQ==; 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 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net 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