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] [day] [month] [year] [list]
Message-ID: <6809f10c-010d-4953-8133-a0293a317b5c@amd.com>
Date: Wed, 16 Apr 2025 16:31:53 -0600
From: Alex Hung <alex.hung@....com>
To: Wentao Liang <vulab@...as.ac.cn>, harry.wentland@....com,
 sunpeng.li@....com, Rodrigo.Siqueira@....com, alexander.deucher@....com,
 christian.koenig@....com, Xinhui.Pan@....com, airlied@...il.com,
 simona@...ll.ch
Cc: chiahsuan.chung@....com, hamza.mahfooz@....com, sunil.khatri@....com,
 aurabindo.pillai@....com, hersenxs.wu@....com, mario.limonciello@....com,
 mwen@...lia.com, amd-gfx@...ts.freedesktop.org,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] drm/amd/display: Add error check for avi and vendor
 infoframe setup function

Reviewed-by: Alex Hung <alex.hung@....com>

On 4/13/25 21:14, Wentao Liang wrote:
> The function fill_stream_properties_from_drm_display_mode() calls the
> function drm_hdmi_avi_infoframe_from_display_mode() and the
> function drm_hdmi_vendor_infoframe_from_display_mode(), but does
> not check its return value. Log the error messages to prevent silent
> failure if either function fails.
> 
> Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
> ---
> v3: Fix error-logging function error
> v2: Fix code diff error
> 
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 5f216d626cbb..cdf1a07aa8af 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6104,6 +6104,7 @@ static void fill_stream_properties_from_drm_display_mode(
>   	struct amdgpu_dm_connector *aconnector = NULL;
>   	struct hdmi_vendor_infoframe hv_frame;
>   	struct hdmi_avi_infoframe avi_frame;
> +	ssize_t err;
>   
>   	if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
>   		aconnector = to_amdgpu_dm_connector(connector);
> @@ -6150,9 +6151,17 @@ static void fill_stream_properties_from_drm_display_mode(
>   	}
>   
>   	if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
> -		drm_hdmi_avi_infoframe_from_display_mode(&avi_frame, (struct drm_connector *)connector, mode_in);
> +		err = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame,
> +							       (struct drm_connector *)connector,
> +							       mode_in);
> +		if (err < 0)
> +			drm_err(connector->dev, "Failed to setup avi infoframe: %zd\n", err);
>   		timing_out->vic = avi_frame.video_code;
> -		drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame, (struct drm_connector *)connector, mode_in);
> +		err = drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame,
> +								  (struct drm_connector *)connector,
> +								  mode_in);
> +		if (err < 0)
> +			drm_err(connector->dev, "Failed to setup vendor infoframe: %zd\n", err);
>   		timing_out->hdmi_vic = hv_frame.vic;
>   	}
>   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ