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]
Message-Id: <63909b0a-7d76-418d-a54c-1061bd3b6e11@app.fastmail.com>
Date: Thu, 04 Apr 2024 16:07:55 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Jean Delvare" <jdelvare@...e.de>, "Arnd Bergmann" <arnd@...nel.org>
Cc: linux-kbuild@...r.kernel.org, "Masahiro Yamada" <masahiroy@...nel.org>,
 "Nathan Chancellor" <nathan@...nel.org>,
 "Greg Kroah-Hartman" <gregkh@...e.de>, "Nicolas Schier" <nicolas@...sle.eu>,
 "Nick Desaulniers" <ndesaulniers@...gle.com>,
 "Bill Wendling" <morbo@...gle.com>, "Justin Stitt" <justinstitt@...gle.com>,
 linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 05/12] firmware: dmi-id: add a release callback function

On Fri, Mar 29, 2024, at 13:49, Jean Delvare wrote:
> On Tue, 26 Mar 2024 15:51:30 +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@...db.de>
>> 
>> dmi_class uses kfree() as the .release function, but that now causes
>> a warning with clang-16 as it violates control flow integrity (KCFI)
>> rules:
>> 
>> drivers/firmware/dmi-id.c:174:17: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
>>   174 |         .dev_release = (void(*)(struct device *)) kfree,
>> 
>> Add an explicit function to call kfree() instead.
>> 
>> Fixes: 4f5c791a850e ("DMI-based module autoloading")
>
> Not sure if this fixes tag is really warranted. As I understand it,
> your change only removes a warning but there was no actual bug, right?

As Nathan already commented, it's a real bug. I also add 'Fixes'
tags for false-positives just to document what introduced a
warning. The Fixes tag doesn't automatically mean something gets
backported, though the stable maintainers often end up backporting
warning fixes as well, and it helps identify which kernels
need it.

> Looks good to me, thanks for doing that.
>
> Signed-off-by: Jean Delvare <jdelvare@...e.de>
>
> Will you get this upstream, or do you expect me to take it in my
> dmi/for-next branch?

It would help me if you can apply it to your tree directly.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ