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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <qxvmx7nawbqjj5luzzken3psdei7pvgliieiv4vdxgumb2wpkx@p4ckdsds66ak>
Date: Thu, 23 Oct 2025 09:27:03 -0500
From: Lucas De Marchi <lucas.demarchi@...el.com>
To: Nathan Chancellor <nathan@...nel.org>
CC: Rodrigo Vivi <rodrigo.vivi@...el.com>, Alexander Usyskin
	<alexander.usyskin@...el.com>, Anshuman Gupta <anshuman.gupta@...el.com>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>, Arnd Bergmann
	<arnd@...db.de>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<intel-xe@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mei: late_bind: Fix
 -Wincompatible-function-pointer-types-strict

On Sat, Sep 20, 2025 at 04:17:50PM -0700, Nathan Chancellor wrote:
>When building with -Wincompatible-function-pointer-types-strict, a
>warning designed to catch kernel control flow integrity (kCFI) issues at
>build time, there is an instance in the new mei late binding code
>originating from the type parameter of mei_lb_push_payload():
>
>  drivers/misc/mei/mei_lb.c:211:18: error: incompatible function pointer types initializing 'int (*)(struct device *, u32, u32, const void *, size_t)' (aka 'int (*)(struct device *, unsigned int, unsigned int, const void *, unsigned long)') with an expression of type 'int (struct device *, enum intel_lb_type, u32, const void *, size_t)' (aka 'int (struct device *, enum intel_lb_type, unsigned int, const void *, unsigned long)') [-Werror,-Wincompatible-function-pointer-types-strict]
>    211 |         .push_payload = mei_lb_push_payload,
>        |                         ^~~~~~~~~~~~~~~~~~~
>
>While 'unsigned int' and 'enum intel_lb_type' are ABI compatible, hence
>no regular warning from -Wincompatible-function-pointer-types, the
>mismatch will trigger a kCFI violation when mei_lb_push_payload() is
>called indirectly.
>
>Update the type parameter of mei_lb_push_payload() to be 'u32' to match
>the prototype in 'struct intel_lb_component_ops', clearing up the
>warning and kCFI violation.
>
>Fixes: 741eeabb7c78 ("mei: late_bind: add late binding component driver")
>Signed-off-by: Nathan Chancellor <nathan@...nel.org>

Reviewed-by: Lucas De Marchi <lucas.demarchi@...el.com>

Sasha, is this fix something you are taking through char-misc since the
commits that added it already propagated through the 6.18-rc?

thanks
Lucas De Marchi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ