Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4175015imu; Mon, 28 Jan 2019 19:13:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN7eXWYtMhrgs/qIpRSWnlorGWkinRgEAHpfG6+plR6mld0eEb1OyJOWGrXM8RvtaQUbLg1z X-Received: by 2002:a63:f1f:: with SMTP id e31mr21922942pgl.274.1548731620842; Mon, 28 Jan 2019 19:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548731620; cv=none; d=google.com; s=arc-20160816; b=CZsa5I8B5T1qtMTf4K9hKEkj6cPB3kdd5hNdlWVadFEW4rNgVY947BkoS6oW0wd6s+ xIQqinjV0M9jlDqbvvp6Ftugibh8skXflWtnMiN1d5xkrht5DSMG+gPXPWgvJ5e9r7Uw JpIcCCotyY+Bsv3GKoMsVRz4WfRXunub4R/zTiTIS9wY+PMC1PTqkwIJlToeK392ke+S i2XlBW2/evExl+XlVqg+N0+EOG5EZXm6wpOewLbdxi4cnYYTrMdsXqWBeY77dVGoVi+P iGAPHvyY3SaZIZ8MseOvqDpT6gEpPXfGOI94ZZ9YWn5olQUy9hcMXhevTIVMCFzIBDL+ 2JYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VMWWwMWhbc5Fv9jThS/LXI6OfGbprCD2fUp4iFS5+Tc=; b=uX0+EDgXW41yNP2JzD/Rhb/ezvdNU8ggL7mJemuCoZoN+/HGiKPc3eXe16ZYp/osre r8zakspdi5EPInj7CMq4sApf6Mu9hj14t+N3DtbAjyl2GxaNuOoW6b+54suHEEmgC2E+ 7NgWbEYCbWwu+/zCMaYuKsfxllJaciQQ9WYR/3vF8yXTEyWrTdkgWn5vqDlC0V7f0rjw xnSGGjTaBQ2aLafAHNYRuFW/8N0jERd4rM8+1yOcQWQMnPIpFAhjMj/zdvSeorJqtTG0 bcnvkNQwPPd8TR2ia9yjNasorZGCQcd9ass9lmAtH/Z+7wqkYMqhAg+MGl1ypafovlnS jswg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D9NrTG6+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si2504832pfo.240.2019.01.28.19.13.25; Mon, 28 Jan 2019 19:13:40 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=D9NrTG6+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727439AbfA2DNB (ORCPT + 99 others); Mon, 28 Jan 2019 22:13:01 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:37198 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727096AbfA2DNB (ORCPT ); Mon, 28 Jan 2019 22:13:01 -0500 Received: by mail-qk1-f194.google.com with SMTP id g125so10727655qke.4; Mon, 28 Jan 2019 19:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VMWWwMWhbc5Fv9jThS/LXI6OfGbprCD2fUp4iFS5+Tc=; b=D9NrTG6+IMuw9nrpAyBxtOyzXWcXVCK5GD6uQydZgZ2B1QGZce21Bz3fuGeRRtCdHi uFJmKuf4qMRWEkwSf+wTqrnGWXuzbT/7tzJYQCI3R/eAUoPlBQD4YUJTIpOUbPHrCnNK eYJ4XaJedbOILpODbvOqgZWQBKwyGxTW2yOnfTtLMRVC109o8yM9GPW95jU7ytifarCH 8CwggItQMaV1uvfpoV3mvAUEJigSYUu6V37q4pF3WKczKXphemiU1riIaqQRhOwdYciJ 9tzlojBUnj8F6AT8KkihKHKcq9hiZkUJPofONCTk+o7XMat6frMo5UG3loHzG58o5CyD 5Nkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VMWWwMWhbc5Fv9jThS/LXI6OfGbprCD2fUp4iFS5+Tc=; b=mrBWv6j4l/JLZCREbO0MpwXx+ARsL+ycG8ENBQMA28GgeAxK6O7KR3rmh5HHbN+tEg g6rAEWOrGKegfxQrcCqgSK/K9SS98TSh+IWdq4q2Az1h6UXWl/Z3P1rfHoa1UNPLcKuF yu1lvq2hq8kWj9LrOmq6vAT7tG7PZ3nkfDM+VR+i0Djo1IjvjI3/CUqZXDYs3yqaJmBV M7OFE6cNPTRhQzQBlAFQzDcqn1hq5Fvtns6icgUSCXiPnFX0NqWgqns6/Lp4g/Ugu7e6 PRvVfVKSaVOs+gen/xYxMnF65xTTWuMVEFmumGP109CjqBMC9wICOVwWQ6TCranMLi8X 1MRA== X-Gm-Message-State: AJcUukexS+0sCNN2Q5gNpzxdcnmEh9hWkRIFpIRV2qnkZSN66LfAqvT5 efOqZk8krwzWiynqI1HXwJIZERxK4OuoSlyrHkI= X-Received: by 2002:a37:34d0:: with SMTP id b199mr21601038qka.284.1548731580445; Mon, 28 Jan 2019 19:13:00 -0800 (PST) MIME-Version: 1.0 References: <31468.1548648675@turing-police.cc.vt.edu> <9865.1548718516@turing-police.cc.vt.edu> In-Reply-To: <9865.1548718516@turing-police.cc.vt.edu> From: Song Liu Date: Mon, 28 Jan 2019 19:12:49 -0800 Message-ID: Subject: Re: [PATCH] bpf/core.c - silence warning messages To: Valdis Kletnieks Cc: Alexei Starovoitov , Daniel Borkmann , Networking , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 3:35 PM wrote: > > On Mon, 28 Jan 2019 09:18:45 -0800, Song Liu said: > > On Sun, Jan 27, 2019 at 8:43 PM wrote: > > > > 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. > > > > My concern is that this will also mute the warning for other parts of > > bpf/core.c. > > I checked and there weren't any warnings for other parts of the file. Also, this message > doesn't even happen unless you build with W=1, which apparently happens so rarely > that nobody else has submitted a patch. > > Is there a high likelihood that another overwrite of an initializer is going to > be included in the source? > > > Maybe we should move bpf_opcode_in_insntable() to a separate file, and mute > > warning for that file? > > Seems to be overkill - the intent of this patch was mostly to make the *other* > warnings issued with W=1 more noticable. Yeah, I also felt this might be overkill while asking initially. Acked-by: Song Liu