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]
Date:   Thu, 23 Dec 2021 13:42:32 +0000
From:   Simon Ser <contact@...rsion.fr>
To:     Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc:     José Expósito <jose.exposito89@...il.com>,
        airlied@...ux.ie, alexandre.torgue@...s.st.com,
        benjamin.gaignard@...aro.org,
        linux-stm32@...md-mailman.stormreply.com, marex@...x.de,
        linux-imx@....com, intel-gfx@...ts.freedesktop.org,
        tzimmermann@...e.de, s.hauer@...gutronix.de,
        rodrigo.vivi@...el.com, kernel@...gutronix.de,
        linux-arm-kernel@...ts.infradead.org,
        dri-devel@...ts.freedesktop.org, yannick.fertre@...s.st.com,
        linux-kernel@...r.kernel.org, philippe.cornu@...s.st.com,
        mcoquelin.stm32@...il.com, dmitry.baryshkov@...aro.org,
        shawnguo@...nel.org
Subject: Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional

On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@...ux.intel.com> wrote:

> > -	/* If we can't determine support, just bail */
> > -	if (!plane->funcs->format_mod_supported)
> > -		goto done;
> > -
> >  	mod = modifiers_ptr(blob_data);
> >  	for (i = 0; i < plane->modifier_count; i++) {
> >  		for (j = 0; j < plane->format_count; j++) {
> > -			if (plane->funcs->format_mod_supported(plane,
> > +			if (!plane->funcs->format_mod_supported ||
> > +			    plane->funcs->format_mod_supported(plane,
> >  							       plane->format_types[j],
> >  							       plane->modifiers[i])) {
>
> So instead of skipping the whole loop you just skip doing anything
> inside the loop? Can't see how that achieves anything at all.

No, the check is skipped when the function isn't populated by the driver.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ