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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lxvyfigepzg4jhqub6lg6lmffen4puf477zjxmi766f3hu6trn@nnvg6htufsjn>
Date: Tue, 27 Feb 2024 13:08:14 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, 
	Daniel Vetter <daniel@...ll.ch>, Jonathan Corbet <corbet@....net>, 
	Sandy Huang <hjc@...k-chips.com>, Heiko Stübner <heiko@...ech.de>, 
	Chen-Yu Tsai <wens@...e.org>, Jernej Skrabec <jernej.skrabec@...il.com>, 
	Samuel Holland <samuel@...lland.org>, Hans Verkuil <hverkuil@...all.nl>, 
	Sebastian Wick <sebastian.wick@...hat.com>, Ville Syrjälä <ville.syrjala@...ux.intel.com>, 
	dri-devel@...ts.freedesktop.org, linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org, 
	linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH v7 25/36] drm/connector: hdmi: Add Infoframes generation

On Sun, Feb 25, 2024 at 05:02:51PM +0200, Dmitry Baryshkov wrote:
> > @@ -476,6 +478,7 @@ EXPORT_SYMBOL(drmm_connector_init);
> >   */
> >  int drmm_connector_hdmi_init(struct drm_device *dev,
> >                              struct drm_connector *connector,
> > +                            const char *vendor, const char *product,
> >                              const struct drm_connector_funcs *funcs,
> >                              const struct drm_connector_hdmi_funcs *hdmi_funcs,
> >                              int connector_type,
> > @@ -485,6 +488,13 @@ int drmm_connector_hdmi_init(struct drm_device *dev,
> >  {
> >         int ret;
> >
> > +       if (!vendor || !product)
> > +               return -EINVAL;
> > +
> > +       if ((strlen(vendor) > DRM_CONNECTOR_HDMI_VENDOR_LEN) ||
> > +           (strlen(product) > DRM_CONNECTOR_HDMI_PRODUCT_LEN))
> > +               return -EINVAL;
> > +
> >         if (!(connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> >               connector_type == DRM_MODE_CONNECTOR_HDMIB))
> >                 return -EINVAL;
> > @@ -500,6 +510,12 @@ int drmm_connector_hdmi_init(struct drm_device *dev,
> >                 return ret;
> >
> >         connector->hdmi.supported_formats = supported_formats;
> > +       strtomem_pad(connector->hdmi.vendor, vendor, 0);
> > +       strtomem_pad(connector->hdmi.product, product, 0);
> > +
> > +       ret = drmm_mutex_init(dev, &connector->hdmi.infoframes.lock);
> 
> I'd suggest moving this call to the generic __drm_connector_init().
> This way no matter how the rest of the drm code (mis)uses the
> connector, the lock is always present and valid.

Yeah, that makes sense, I'll change it.

Thanks!
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