[PATCH xf86-video-amdgpu 3/3] Add RandR leases with modesetting driver support [v7]

Michel Dänzer michel at daenzer.net
Mon Jul 9 07:37:45 UTC 2018


On 2018-07-07 02:36 AM, Keith Packard wrote:
> This adds support for RandR CRTC/Output leases through the modesetting
> driver, creating a lease using new kernel infrastructure and returning
> that to a client through an fd which will have access to only those
> resources.
> 
> [...]
> 
> +	nobjects = ncrtc + noutput;
> +
> +	if (nobjects == 0)
> +		return BadValue;

As I mentioned on IRC, this addition can already overflow (to a non-0
value). That's one reason I decided against using xallocarray in my
patch (but instead explicitly check against overflow of the addition and
multiplication).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list