[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202504301205.B3AD2E7@keescook>
Date: Wed, 30 Apr 2025 12:06:43 -0700
From: Kees Cook <kees@...nel.org>
To: Louis Chauvet <louis.chauvet@...tlin.com>
Cc: Haneen Mohammed <hamohammed.sa@...il.com>,
	Simona Vetter <simona@...ll.ch>,
	Melissa Wen <melissa.srw@...il.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] drm/vkms: Adjust vkms_state->active_planes allocation
 type
On Mon, Apr 28, 2025 at 10:18:34AM +0200, Louis Chauvet wrote:
> 
> 
> Le 26/04/2025 à 08:14, Kees Cook a écrit :
> > 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 vkms_plane_state **", but the returned type
> > will be "struct drm_plane **". These are the same size (pointer size), but
> > the types don't match. Adjust the allocation type to match the assignment.
> 
> I think this is an issue, can you add the proper Fixup tag in this commit?
I think trailers updating tools like b4 will pick this up:
Fixes: 8b1865873651 ("drm/vkms: totally reworked crc data tracking")
Would you rather I send a v2 with the Fixes added?
> 
> With this:
> 
> Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>
Thanks!
-Kees
-- 
Kees Cook
Powered by blists - more mailing lists
 
