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] [day] [month] [year] [list]
Message-ID: <171010474751.3838281.8712464657263840713.b4-ty@oracle.com>
Date: Sun, 10 Mar 2024 19:04:17 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Anil Gurumurthy <anil.gurumurthy@...gic.com>,
        Sudarsana Kalluru <sudarsana.kalluru@...gic.com>,
        Arnd Bergmann <arnd@...nel.org>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
        Arnd Bergmann <arnd@...db.de>, Kees Cook <keescook@...omium.org>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Bill Wendling <morbo@...gle.com>,
        Justin Stitt <justinstitt@...gle.com>,
        Bart Van Assche <bvanassche@....org>,
        Azeem Shaikh <azeemshaikh38@...il.com>,
        James Bottomley <JBottomley@...allels.com>,
        Krishna Gudipati <kgudipat@...cade.com>, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 1/2] [v2] scsi: bfa: fix function pointer type mismatch for hcb_qe->cbfn

On Thu, 22 Feb 2024 13:44:06 +0100, Arnd Bergmann wrote:

> Some callback functions used here take a boolean argument, others
> take a status argument. This breaks KCFI type checking, so clang
> now warns about the function pointer cast:
> 
> drivers/scsi/bfa/bfad_bsg.c:2138:29: error: cast from 'void (*)(void *, enum bfa_status)' to 'bfa_cb_cbfn_t' (aka 'void (*)(void *, enum bfa_boolean)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> 
> Assuming the code is actually correct here and the callers always match
> the argument types of the callee, rework this to replace the explicit
> cast with a union of the two pointer types. This does not change the
> behavior of the code, so if something is actually broken here, a larger
> rework may be necessary.
> 
> [...]

Applied to 6.9/scsi-queue, thanks!

[1/2] scsi: bfa: fix function pointer type mismatch for hcb_qe->cbfn
      https://git.kernel.org/mkp/scsi/c/b69600231f75
[2/2] scsi: bfa: fix function pointer type mismatch for state machines
      https://git.kernel.org/mkp/scsi/c/37126399da15

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ