lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Nov 2022 07:43:35 +0200
From:   Kalle Valo <kvalo@...nel.org>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc:     Sudarsana Kalluru <skalluru@...vell.com>,
        GR-Linux-NIC-Dev@...vell.com, Rasesh Mody <rmody@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kees Cook <keescook@...omium.org>,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3 6/7] bna: Avoid clashing function prototypes

"Gustavo A. R. Silva" <gustavoars@...nel.org> writes:

> 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 227 warnings like these:
>
> drivers/net/ethernet/brocade/bna/bna_enet.c:519:3: warning: cast from 'void (*)(struct bna_ethport *, enum bna_ethport_event)' to 'bfa_fsm_t' (aka 'void (*)(void *, int)') converts to incompatible function type [-Wcast-function-type-strict]
>                 bfa_fsm_set_state(ethport, bna_ethport_sm_down);
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> The bna state machine code heavily overloads its state machine functions,
> so these have been separated into their own sets of structs, enums,
> typedefs, and helper functions. There are almost zero binary code changes,
> all seem to be related to header file line numbers changing, or the
> addition of the new stats helper.
>
> Important to mention is that while I was manually implementing this changes
> I was staring at this[2] patch from Kees Cook. Thanks, Kees. :)
>
> [1] https://reviews.llvm.org/D134831
> [2] https://lore.kernel.org/linux-hardening/20220929230334.2109344-1-keescook@chromium.org/
> Reviewed-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
> ---
> Changes in v3:
>  - Add RB tag from Kees.
>  - Update changelog text.
>
> Changes in v2:
>  - None. This patch is new in the series.
>  - Link: https://lore.kernel.org/linux-hardening/2812afc0de278b97413a142d39d939a08ac74025.1666894751.git.gustavoars@kernel.org/
>
>  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 +++++++--

Mixing wifi and ethernet patches in the same patch is not a good idea,
the network maintainers might miss this patch. I recommend submitting
patch 6 separately.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

Powered by blists - more mailing lists