Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5939679ybi; Wed, 12 Jun 2019 11:03:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyELhKaDMRQGpP3N1guPliHCh9T2jqOFOQdA93w19OGB7T9TCs2cu8+264A78oNOEtQGqzx X-Received: by 2002:a63:6841:: with SMTP id d62mr25869297pgc.17.1560362639664; Wed, 12 Jun 2019 11:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362639; cv=none; d=google.com; s=arc-20160816; b=leaWjy9UpxpCZmMUfGH2cUW0gpFJ7Qorf5brngfIIj8QivK1CcbuF0joUVW99VBQB9 RQpEDL0MTzcK+7vXJn/t+YoqGF6ajy5ByIvTpX58iKRodmEmzUFr+i4YAJtt3kPrCz24 u1YYxiIwhN8D6MDSwK+Y/HIowtlG1J4dFDio74Y0LzhjRWUCbSLh1dIcTlTtjaXT8KV3 qthdoYSY7uHY4kT/ACIK1mGeS3SM5B4gLdSUTSnAjO9p8876vNsoOiB3c/ciJJtR3xFW QOyu51FUabNwEc1zZn8QusiEf1kZGBG28/zpcZorO22cFKBSPTjvhM5cDlDVR7uxzW2k d7UA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lTt87lAasyNVjOr5cvjM9KrY8ymnLn03kNyRhp/ZqHw=; b=zKNMmzTK9mLdoElSx8d3PpP5dh1DJEhhNDIM2cC8h4Q2GaFtStRWPQG8xqdJiEZ7Rl NkmiF2tTvm7k2tVKRIMOV6WuUl4SkrDcBaAksMt4huz066u2p/kKRoFU4h0NDVF0IDBp WReCckpvUMv9m47YSTrolS++sPQPaEMLQaFGQIPSR9K6rjPbGed4VKVT/8BFu5o/1VSx M/PqZygOeRKIllCu0nmK5p65Pzt8tIs8Uqdz9Yf/vpe1M6Z/6t4uUh3pMf9ZXMVxA3ed +yppmk/k0zvpH6zhdofwN084sIg66g/1Ipp5lCFOh8oFOcEhqXkt7R8JpJxASPARZSiO sVXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 c128si401330pfa.221.2019.06.12.11.03.44; Wed, 12 Jun 2019 11:03: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; 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 S2439845AbfFLO4S (ORCPT + 99 others); Wed, 12 Jun 2019 10:56:18 -0400 Received: from www62.your-server.de ([213.133.104.62]:47570 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727121AbfFLO4S (ORCPT ); Wed, 12 Jun 2019 10:56:18 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1hb4fe-00007v-4O; Wed, 12 Jun 2019 16:56:14 +0200 Received: from [178.199.41.31] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hb4fd-0005or-V5; Wed, 12 Jun 2019 16:56:13 +0200 Subject: Re: [PATCH] bpf/core.c - silence warning messages To: =?UTF-8?Q?Valdis_Kl=c4=93tnieks?= , Alexei Starovoitov Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org References: <29466.1559875167@turing-police> From: Daniel Borkmann Message-ID: Date: Wed, 12 Jun 2019 16:56:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <29466.1559875167@turing-police> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.3/25478/Wed Jun 12 10:14:54 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/07/2019 04:39 AM, Valdis Klētnieks wrote: > 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 Makes sense, applied!