Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3821454ybi; Mon, 29 Jul 2019 13:16:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUenbQaa1ZMV8dIA3aFBlprd33beytLfnBDKTrdW7VoE54EMQJiHsTKwF6raqk0WOGmDX1 X-Received: by 2002:a17:90a:c596:: with SMTP id l22mr76897754pjt.46.1564431419288; Mon, 29 Jul 2019 13:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431419; cv=none; d=google.com; s=arc-20160816; b=rzO/PbhN/4XSRqwNbmo8YYU5zOtpL2t5uV6L572NZnnX8c0MxvA92t05VbC+1DuR2y T7Ot52iriuMv+ga03QY4MDOyMS5/E6D8jV46iCGDlJJvMqxw+yZ+pyIE5Daubb1LoPc0 Y+A+hMWPMvRJ2Cat4MpmoZTOWkY1kx5x5sRPbaRHJLm/Z/hgPGNkavH/wZ0/xlTvy/NI yJOIZmdhVcVfCovg8w+5KY3Nnggl3K5BUdhbZD1Usk+5/Xcl0TiAF3c/Z/xdhz8dh4lq cg2RutxmIqS/QHB8mIh/MsSyeN2qlVB27qcy2gFHiqt7KiyB/3ajgja4ThQcAgvQZagu tAvg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D+BioGXsYlDZkPda/5EnoK0iEG+YrV1deqkVfn8L/pM=; b=MUarr7ouwNXCoho7/r3XJnDbXCQbNcEbbelKdnj0wBuDJ/NM75XijOgm87hxzbCVo+ ojGOQVClpkx2LKXLApwxYTmwl090KXKPUrtlTwH+l0XUVgNRv8bxqmcQYqfUun9LwOdK vp7W2pfsYvL67FldlI0vSj3F8qnJw0pxAs4oejrDmP2prwFhc7Dio3aaJNVFXLTzQuW2 fAsDaFh9jnsWujkc1LaLiE+xlY2PPFQ4TAY/+S8928HdWHYHIodsaP1nmhPnQ92PSUxc tpEqhNKjiqb4yjV8TzG8cli8VBUhV636isJkY68AGXGxKam4SCRr6xKj+GutndKP6bX5 hxgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SjILzCtT; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si29961867pgj.347.2019.07.29.13.16.43; Mon, 29 Jul 2019 13:16:59 -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=SjILzCtT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388307AbfG2TZ7 (ORCPT + 99 others); Mon, 29 Jul 2019 15:25:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:38312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729723AbfG2TZz (ORCPT ); Mon, 29 Jul 2019 15:25:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 34EEA2070B; Mon, 29 Jul 2019 19:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428354; bh=EkawAHA1gMRyZBd2/hM+E1AMtSzztW8Lj/Lsyik5nqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SjILzCtToYD144EcO6VWYePeOpgdyqFxXUhwW2cDXYgrMKyjsuNEMtJsGxaH777Nn K8KC9Lg4cBFD6VkRua8hK7SpFnTCJeYb+Yc0tGP7/Mgl8zxZGD+D9LI4rxwBS1rLGN +BBRBFRSGrdlJpKPyX5S4A0eNzxG7JEyyGJF+c1k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Valdis Kletnieks , Andrii Nakryiko , Daniel Borkmann , Sasha Levin Subject: [PATCH 4.14 048/293] bpf: silence warning messages in core Date: Mon, 29 Jul 2019 21:18:59 +0200 Message-Id: <20190729190826.966000573@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit aee450cbe482a8c2f6fa5b05b178ef8b8ff107ca ] Compiling kernel/bpf/core.c with W=1 causes a flood of warnings: kernel/bpf/core.c:1198:65: warning: initialized field overwritten [-Woverride-init] 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true | ^~~~ kernel/bpf/core.c:1087:2: note: in expansion of macro 'BPF_INSN_3_TBL' 1087 | INSN_3(ALU, ADD, X), \ | ^~~~~~ kernel/bpf/core.c:1202:3: note: in expansion of macro 'BPF_INSN_MAP' 1202 | BPF_INSN_MAP(BPF_INSN_2_TBL, BPF_INSN_3_TBL), | ^~~~~~~~~~~~ kernel/bpf/core.c:1198:65: note: (near initialization for 'public_insntable[12]') 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true | ^~~~ kernel/bpf/core.c:1087:2: note: in expansion of macro 'BPF_INSN_3_TBL' 1087 | INSN_3(ALU, ADD, X), \ | ^~~~~~ kernel/bpf/core.c:1202:3: note: in expansion of macro 'BPF_INSN_MAP' 1202 | BPF_INSN_MAP(BPF_INSN_2_TBL, BPF_INSN_3_TBL), | ^~~~~~~~~~~~ 98 copies of the above. The attached patch silences the warnings, because we *know* we're overwriting the default initializer. That leaves bpf/core.c with only 6 other warnings, which become more visible in comparison. Signed-off-by: Valdis Kletnieks Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- kernel/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile index af3ab6164ff5..be282c135a66 100644 --- a/kernel/bpf/Makefile +++ b/kernel/bpf/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-y := core.o +CFLAGS_core.o += $(call cc-disable-warning, override-init) obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o obj-$(CONFIG_BPF_SYSCALL) += hashtab.o arraymap.o percpu_freelist.o bpf_lru_list.o lpm_trie.o map_in_map.o -- 2.20.1