linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Jouni Malinen <j@w1.fi>, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2 2/6] hostap: Avoid clashing function prototypes
Date: Tue,  1 Nov 2022 09:36:19 +0000 (UTC)	[thread overview]
Message-ID: <166729537521.21401.10713096825251730903.kvalo@kernel.org> (raw)
In-Reply-To: <8388b5ed9e729eb9dadec875a7576219e6d61223.1666894751.git.gustavoars@kernel.org>

"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:

> 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].
> 
> Fix a total of 42 warnings like these:
> 
> ../drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3868:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, char *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict]
>         (iw_handler) prism2_get_name,                   /* SIOCGIWNAME */
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> The hostap Wireless Extension handler callbacks (iw_handler) use a
> union for the data argument. Actually use the union and perform explicit
> member selection in the function body instead of having a function
> prototype mismatch. There are no resulting binary differences
> before/after changes.
> 
> Link: https://github.com/KSPP/linux/issues/235
> Link: https://reviews.llvm.org/D134831 [1]
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Please add "wifi: " to all wireless patches, for example this one should be:

wifi: hostap: Avoid clashing function prototypes

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/8388b5ed9e729eb9dadec875a7576219e6d61223.1666894751.git.gustavoars@kernel.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


  parent reply	other threads:[~2022-11-01  9:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 20:16 [PATCH v2 0/6] Avoid clashing function prototypes Gustavo A. R. Silva
2022-10-27 20:17 ` [PATCH v2 1/6] cfg80211: " Gustavo A. R. Silva
2022-10-28  8:22   ` Johannes Berg
2022-10-31 17:01     ` Gustavo A. R. Silva
2022-10-31 21:03     ` Gustavo A. R. Silva
2022-10-27 20:18 ` [PATCH v2 2/6] hostap: " Gustavo A. R. Silva
2022-10-29  7:26   ` Kees Cook
2022-11-01  9:36   ` Kalle Valo [this message]
2022-10-27 20:19 ` [PATCH v2 3/6] zd1201: " Gustavo A. R. Silva
2022-10-29  7:08   ` Kees Cook
2022-10-27 20:20 ` [PATCH v2 4/6] airo: " Gustavo A. R. Silva
2022-10-27 20:20 ` [PATCH v2 5/6] bna: " Gustavo A. R. Silva
2022-10-29  7:12   ` Kees Cook
2022-10-31 17:13     ` Gustavo A. R. Silva
2022-10-31 21:04     ` Gustavo A. R. Silva
2022-10-27 20:22 ` [PATCH v2 6/6] staging: ks7010: " Gustavo A. R. Silva
2022-10-29  7:20   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166729537521.21401.10713096825251730903.kvalo@kernel.org \
    --to=kvalo@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=j@w1.fi \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).