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: <BYAPR21MB1270B3CFBE674EB0A7537180BFEA9@BYAPR21MB1270.namprd21.prod.outlook.com>
Date:   Mon, 11 Apr 2022 06:40:38 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Saurabh Sengar <ssengar@...ux.microsoft.com>,
        Saurabh Singh Sengar <ssengar@...rosoft.com>,
        "drawat.floss@...il.com" <drawat.floss@...il.com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
Subject: RE: [PATCH v3] drm/hyperv: Added error message for fb size greater
 than allocated

> Subject: [PATCH v3] drm/hyperv: Added error message for fb size greater than
> allocated
> 
> Added error message when the size of requested framebuffer is more than
> the allocated size by vmbus mmio region for framebuffer

"Added" --> "Add"? My impression is that we don't use past tense in the 
Subject and the commit message. See
"git log drivers/gpu/drm/hyperv/hyperv_drm_modeset.c".
 
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> @@ -123,8 +123,11 @@ static int hyperv_pipe_check(struct
> drm_simple_display_pipe *pipe,
>  	if (fb->format->format != DRM_FORMAT_XRGB8888)
>  		return -EINVAL;
> 
> -	if (fb->pitches[0] * fb->height > hv->fb_size)
> +	if (fb->pitches[0] * fb->height > hv->fb_size) {
> +		drm_err(&hv->dev, "hv->hdev, fb size requested by process %s
> for %d X %d (pitch %d) is greater than allocated size %ld\n",
Should we use drm_err_ratelimited() instead of drm_err()?

The line exceeds 80 chars.

> +		current->comm, fb->width, fb->height, fb->pitches[0], hv->fb_size);
>  		return -EINVAL;
> +	}

Maybe we can use the below:
	drm_err_ratelimited(&hv->dev, "%s: requested %dX%d (pitch %d) "
                     "exceeds fb_size %ld\n",
                     current->comm, fb->width, fb->height,
                     fb->pitches[0], hv->fb_size);

Note: the first chars of last 3 lines should align with the "&" in the
same column. Please run "scripts/checkpatch.pl" against the patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ