Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp917057ybi; Fri, 12 Jul 2019 06:42:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCBftZMG7ylHmzsPlnqHZ8agm6pUPiZ9Crm0HAVb7Uoaz9JA7hdhVpzdIxiIf14dNUbqVU X-Received: by 2002:a17:902:16f:: with SMTP id 102mr11187866plb.94.1562938943817; Fri, 12 Jul 2019 06:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562938943; cv=none; d=google.com; s=arc-20160816; b=EQ4JttpH8j49rMilm8nQSGNheFPMZBO4UkAus7mnYhpMe2fI/WdiSi2JdDZRNj8Kvc xZq4evuNtlkyZc6cVMrY0oDOFNINP8ozm3eyH6RszMb7TdWy4QqLZqe2DA1HrwBR7hC1 PXoZ94sCNZCczXK+Ba88d8PwExzTjvZrlRH7H8hZjASZvPNT7XN7+SvpH2pUhUvAbcst StaM0GYv0bm55mmXebjptxnnQatb9Q0uaXc+wiQ2y6iUkhnLkS3vBuczQ233n3bGezCY R44wjYVrOrmlh1ilqmM1SSplMSh+D1YECjprPC40DvLMzzrX25qh8WIRiYAt3J0N3jae y0mw== 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=NA7jrHdUV3bV2zs95b3wdjVo+k1ArFiWF03VRO8a8sI=; b=trzxMWJre8/KbuiQv3Tp9BKVRHtoR3jiIgsz4J3bwnHwcaMcdLqS/zkOnBQB5Fk0+n qNYStwf2ycQ8C4u341cHK+U8e1vxRnqIPlTFJllVJH65x+yJgU5qGI0+Ri2H8lpsvhnk 3JTeJT9Nf84C9qLRZPbchytB5/iFs36cBXCmf0f6KvOiwljeYq7Sjx8nWGaEMXSqkIG8 D318/YVtJrVShEHVgrP4VaRRjBFfRgMZS7H7RGuYZmquKQMkx+qJYhPW/dGM5nAyQ2im mg5dtraTEgjcReEZmiT+vEdPhk8WW2SKPhsrVtDUMNouflo6j/iSGMlZ0PxroKNQ1uGb B1dA== 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 d5si7660671pgv.584.2019.07.12.06.42.08; Fri, 12 Jul 2019 06:42:23 -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 S1727572AbfGLNlk (ORCPT + 99 others); Fri, 12 Jul 2019 09:41:40 -0400 Received: from www62.your-server.de ([213.133.104.62]:56640 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbfGLNlk (ORCPT ); Fri, 12 Jul 2019 09:41:40 -0400 Received: from [78.46.172.3] (helo=sslproxy06.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 1hlvnk-0000sd-11; Fri, 12 Jul 2019 15:41:28 +0200 Received: from [2a02:1205:5069:fce0:c5f9:cd68:79d4:446d] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hlvnj-000Pkh-QY; Fri, 12 Jul 2019 15:41:27 +0200 Subject: Re: [PATCH][bpf-next] bpf: verifier: avoid fall-through warnings To: "Gustavo A. R. Silva" , Alexei Starovoitov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Lawrence Brakmo Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook References: <20190711162233.GA6977@embeddedor> From: Daniel Borkmann Message-ID: Date: Fri, 12 Jul 2019 15:41:27 +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: <20190711162233.GA6977@embeddedor> 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/25508/Fri Jul 12 10:10:04 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/11/2019 06:22 PM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, this patch silences > the following warning: > > kernel/bpf/verifier.c: In function ‘check_return_code’: > kernel/bpf/verifier.c:6106:6: warning: this statement may fall through [-Wimplicit-fallthrough=] > if (env->prog->expected_attach_type == BPF_CGROUP_UDP4_RECVMSG || > ^ > kernel/bpf/verifier.c:6109:2: note: here > case BPF_PROG_TYPE_CGROUP_SKB: > ^~~~ > > Warning level 3 was used: -Wimplicit-fallthrough=3 > > Notice that is much clearer to explicitly add breaks in each case > statement (that actually contains some code), rather than letting > the code to fall through. > > This patch is part of the ongoing efforts to enable > -Wimplicit-fallthrough. > > Acked-by: Andrii Nakryiko > Signed-off-by: Gustavo A. R. Silva Looks good, applied to bpf, thanks.