From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D996280A21 for ; Sat, 10 Jan 2026 04:06:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.89.44.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768017977; cv=none; b=I/mj1NfTHauj31gCjTd2tRSvvOf2rvRuv1/swmq+9Q3c3pQKn8I4xP9TTaDqYaEm9Cpz6vPJuf+zlyAsEvpcjc5b+5qXvG4mldwDeLuivsDXSXcMfmylGzEQINzgkLL/AecE1dKFh/p3Cd9STNg1EHYsJPYpGakBjJYy7jd3Gs0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768017977; c=relaxed/simple; bh=AxDJ2c2DjzXFg1N5SssGCpM3EN/ezL6DJtbvwlCWbWY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=crhPD+5/JHQSGd+SPjguHF9Pr+wZLYMcqy0HGGibFIj9vrmXrqqtFklYTGtrYBY1BTUJbGyZCz+5rrI1W6CNkLjIWDpy1euTdNhiooNknHxWNXr/dFaU361552lOJhVZUBtFd8a4NWRGhAu/LctzFHasOtjTathMnY++JYcgKYg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com; spf=pass smtp.mailfrom=embeddedor.com; dkim=pass (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b=SnE4kN0G; arc=none smtp.client-ip=35.89.44.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b="SnE4kN0G" Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id eJaWv7D4nKjfoeQDLvmL5K; Sat, 10 Jan 2026 04:04:35 +0000 Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with ESMTPS id eQDLvsMuI2l0keQDLvjcgg; Sat, 10 Jan 2026 04:04:35 +0000 X-Authority-Analysis: v=2.4 cv=UfRRSLSN c=1 sm=1 tr=0 ts=6961cfd3 a=1YbLdUo/zbTtOZ3uB5T3HA==:117 a=Aea70ojWhvW6xI+oM0giEQ==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=7T7KSl7uo7wA:10 a=sMBj6sIwAAAA:8 a=_Wotqz80AAAA:8 a=c-n4J4-pAAAA:8 a=Z4Rwk6OoAAAA:8 a=NZ-89VFvAAAA:8 a=cm27Pg_UAAAA:8 a=VwQbUJbxAAAA:8 a=nsuy1HwPnU3qJWfxIPMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=d2ev92nbPIAA:10 a=buJP51TR1BpY-zbLSsyS:22 a=HkZW87K1Qel5hWWM3VKY:22 a=pm31WBKQz9GEXVZSZ1ft:22 a=2aFnImwKRvkU0tJ3nQRT:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BLaNZId77TEAIG+KdayJ2CmqjQF+0gxIMbH1zXxnG+k=; b=SnE4kN0GpVov6zb/hJIxJnn8bV MyLenr4/rDgVduFzUTQs5jSsbDJmsiuT9B4JUet9va7DJLVnJuAXo/qnUoceO39VEMph5pTCTuGWa FppIm4V7v3zi9u5c2yIzfKrYoDFkiAhVtNQG9Mi73ix4lKNjhkvbUJKwQ/H7r4zFzE537li+EMZuu k+tLbEUK8alSfv6z5m9Dm/KOUKSz6Apl/3CUTCy+BH+xkzdV7ghZu4eJ+CuSj4mKMuiYm3bUnEVZk /w98/OexZA+YOBuC0jPHJwWrqn0OV3PnU+8/WdvhBOBhN2Y26FG4jf+WbNSGkIYQcXDFfxEHPDePG iuMZqkWQ==; Received: from flh4-122-130-137-161.osk.mesh.ad.jp ([122.130.137.161]:40644 helo=[10.79.109.44]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.99.1) (envelope-from ) id 1veQDK-0000000182p-1UwE; Fri, 09 Jan 2026 22:04:34 -0600 Message-ID: <28bb8a76-a3e9-4d3c-8899-91f88cd9e80f@embeddedor.com> Date: Sat, 10 Jan 2026 13:04:31 +0900 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Makefile: Globally enable fall-through warning To: Mohit Mishra Cc: mohit.mishra@lunaredgeit.com, Masahiro Yamada , Andrew Morton , Michal Marek , Kees Cook , linux-kbuild@vger.kernel.org References: <20260110013412.14426-2-mohit.mishra@lunaredgeit.com> Content-Language: en-US From: "Gustavo A. R. Silva" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 122.130.137.161 X-Source-L: No X-Exim-ID: 1veQDK-0000000182p-1UwE X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: flh4-122-130-137-161.osk.mesh.ad.jp ([10.79.109.44]) [122.130.137.161]:40644 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 1 X-Org: HG=hgshared;ORG=hostgator; X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGSiwgz5lmU6SQyTdrrfpUQLka23n5TNswtL5qpeS/GV2LI20avBG2jmsqw2DaOGqBbIqHdneNgw5fp0g8jidKBU9ZGwX5m34byEvYQc9xNal3Mz89cn U1tiR1wx3DJuK7QrWZQce7toBUFvRGPl5Wqygz1tyQd4Hxn4FgnHk9wqd95cQa4qRBaf0GF6YSLV1ZVTNScBp7ArUNmfWyrXuDkp2DAD34+A+6QPD+T62yzf On 1/10/26 12:55, Mohit Mishra wrote: > Please accept my apologies for the unintended email. It was sent > accidentally due to a configuration error while setting up git-send-email > for a Linux fundamentals course. Okay, best of luck with the course! -Gustavo > > I am sorry for any inconvenience this caused. > > On Sat, Jan 10, 2026 at 8:43 AM Gustavo A. R. Silva > wrote: > >> Are you intentionally spamming us? >> >> -Gustavo >> >> On 1/10/26 10:34, MIshraMohit21-LE wrote: >>> From: "Gustavo A. R. Silva" >>> >>> Now that all the fall-through warnings have been addressed in the >>> kernel, enable the fall-through warning globally. >>> >>> Also, update the deprecated.rst file to include implicit fall-through >>> as 'deprecated' so people can be pointed to a single location for >>> justification. >>> >>> Cc: Masahiro Yamada >>> Cc: Andrew Morton >>> Cc: Michal Marek >>> Cc: Kees Cook >>> Cc: linux-kbuild@vger.kernel.org >>> Signed-off-by: Gustavo A. R. Silva >>> --- >>> Documentation/process/deprecated.rst | 14 ++++++++++++++ >>> Makefile | 3 +++ >>> 2 files changed, 17 insertions(+) >>> >>> diff --git a/Documentation/process/deprecated.rst >> b/Documentation/process/deprecated.rst >>> index 49e0f64a3427..053b24a6dd38 100644 >>> --- a/Documentation/process/deprecated.rst >>> +++ b/Documentation/process/deprecated.rst >>> @@ -119,3 +119,17 @@ array may exceed the remaining memory in the stack >> segment. This could >>> lead to a crash, possible overwriting sensitive contents at the end of >> the >>> stack (when built without `CONFIG_THREAD_INFO_IN_TASK=y`), or >> overwriting >>> memory adjacent to the stack (when built without `CONFIG_VMAP_STACK=y`) >>> + >>> +Implicit switch case fall-through >>> +--------------------------------- >>> +The C language allows switch cases to "fall through" when >>> +a "break" statement is missing at the end of a case. This, >>> +however, introduces ambiguity in the code, as it's not always >>> +clear if the missing break is intentional or a bug. As there >>> +have been a long list of flaws `due to missing "break" statements >>> +`_, we no longer allow >>> +"implicit fall-through". In order to identify an intentional >> fall-through >>> +case, we have adopted the marking used by static analyzers: a comment >>> +saying `/* Fall through */`. Once the C++17 >> `__attribute__((fallthrough))` >>> +is more widely handled by C compilers, static analyzers, and IDEs, we >> can >>> +switch to using that instead. >>> diff --git a/Makefile b/Makefile >>> index 9be5834073f8..bdf8eac51b07 100644 >>> --- a/Makefile >>> +++ b/Makefile >>> @@ -843,6 +843,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) >> -print-file-name=include) >>> # warn about C99 declaration after statement >>> KBUILD_CFLAGS += -Wdeclaration-after-statement >>> >>> +# Warn about unmarked fall-throughs in switch statement. >>> +KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=3,) >>> + >>> # Variable Length Arrays (VLAs) should not be used anywhere in the >> kernel >>> KBUILD_CFLAGS += -Wvla >>> >> >> >