[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <501a4bd4-cb49-45f7-b47e-7f59f80a497f@RTEXMBS04.realtek.com.tw>
Date: Mon, 5 May 2025 09:40:00 +0800
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Kees Cook <kees@...nel.org>, Ping-Ke Shih <pkshih@...ltek.com>
CC: Kees Cook <kees@...nel.org>, <linux-wireless@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-hardening@...r.kernel.org>
Subject: Re: [PATCH] wifi: rtw89: fw: Remove "const" on allocation type
Kees Cook <kees@...nel.org> wrote:
> In preparation for making the kmalloc family of allocators type aware,
> we need to make sure that the returned type from the allocation matches
> the type of the variable being assigned. (Before, the allocator would
> always return "void *", which can be implicitly cast to any pointer type.)
>
> The assigned type is "struct rtw89_reg2_def *" but the returned type,
> while technically matching, will be const qualified. As there isn't a
> general way to discard "const" qualifiers, adjust the returned type to
> match the assigned type. No change in allocation size results.
>
> Signed-off-by: Kees Cook <kees@...nel.org>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
5b8dfb75b2c7 wifi: rtw89: fw: Remove "const" on allocation type
---
https://github.com/pkshih/rtw.git
Powered by blists - more mailing lists