From patchwork Mon Oct 24 11:28:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp573404wru; Mon, 24 Oct 2022 10:38:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PWiL80Fut2KHzL3pVNonQb1YGLTNTyD2qwZfboKbgTrJnDx4FJcSEm9LuWqcIduGZQpcb X-Received: by 2002:a63:2a8b:0:b0:46e:9fda:2171 with SMTP id q133-20020a632a8b000000b0046e9fda2171mr19668287pgq.106.1666633085143; Mon, 24 Oct 2022 10:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666633085; cv=none; d=google.com; s=arc-20160816; b=z/h7AOKEackTxxePSb3DdL3fx8QkvveVL15WNCMhszZvd54iZhNL7nZtlnnFU8X9TD hsYkf5tF7vlj3jGfkPWSP6Hv/wuLK272KjtZ9WRf9O185+JGDyB2+omYUgV1gGmKiktt hCjfJxYjF8TXc2W4HAWn8xfgyUMLHnHGVy8cxrYsDZB0SBqmIOBY8R00E0PRsWn32JLm DbpdPtQR4BGJFA9+OnZJXOXSx9LlAnMT+AFwMt1gOIUd8MgtfaA4UEtesvHbMwnUjTpE gQ0N/uGqBSNSIzUI4hD6+fz3EBL4ebx6t9zPXWxGkNUMaFIxrfVPRaOGvvyGaobbeIQ3 q+hQ== 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=Y41uHaWMfdqamAq84NIXaFQXBn/La0NcAlcnYskG0ZQ=; b=Pak8Uo+yAB11BbekwIicBDFb0XcQYE1qyCDxS7ctPWFOmBgwfLkAFL6GlseRmFPJGR 7ZzM/nXb6OoPHKknGnI2kYUIHdG+Nx9s1i64oHFZwBeKJ20koTplv4Ujrsxly4pxBwYU A3IEPc5Ub+7Uuwe1F8ZgtWEf7hxUgpgCrf0gRhLfilrktEB8MpNhqvhFCH9LggYUQbRc KdE3a/ftT/aMHQuKknKxCOond1XJnV7FzTZSWbKDhZdslruFuYOD4phOwKylH2SRBZ8q +fnkjc9k5aIBcbZJ70pPCUvXGfgjLQjwZd2OQJlXcInECgk2GDMhVj6RdiIrLKNyfFQv yFpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="p+TTl//k"; 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 g190-20020a636bc7000000b004498b9c8d34si43753pgc.682.2022.10.24.10.37.52; Mon, 24 Oct 2022 10:38:05 -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="p+TTl//k"; 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 S231130AbiJXRgu (ORCPT + 99 others); Mon, 24 Oct 2022 13:36:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233156AbiJXRg0 (ORCPT ); Mon, 24 Oct 2022 13:36:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F6001EEF28; Mon, 24 Oct 2022 09:11:22 -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 31135B8119A; Mon, 24 Oct 2022 11:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FCA9C433D7; Mon, 24 Oct 2022 11:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611969; bh=fUXui3hNiQJBFOrbrz2xSQ/YsqpV42/0c9IkyRDduHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p+TTl//keN4X9JAk7awoVUlw3mvo9VblBqD9lq46gBsEq3dYjQG8bpxwETyjt9kow D3TThEAmWeyGJp5yoQehAfwfDE8Z5S2OYbM4tadJTyBdYCRFQf82OHjljSoMr7raU9 /j6P7gM6XFoQj8TDuEGDLTN8kZR8MfSZLtZPUkSI= 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.14 020/210] Makefile.extrawarn: Move -Wcast-function-type-strict to W=1 Date: Mon, 24 Oct 2022 13:28:57 +0200 Message-Id: <20221024112957.612369058@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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?1747591453902838691?= X-GMAIL-MSGID: =?utf-8?q?1747591453902838691?= 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 @@ -74,5 +74,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