Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3166714ybh; Mon, 5 Aug 2019 13:19:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3gP1vlD2btaXvUGQfT6W1EoG5P9/yPThO+rzfbOhVEEpsF7xR/mrqyRaFMX3rQHMiRCiW X-Received: by 2002:a63:c0d:: with SMTP id b13mr137387122pgl.420.1565036378584; Mon, 05 Aug 2019 13:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565036378; cv=none; d=google.com; s=arc-20160816; b=0TR6IRMiMHcUjc5sQrWuds/dfMd0kekmqOQm0/27zCjwUC3AYGdkVDy0B0L5Jkcao8 FHWmY0e16SCGGs8ODoGo5qqaskIaGwon/aWVrhkP3LlKbG5e+GkcqA70Y0BeXDS4dTKB hj54iYjD/+HMvh1mkmSj46fErT5kX98dhr8r5/RHymFcEn3s6k8WTYMemFbaZLuOAm1M d2yeLuqC5vQc8h29PBuOQv2OFv6tqobRE5hPLZaBBn34Bpc3FDx4JpwgeK8G/6rJWrJj EL2gYIW855gICzRpFHunz9Kv+tZWIHH1OuAMzoTOPFe1WfEMFVcnVSlWG8f63SjhUKZN FWLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TnMFby6cuMGYKUzIgGV11jAhA9K8cooCmYdmv8dL38I=; b=JhLtppy2QyR1+KMEnGn0jY8IkwxdBcc9yya65bqBScSTk0RPsg5cJR0ObcSTRbtnCF jUw0a/uYz7FrEyoJV83MjlXVYhGqeaRZ7tefcYXCUQm4nVvoDUimSzVIVDw6aIiosAXc JnWqJbNCRHVwuS9TObNYiwwL4WPh3bzVxHvl/zZh+/s4ntrqfJPnhijG5Yj/zYsYuoQd gXK5t2D48M8dPHG5CW777F6R7g+7OTfFZ+ffpWYz6l1Hsdnw3ESTQr9b5ri1WwyRBuK2 2OG7YxH8TBJAZlxDGkckuGtjFt0BW5zY3nP41yq5f4Nj84lliquZ8LwhXazk0Hf2BO2L 5Yjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LiShrSwd; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si6476128pll.333.2019.08.05.13.19.22; Mon, 05 Aug 2019 13:19:38 -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=@chromium.org header.s=google header.b=LiShrSwd; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730605AbfHEUSR (ORCPT + 99 others); Mon, 5 Aug 2019 16:18:17 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35269 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727460AbfHEUSR (ORCPT ); Mon, 5 Aug 2019 16:18:17 -0400 Received: by mail-pg1-f194.google.com with SMTP id n4so5021741pgv.2 for ; Mon, 05 Aug 2019 13:18:16 -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=TnMFby6cuMGYKUzIgGV11jAhA9K8cooCmYdmv8dL38I=; b=LiShrSwdcJpHceuBpSDfF+8pv9O7akLw1+A5ugFbC6pxOsHvP7HsCixegf9LvvhIQk F641xHQC0ZSmuxurQksXXlPdfVdCh5V9vx4ummJlmFcmL4qr/apVxpvNwsxTvF3ae35E e9F3d6V7cA753k7mqlbxuF88LJmLKSteiN9e0= 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=TnMFby6cuMGYKUzIgGV11jAhA9K8cooCmYdmv8dL38I=; b=E5U1e8ocmv1gNAqEAztk2xvigBi4E+a0FWnY2YLuHcsZPkmMAqiKCMX3XGBVWRhk0p m4jjGeTej9BATCRH3qNPBZ1a6upHMRxSWKf+9C7tagRAn9b+GflsGELJh7+5F488vnfn AnzRZTVN6EUG7Z0VvcaiYaDwWklVrNSLRpNUibKvg/qjZH/2v3HY55tBPKEv5JPLA8aX uyhdb1q1iptkJqLVZrjOBO9da6TlkxNBj5r8Clt4bk2G0/Oykk1homWTTFBO7FMwGzf+ 9DC0JuXgNbTlBjmOqE7Maq++fs1n4iKi/hdp3GIo3YAHleuEOjLFC7fwrouThWUDNoOc /j/Q== X-Gm-Message-State: APjAAAVoUkoxfjAvUoHeAIkp80AVxdEZQFqZEkYDI/LJguz8xxPqxz6s NpOscoztJZnCpUnRy7ZqiKBQig== X-Received: by 2002:a17:90a:bf92:: with SMTP id d18mr20458772pjs.128.1565036296585; Mon, 05 Aug 2019 13:18:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t7sm15233198pjq.15.2019.08.05.13.18.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2019 13:18:15 -0700 (PDT) Date: Mon, 5 Aug 2019 13:18:14 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Vineet Gupta , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARC: unwind: Mark expected switch fall-throughs Message-ID: <201908051318.5B1EB8106@keescook> References: <20190805193232.GA12826@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190805193232.GA12826@embeddedor> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 05, 2019 at 02:32:32PM -0500, Gustavo A. R. Silva wrote: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warnings (Building: haps_hs_defconfig arc): > > arch/arc/kernel/unwind.c:827:20: warning: this statement may fall through [-Wimplicit-fallthrough=] > arch/arc/kernel/unwind.c:836:20: warning: this statement may fall through [-Wimplicit-fallthrough=] > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -Kees > --- > arch/arc/kernel/unwind.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c > index c2663fce7f6c..445e4d702f43 100644 > --- a/arch/arc/kernel/unwind.c > +++ b/arch/arc/kernel/unwind.c > @@ -826,7 +826,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc, > case DW_CFA_def_cfa: > state->cfa.reg = get_uleb128(&ptr.p8, end); > unw_debug("cfa_def_cfa: r%lu ", state->cfa.reg); > - /*nobreak*/ > + /* fall through */ > case DW_CFA_def_cfa_offset: > state->cfa.offs = get_uleb128(&ptr.p8, end); > unw_debug("cfa_def_cfa_offset: 0x%lx ", > @@ -834,7 +834,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc, > break; > case DW_CFA_def_cfa_sf: > state->cfa.reg = get_uleb128(&ptr.p8, end); > - /*nobreak */ > + /* fall through */ > case DW_CFA_def_cfa_offset_sf: > state->cfa.offs = get_sleb128(&ptr.p8, end) > * state->dataAlign; > -- > 2.22.0 > -- Kees Cook