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  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:   Fri, 7 Jul 2017 10:34:12 +0900
From:   Michel Dänzer <>
To:     Keith Packard <>,
        Dave Airlie <>,
        Daniel Vetter <>
Subject: Re: [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank
 time precision to ns

On 07/07/17 12:04 AM, Keith Packard wrote:
> Michel Dänzer <> writes:
>>> @@ -317,6 +317,9 @@ int via_driver_irq_postinstall(struct drm_device *dev)
>>>  	if (!dev_priv)
>>>  		return -EINVAL;
>>> +	if (dev->driver->get_vblank_counter)
>>> +		dev->max_vblank_count = 0xffffffff;
>> What's the purpose of this? All drivers providing get_vblank_counter
>> should already initialize max_vblank_count correctly.
> Yeah, I couldn't prove that this driver did that,

Which driver?

> and as Daniel says, we haven't ever audited the drivers to make sure
> they do.

I don't think that's what he meant, rather that with the change above,
all drivers have to be audited to make sure the added assignment doesn't
clobber an earlier assignment by the driver.

> We have a check to see that they don't set max_vblank_count if they
> don't provide a get function, but I can't find the matching check for
> drivers that do provide a function and aren't setting max_vblank_count.

I don't think that's necessary, see drm_update_vblank_count: 

	if (dev->max_vblank_count != 0) {
		/* trust the hw counter when it's around */
		diff = (cur_vblank - vblank->last) & dev->max_vblank_count;
	} else [...]

The hardware vblank counter is only used for updating the DRM vblank
counter if dev->max_vblank_count != 0.

Earthling Michel Dänzer               |     
Libre software enthusiast             |             Mesa and X developer

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

Powered by blists - more mailing lists