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: <YZdxawCdP7V2dKq1@phenom.ffwll.local>
Date:   Fri, 19 Nov 2021 10:42:03 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     George Kennedy <george.kennedy@...cle.com>
Cc:     Brian Starkey <brian.starkey@....com>,
        Ville Syrjälä 
        <ville.syrjala@...ux.intel.com>, gregkh@...uxfoundation.org,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        tzimmermann@...e.de, airlied@...ux.ie, daniel@...ll.ch,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        ben.davis@....com, Liviu.Dudau@....com,
        Dan Carpenter <dan.carpenter@...cle.com>, nd@....com
Subject: Re: [PATCH] drm: check drm_format_info hsub and vsub to avoid divide
 by zero

On Thu, Nov 18, 2021 at 03:00:15PM -0500, George Kennedy wrote:
> 
> 
> On 10/29/2021 10:14 AM, Brian Starkey wrote:
> > Hi,
> > 
> > On Fri, Oct 29, 2021 at 09:15:28AM -0400, George Kennedy wrote:
> > > Asking if you have any input on how to deal with hsub and vsub = zero?
> > That's just a straight mistake on those formats - they should
> > be 1. My bad for not spotting it in review.
> > 
> > On the one hand, having formats in this table is a nice
> > machine-readable way to describe them. On the other, as drm_fourcc is
> > being used as the canonical repository for formats, including ones
> > not used in DRM, we can end up with situations like this.
> > (R10/R12 being another example of formats not used in DRM:
> > 20211027233140.12268-1-laurent.pinchart@...asonboard.com)
> 
> Wondering if there is an alternate fix to the one proposed?

I think if the cost of defining formats correctly for everyone is that drm
carries a bunch of nice machine-readable entries in its tables that it
never uses, then we should do that. The very few bytes saved aren't worth
any headaches (because on any soc system you anyway have tons more formats
than what your driver is using).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ