Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5643828img; Wed, 27 Mar 2019 12:18:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPgo+BFFkIazk+vle7BQ6U/MxdwJRH3DgcYSR17A6b+rZUdlb9/6iu/3CTrQA0mLqQ3qlm X-Received: by 2002:a65:51c5:: with SMTP id i5mr8916300pgq.189.1553714325931; Wed, 27 Mar 2019 12:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714325; cv=none; d=google.com; s=arc-20160816; b=YWhrkC6SiduS8rZ3sKVuZlM+HJAaclSrsoSuD5kksd3+4jPUnewujJ8pi/VzswZfeT sLJUPay2AkdZ3QCkdm6a9n8eZbj57ke70d/ELchJp2U8N9FfDiCJBr3fr8HGYK1jMBan 9IeA97V/7fA8coIHku6daieZx56C962hGb7MJgdVhzIJoaghZ7AKwviSBhgNpbN44Eim Jg6pWNWai4Bw6xYEA6Fud71fW8jOOv56NRgNdh8qiFxDD2EwvtYJkf/e12pJEPkn0Q8y 3yAZhVUPDU4uCKu3c8J3kbY2/65hhCGg6gi78Lsw57oYeyQssY66RzaB+A1QknHzuLtt X3Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aGmhPwcogXSsaHTWtnZqIoESk9NIs3neRyHUKAivw6c=; b=rSgmndnLjgRpB9E7c7o0HhwRgJXSSRKm0HbzKluoRhZm3lhpZVg8miaizsDNxwB4U5 45stAOjeHvArnwCSqFZEIi1/WMnd7SR+ONItZ5AA5EZ12yA3+9h87BVnJSaB+Wo8Iepb pjQ6o/rMQjeE2+muumCFRaMTXH2vAT7QvX5LcHR3CE66u8T7L+wesrGjjtjCf8pSoaM7 NRIsWIQ6+kKkDSSmwx1/B7o1HsqWS0DRoZ/w37sE1vFAg/cj5BBLFRq+xGGxXI/ZNJ3r Ia6DCmY9yLRJCcxqxTKdVKDrB5tifLd6kLjTGYR/VIIEEIbTSrimEycUaKH5Vzm86trR uHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FmH2oSrM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q185si19521033pga.135.2019.03.27.12.18.30; Wed, 27 Mar 2019 12:18:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FmH2oSrM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387936AbfC0SId (ORCPT + 99 others); Wed, 27 Mar 2019 14:08:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:50336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728095AbfC0SIb (ORCPT ); Wed, 27 Mar 2019 14:08:31 -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 F32F521734; Wed, 27 Mar 2019 18:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710110; bh=GK8+cVgwfM3w9VNxvgVmifwkxrWnTW3JgOjveMew0iQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FmH2oSrMBgrvHc4h5VPSblci8spBic/DrFUL3T/+3Rqsjy2RxxcICOlfte1uXfHf3 Qa9q2cGSxGQXjW2SAKWSi43rnnlNXM+HY3JL8y2Z1DY2mZsKcEkGrLFMP5n2nML9GB 80OIQ5+h4ZRjKOPLkkGY+/tKSdX5Nb/qczNLEFP0= 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 5.0 200/262] bpf: fix missing prototype warnings Date: Wed, 27 Mar 2019 14:00:55 -0400 Message-Id: <20190327180158.10245-200-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-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 e532fcc6e4b5..3358646a8e7a 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -874,7 +874,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); int bpf_jit_get_func_addr(const struct bpf_prog *prog, -- 2.19.1