From patchwork Mon Oct 24 11:29:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8471 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp403135wru; Mon, 24 Oct 2022 04:51:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6nRzUDIAvGuYlfagx7AwS0L6cKbUbA3yvDxxFAG3/3WiU7MQT8mlHEd0H11A9IQ/cxaRHC X-Received: by 2002:a17:902:e885:b0:183:dcb7:c4f8 with SMTP id w5-20020a170902e88500b00183dcb7c4f8mr33332134plg.160.1666612282720; Mon, 24 Oct 2022 04:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666612282; cv=none; d=google.com; s=arc-20160816; b=xTaQ0PH/DWXr3P5P+uVIts9kYT20Aytcrut0tDTKSlDRJY35ycRJFYSoYjccQVjMjS Af3ElhiCY3T5T8hi+QR10t86ibaepBSEk2YJkFi1WZsW66kP+E4bDl8MJ6DSnLlgQVPr U/FOICJ1k38pIzPkWOOHuhFwqVi9XfY+f2qex6uOvxiwciZJrDkxLE8bYVp4+Z9S1rKv ZI/ah3qJL+TIiwA0NopyNgGE0hHqLWn/LQDfOf73B3tg772QZkZ2MIVzJea8FCYjHICL afiTdSp/YZ8xwzqIjgOK/3PzuenyFNqjWPTUyvNjVBIau9PMK1ZAS0lemp8zR5baDfG4 LUGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GdIZZrU96N60lEt1Ve0GyCxqiposMFSw+ZS1kD49DF8=; b=ZZc77ag4SkEycYBZuOmxxa1LnRn2Mwlko6VULAsoCbs4Xtfmf30yVz7XLZpkAZCA+q /TEp3ALOnba47WHfNaLWlhAmDPvKkM28tOUMTzmOxC06pstljLX4lMVtZMctA76hPZ5o caaRAFLHv7Q4Vrd3fQzNTTuKdmHxCg1+Jh+9Dvfw1Csz0yNTYCUI9IU++MvwDzUXluIk xcLaCv74qtoG7t0FdZUqeuXBTB/yAbp8KTl8eznNAqyStAZn2wM0U2nZSjK5P5CTXua9 BExWVMCEPzg3DbwkXBDMPNvI+P+Wpr3Y2PFEIHvg+XGoS8p9/S0ULqlaNU2XViOuIN9I UsBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eSZE+DNL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a170902cf0300b0017833671bc7si36344556plg.619.2022.10.24.04.51.08; Mon, 24 Oct 2022 04:51:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eSZE+DNL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbiJXLuw (ORCPT + 99 others); Mon, 24 Oct 2022 07:50:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231896AbiJXLtK (ORCPT ); Mon, 24 Oct 2022 07:49:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E153E275F6; Mon, 24 Oct 2022 04:43:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8264CB81144; Mon, 24 Oct 2022 11:39:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE75DC433C1; Mon, 24 Oct 2022 11:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611556; bh=HBBpffrAAZogUx4OltO2p8Q0Pibr4p0o4OS7Dboa33g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eSZE+DNLGwCGyHFMC3xxYhdenDhWqRz+FXx85GhxOhch+tmc4buIH4npr/iDDCZfq 2wW07k88ChxfpD05DpvXcZctE/yZxikoceV/EqRVL0YMDPvhOv+jMOEbktP7uTKPGF N2plFa6s7hn89DqQA33BGxh51q/gbyYgnIoBFhbw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Sami Tolvanen , Kees Cook Subject: [PATCH 4.9 016/159] Makefile.extrawarn: Move -Wcast-function-type-strict to W=1 Date: Mon, 24 Oct 2022 13:29:30 +0200 Message-Id: <20221024112949.948390655@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747569640702374798?= X-GMAIL-MSGID: =?utf-8?q?1747569640702374798?= From: Sami Tolvanen commit 2120635108b35ecad9c59c8b44f6cbdf4f98214e upstream. We enable -Wcast-function-type globally in the kernel to warn about mismatching types in function pointer casts. Compilers currently warn only about ABI incompability with this flag, but Clang 16 will enable a stricter version of the check by default that checks for an exact type match. This will be very noisy in the kernel, so disable -Wcast-function-type-strict without W=1 until the new warnings have been addressed. Cc: stable@vger.kernel.org Link: https://reviews.llvm.org/D134831 Link: https://github.com/ClangBuiltLinux/linux/issues/1724 Suggested-by: Nathan Chancellor Signed-off-by: Sami Tolvanen Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220930203310.4010564-1-samitolvanen@google.com Signed-off-by: Greg Kroah-Hartman --- scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+) --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -72,5 +72,6 @@ KBUILD_CFLAGS += $(call cc-disable-warni KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access) +KBUILD_CFLAGS += $(call cc-disable-warning, cast-function-type-strict) endif endif