From patchwork Thu Oct 27 20:16:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 791 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp438312wru; Thu, 27 Oct 2022 13:21:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6XsCi4EvUA1R1lodZVs8DY1b1NC7PvHRbDXlRhFOrNJlSj+1bI6FhDn84U+/Mh8Ifp5Q4c X-Received: by 2002:a17:902:7c8a:b0:17b:6eaa:5da3 with SMTP id y10-20020a1709027c8a00b0017b6eaa5da3mr49938950pll.33.1666902073562; Thu, 27 Oct 2022 13:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666902073; cv=none; d=google.com; s=arc-20160816; b=aIZ03uajgC9d1wdFaVb2iq5wm+InxnewWyiadF6IwJGX5w79LDvWtB/Fg7s/tNq9Ze miPtDn7A/mL9Lx2CGYo9TF0tdIfloRkl+2XoXWs7PjilPrX1Gz/mVZkGBCEkAS7EJW35 tjXR+68zWoBIqKn0CG4bi6fs3ATm4yo95tJwXF6A/1Hd7IgJC5O2liBgg+62FUxKFrpv /U6/yhjrJFBawMeWt/bOVFZSxjhzIrrvnhNBhjBqaS7SH3fRhIJBi+xB8CCnicHy2a2T +UfaCvkZUAxdkIQbxadoNm9FAk4BUPhTQuwC2r11AllK64mpCP36bey2Hj67X+dL3DCy ENJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=5fwWZxywRuoGGQI6NxITEjJWtJ+r8Dr6f5GbxD1+RGM=; b=ygJcS+xi4us0njpheqA2HaEsp/jq9oIeOAn2pxQ1MqdxEeGYK8Qzm454/N+CM8uqRI ef6LJWlRCBKWXPvXt/WVaKuxSliasWbp1tjrqmNf5SYa1R0GeYx9/DYwzIkX1GP+wxwb UsoDEmC3QLigk+ikDGuD/TBTds4FCXLhNJLR0r5qd4Go6ArCkp/itsKiOEsAGArwY72n 0Yy0opxV/H1TFAbhROLWmilRC/pRGayKGFKjkN8rRvv4R895vFWeRW/2clzTGp+/3QL3 RmGEAR4G7275T1mTq90fCR+vNYNgMkHHzNpkfsXEqq25/ps3Ub9kvezhIVn81TuDxvFL NxvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k+5h+9Hl; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 30-20020a630f5e000000b0046f4d39c588si2631755pgp.580.2022.10.27.13.21.00; Thu, 27 Oct 2022 13:21:13 -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=@kernel.org header.s=k20201202 header.b=k+5h+9Hl; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236537AbiJ0UQ7 (ORCPT + 99 others); Thu, 27 Oct 2022 16:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234943AbiJ0UQ5 (ORCPT ); Thu, 27 Oct 2022 16:16:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67F5E645D2; Thu, 27 Oct 2022 13:16:56 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 03AAC624DE; Thu, 27 Oct 2022 20:16:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B85D3C433C1; Thu, 27 Oct 2022 20:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666901815; bh=8HAK4m6E3POACA1m3I3Cl8FtXlz0B1YchOPXq9lU5BU=; h=Date:From:To:Cc:Subject:From; b=k+5h+9HliD+/DKxTYK+Ll9WsQoU4+6L/tUCabezbJnN9zjPXXrxFq0CUllRzMWU6l eXja6U6i6FMLBPBLVR9R3Pxb01oQjTKdx4JMRI0p3v+0W2KYOwatXdmOc+Z9QLPNbr wFIDqWSiWcoyWXGXVEUZDDHm7MwlpZH6Ye7DW5s4cXaQ4XhuIJMfqwun9M7yq9eURT KM/19EZqjB4sMLsqEiP8KZxFeNSzWqoklEbPaNDD/8ldutTBm9vN0l1z3sygu6fOIZ FwUkcYVlAZfSGtRAfvOklVs+9YilA+rg4CjepT47G6qzGueP3K+L18s3or3oKTGMvP S9GYaIAy6PhsQ== Date: Thu, 27 Oct 2022 15:16:51 -0500 From: "Gustavo A. R. Silva" To: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Greg Kroah-Hartman , Jouni Malinen , Stanislav Yakovlev , Johannes Berg Cc: linux-staging@lists.linux.dev, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook , "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH v2 0/6] Avoid clashing function prototypes Message-ID: MIME-Version: 1.0 Content-Disposition: inline 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?1747873508784007260?= X-GMAIL-MSGID: =?utf-8?q?1747873508784007260?= When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. This series fixes a total of 424 -Wcast-function-type-strict warnings. Link: https://reviews.llvm.org/D134831 [1] Changes in v2: - Squash previous patches 1, 2 and 3 into a single patch cfg80211. - Add a couple more patches: bna and staging. - Fix 254 (227 in bna and 27 in staging) more -Wcast-function-type-strict warnings. v1: - Link: https://lore.kernel.org/linux-hardening/cover.1666038048.git.gustavoars@kernel.org/ Gustavo A. R. Silva (6): cfg80211: Avoid clashing function prototypes hostap: Avoid clashing function prototypes zd1201: Avoid clashing function prototypes airo: Avoid clashing function prototypes bna: Avoid clashing function prototypes staging: ks7010: Avoid clashing function prototypes drivers/net/ethernet/brocade/bna/bfa_cs.h | 60 +++-- drivers/net/ethernet/brocade/bna/bfa_ioc.c | 10 +- drivers/net/ethernet/brocade/bna/bfa_ioc.h | 8 +- drivers/net/ethernet/brocade/bna/bfa_msgq.h | 8 +- drivers/net/ethernet/brocade/bna/bna_enet.c | 6 +- drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 6 +- drivers/net/ethernet/brocade/bna/bna_types.h | 27 +- drivers/net/wireless/cisco/airo.c | 204 ++++++++------- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- .../wireless/intersil/hostap/hostap_ioctl.c | 234 ++++++++++-------- drivers/net/wireless/intersil/orinoco/wext.c | 113 +++++---- drivers/net/wireless/zydas/zd1201.c | 162 ++++++------ drivers/staging/ks7010/ks_wlan_net.c | 184 +++++++------- include/net/cfg80211-wext.h | 20 +- net/wireless/scan.c | 3 +- net/wireless/wext-compat.c | 180 ++++++-------- net/wireless/wext-compat.h | 8 +- net/wireless/wext-sme.c | 5 +- 18 files changed, 661 insertions(+), 579 deletions(-)