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: <170783975824.2331975.17734171438051214868.b4-ty@kernel.dk>
Date: Tue, 13 Feb 2024 08:55:58 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Philipp Reisner <philipp.reisner@...bit.com>, 
 Lars Ellenberg <lars.ellenberg@...bit.com>, 
 Christoph Böhmwalder <christoph.boehmwalder@...bit.com>, 
 Arnd Bergmann <arnd@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Nathan Chancellor <nathan@...nel.org>, 
 Nick Desaulniers <ndesaulniers@...gle.com>, 
 Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>, 
 "Uladzislau Rezki (Sony)" <urezki@...il.com>, drbd-dev@...ts.linbit.com, 
 linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
 llvm@...ts.linux.dev
Subject: Re: [PATCH] drbd: fix function cast warnings in state machine


On Tue, 13 Feb 2024 11:03:01 +0100, Arnd Bergmann wrote:
> There are four state machines in drbd that use a common infrastructure, with
> a cast to an incompatible function type in REMEMBER_STATE_CHANGE that clang-16
> now warns about:
> 
> drivers/block/drbd/drbd_state.c:1632:3: error: cast from 'int (*)(struct sk_buff *, unsigned int, struct drbd_resource_state_change *, enum drbd_notification_type)' to 'typeof (last_func)' (aka 'int (*)(struct sk_buff *, unsigned int, void *, enum drbd_notification_type)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
>  1632 |                 REMEMBER_STATE_CHANGE(notify_resource_state_change,
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1633 |                                       resource_state_change, NOTIFY_CHANGE);
>       |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/block/drbd/drbd_state.c:1619:17: note: expanded from macro 'REMEMBER_STATE_CHANGE'
>  1619 |            last_func = (typeof(last_func))func; \
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/block/drbd/drbd_state.c:1641:4: error: cast from 'int (*)(struct sk_buff *, unsigned int, struct drbd_connection_state_change *, enum drbd_notification_type)' to 'typeof (last_func)' (aka 'int (*)(struct sk_buff *, unsigned int, void *, enum drbd_notification_type)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
>  1641 |                         REMEMBER_STATE_CHANGE(notify_connection_state_change,
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1642 |                                               connection_state_change, NOTIFY_CHANGE);
>       |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Applied, thanks!

[1/1] drbd: fix function cast warnings in state machine
      commit: fe0b1e9a73d60f01fdc391925be74e823af7c91d

Best regards,
-- 
Jens Axboe




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ