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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 245F8C43381 for ; Wed, 27 Mar 2019 18:19:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E00142070B for ; Wed, 27 Mar 2019 18:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710781; bh=WPZgv36tWCC9vlJyD3V4lnZXLLgrdvYbd2i1t8Fu8A4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2XbE2At25TiEcyiwbmqkCVo6eaXEjK8nT37an2KOtjNcCxOVd9RTnlbtrZR0DxNnO cm2pqMlgy6gXcYAKbgUFe0ELh/45s0tRJIeu3JLSdQPzdcntSMJCdjb7RhxfPyjlIY 3A68jt7EX5U/uujz0iNTqXgUONjF0mQCW1gpvEO0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390750AbfC0STj (ORCPT ); Wed, 27 Mar 2019 14:19:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:36944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389947AbfC0STe (ORCPT ); Wed, 27 Mar 2019 14:19:34 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3BF82087C; Wed, 27 Mar 2019 18:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710773; bh=WPZgv36tWCC9vlJyD3V4lnZXLLgrdvYbd2i1t8Fu8A4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nxvHEgJ3fIc2/Eq9h7kw8qGm3Ip9SOcv3nnB3dDii4vIDvjYCPOIPIEKolygI4+rQ FDPJ8SLNQHFKRHfoVmeMuWZd7mjPGhog0lieHmqNM8bmqhnP95aN+4vdThsKrvMBiM 9dnue5gdaL/Ve/EUccarYo/S4hgZd6t6LLMh4r50= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Valdis Kletnieks , Daniel Borkmann , Sasha Levin , netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 094/123] bpf: fix missing prototype warnings Date: Wed, 27 Mar 2019 14:15:58 -0400 Message-Id: <20190327181628.15899-94-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327181628.15899-1-sashal@kernel.org> References: <20190327181628.15899-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Valdis Kletnieks [ Upstream commit 116bfa96a255123ed209da6544f74a4f2eaca5da ] Compiling with W=1 generates warnings: CC kernel/bpf/core.o kernel/bpf/core.c:721:12: warning: no previous prototype for ?bpf_jit_alloc_exec_limit? [-Wmissing-prototypes] 721 | u64 __weak bpf_jit_alloc_exec_limit(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/core.c:757:14: warning: no previous prototype for ?bpf_jit_alloc_exec? [-Wmissing-prototypes] 757 | void *__weak bpf_jit_alloc_exec(unsigned long size) | ^~~~~~~~~~~~~~~~~~ kernel/bpf/core.c:762:13: warning: no previous prototype for ?bpf_jit_free_exec? [-Wmissing-prototypes] 762 | void __weak bpf_jit_free_exec(void *addr) | ^~~~~~~~~~~~~~~~~ All three are weak functions that archs can override, provide proper prototypes for when a new arch provides their own. Signed-off-by: Valdis Kletnieks Acked-by: Song Liu Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- include/linux/filter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/filter.h b/include/linux/filter.h index 42197b16dd78..56d2cda9931b 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -741,7 +741,9 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr, unsigned int alignment, bpf_jit_fill_hole_t bpf_fill_ill_insns); void bpf_jit_binary_free(struct bpf_binary_header *hdr); - +u64 bpf_jit_alloc_exec_limit(void); +void *bpf_jit_alloc_exec(unsigned long size); +void bpf_jit_free_exec(void *addr); void bpf_jit_free(struct bpf_prog *fp); struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *fp); -- 2.19.1