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: <20250326-camouflaged-satisfied-quokka-8d5afc@houat>
Date: Wed, 26 Mar 2025 16:26:47 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Luca Ceresoli <luca.ceresoli@...tlin.com>
Cc: Anusha Srivatsa <asrivats@...hat.com>, 
	Neil Armstrong <neil.armstrong@...aro.org>, Jessica Zhang <quic_jesszhan@...cinc.com>, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Thomas Zimmermann <tzimmermann@...e.de>, 
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] drm/panel: Add new helpers for refcounted panel
 allocatons

On Wed, Mar 26, 2025 at 10:22:59AM +0100, Luca Ceresoli wrote:
> Hello Anusha,
> 
> On Tue, 25 Mar 2025 13:24:08 -0400
> Anusha Srivatsa <asrivats@...hat.com> wrote:
> 
> > Introduce reference counted allocations for panels to avoid
> > use-after-free. The patch adds the macro devm_drm_bridge_alloc()
> > to allocate a new refcounted panel. Followed the documentation for
> > drmm_encoder_alloc() and devm_drm_dev_alloc and other similar
> > implementations for this purpose.
> > 
> > Signed-off-by: Anusha Srivatsa <asrivats@...hat.com>
> 
> [...]
> 
> > +void *__devm_drm_panel_alloc(struct device *dev, size_t size, size_t offset,
> > +			     const struct drm_panel_funcs *funcs,
> > +			     int connector_type);
> > +
> > +/**
> > + * devm_drm_panel_alloc - Allocate and initialize an refcounted panel
>                                                      ^^
> "a refcounted panel"
> 
> > + * @dev: struct device of the panel device
> > + * @type: the type of the struct which contains struct &drm_panel
> > + * @member: the name of the &drm_panel within @type
> > + * @funcs: callbacks for this panel
> > + * @connector_type: connector type of the driver
> 
> I'd say it's the connector type in the hardware, rather than of the
> driver (the driver follows what is in the hardware. Maybe you can just
> copy the description present in the drm_panel_init kdoc:
> 
>  * @connector_type: the connector type (DRM_MODE_CONNECTOR_*) corresponding to
>  *      the panel interface (must NOT be DRM_MODE_CONNECTOR_Unknown)
> 
> Other than that it looks good!

Heh, Unknown is fine, but you're right for the rest. I'd use the
drm_panel_init doc for that field actually.

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ