From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38526C4360C for ; Thu, 10 Oct 2019 20:34:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE430208C3 for ; Thu, 10 Oct 2019 20:34:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="a8/BUQSR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727298AbfJJUeX (ORCPT ); Thu, 10 Oct 2019 16:34:23 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37368 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbfJJUeX (ORCPT ); Thu, 10 Oct 2019 16:34:23 -0400 Received: by mail-pf1-f196.google.com with SMTP id y5so4639949pfo.4 for ; Thu, 10 Oct 2019 13:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qLN+ZaDKXKKqy42TKsmx8NFeuacgz7hdpKcKP23ADmI=; b=a8/BUQSRa5fAL7ua30472Y4U7kNqLVO+XHaBB/Rc2wmWKE9Xj04D00RKSoqyZUda8p AoN69CT8wMJ2+8+9xP0hKg/fExhxNp8lM/hqppiZ2eSLtMQm6/uYroSxKlTzitdKEuQz TwEci32h62j6hKZzmDlEOn92Ch+77FD0Fd8R4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qLN+ZaDKXKKqy42TKsmx8NFeuacgz7hdpKcKP23ADmI=; b=cEDVYYB0U1IgS/kRBuAtdiwhoRppGNZt2YrdAxaiWQMtroos/kg6Bntecf1vwsM9bs h17yQ+jYAk+2ASvzF3tswVBElikED/SpR/rQbbwa9HIjinQYbaKONA4UItkSrab20JKe 01d3LiivmEDL9s/ouu/3p/mKtQYCDUjRr0kgqMRNa4nfYDN13JFk8IItwAq6OM5KxuBp /LMFmxP1vNsfC5rXbdvgzBtb2VHWo9QvLcEKAkbje3MbueltidH98FeK6yuf2QwPWvJJ VdFwR/HP1d9ZQeOhuZ6anWXzHH8Njbh8FdQcWVNDHUDbrBBDwmjfy/TQ/TEcGVueNXUz ww2g== X-Gm-Message-State: APjAAAXiL1+VI3nJh1zgYd6ikWislU08qV+ce3YjrylRWwE3cvvu+a7B h5682sb9yRJ9kYXsCfyoS7Tt6A== X-Google-Smtp-Source: APXvYqwEu3drJD2Rf13atiZCcuDu9mkLKlc6Z2P3wFQoHl4Ae6+HQ4EAmBu1c73yaqSQEBRghQ4ujA== X-Received: by 2002:a63:311:: with SMTP id 17mr12928079pgd.327.1570739662653; Thu, 10 Oct 2019 13:34:22 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id o9sm5965017pfp.67.2019.10.10.13.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 13:34:21 -0700 (PDT) Date: Thu, 10 Oct 2019 13:34:20 -0700 From: Kees Cook To: Joe Perches Cc: Linus Torvalds , Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , Miguel Ojeda , Borislav Petkov , "H . Peter Anvin" , Thomas Gleixner , Pavel Machek , "Gustavo A . R . Silva" , Arnaldo Carvalho de Melo , Kan Liang , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Shawn Landden , x86@kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Andrew Morton , David Miller , clang-built-linux@googlegroups.com, linux-sctp@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 1/4] net: sctp: Rename fallthrough label to unhandled Message-ID: <201910101334.22271AB@keescook> References: <2e0111756153d81d77248bc8356bac78925923dc.1570292505.git.joe@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e0111756153d81d77248bc8356bac78925923dc.1570292505.git.joe@perches.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 05, 2019 at 09:46:41AM -0700, Joe Perches wrote: > fallthrough may become a pseudo reserved keyword so this only use of > fallthrough is better renamed to allow it. > > Signed-off-by: Joe Perches Reviewed-by: Kees Cook -Kees > --- > net/sctp/sm_make_chunk.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c > index e41ed2e0ae7d..48d63956a68c 100644 > --- a/net/sctp/sm_make_chunk.c > +++ b/net/sctp/sm_make_chunk.c > @@ -2155,7 +2155,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > case SCTP_PARAM_SET_PRIMARY: > if (ep->asconf_enable) > break; > - goto fallthrough; > + goto unhandled; > > case SCTP_PARAM_HOST_NAME_ADDRESS: > /* Tell the peer, we won't support this param. */ > @@ -2166,11 +2166,11 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > case SCTP_PARAM_FWD_TSN_SUPPORT: > if (ep->prsctp_enable) > break; > - goto fallthrough; > + goto unhandled; > > case SCTP_PARAM_RANDOM: > if (!ep->auth_enable) > - goto fallthrough; > + goto unhandled; > > /* SCTP-AUTH: Secion 6.1 > * If the random number is not 32 byte long the association > @@ -2187,7 +2187,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > > case SCTP_PARAM_CHUNKS: > if (!ep->auth_enable) > - goto fallthrough; > + goto unhandled; > > /* SCTP-AUTH: Section 3.2 > * The CHUNKS parameter MUST be included once in the INIT or > @@ -2203,7 +2203,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > > case SCTP_PARAM_HMAC_ALGO: > if (!ep->auth_enable) > - goto fallthrough; > + goto unhandled; > > hmacs = (struct sctp_hmac_algo_param *)param.p; > n_elt = (ntohs(param.p->length) - > @@ -2226,7 +2226,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > retval = SCTP_IERROR_ABORT; > } > break; > -fallthrough: > +unhandled: > default: > pr_debug("%s: unrecognized param:%d for chunk:%d\n", > __func__, ntohs(param.p->type), cid); > -- > 2.15.0 > -- Kees Cook