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: <20181220105104.GI21184@phenom.ffwll.local>
Date:   Thu, 20 Dec 2018 11:51:04 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Gerd Hoffmann <kraxel@...hat.com>
Cc:     dri-devel@...ts.freedesktop.org, andr2000@...il.com,
        daniel.vetter@...ll.ch, David Airlie <airlied@...ux.ie>,
        "open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" 
        <virtualization@...ts.linux-foundation.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] drm/bochs: add edid present check

On Thu, Dec 20, 2018 at 11:11:21AM +0100, Gerd Hoffmann wrote:
> Check header before trying to read the complete edid blob, to avoid the
> log being spammed in case qemu has no edid support (old qemu or edid
> support turned off).
> 
> Fixes: 01f23459cf drm/bochs: add edid support.
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>

Reviewed-by: Daniel Vetter <daniel.vetter@...ll.ch>

> ---
>  drivers/gpu/drm/bochs/bochs_hw.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
> index c90a0d492f..d0b4e1cee8 100644
> --- a/drivers/gpu/drm/bochs/bochs_hw.c
> +++ b/drivers/gpu/drm/bochs/bochs_hw.c
> @@ -86,9 +86,16 @@ static int bochs_get_edid_block(void *data, u8 *buf,
>  
>  int bochs_hw_load_edid(struct bochs_device *bochs)
>  {
> +	u8 header[8];
> +
>  	if (!bochs->mmio)
>  		return -1;
>  
> +	/* check header to detect whenever edid support is enabled in qemu */
> +	bochs_get_edid_block(bochs, header, 0, ARRAY_SIZE(header));
> +	if (drm_edid_header_is_valid(header) != 8)
> +		return -1;
> +
>  	kfree(bochs->edid);
>  	bochs->edid = drm_do_get_edid(&bochs->connector,
>  				      bochs_get_edid_block, bochs);
> -- 
> 2.9.3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ