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: <d3irozcnhptufq7jbzrou7s3snjj4rw5jcmcqxqajin5zw6lnw@qhnrqk3ibskw>
Date: Thu, 23 Oct 2025 11:59:49 -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 Thu, Oct 23, 2025 at 06:52:05PM +0200, Nathan Chancellor wrote:
>On Thu, Oct 23, 2025 at 09:27:03AM -0500, Lucas De Marchi wrote:
>> 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?
>
>It looks like Greg already took this via char-misc-linus:
>
>https://git.kernel.org/gregkh/char-misc/c/98718e80af0bb1cd80f4bfe565dd60c57debad51

ahh, ok. I was checking rc2 and noticing this was not there yet.

thanks
Lucas De Marchi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ