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: <fdb89dea-8da7-12af-fc73-aa3c13929e83@infradead.org>
Date:   Tue, 20 Aug 2019 20:44:11 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Nathan Chancellor <natechancellor@...il.com>,
        Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>
Cc:     amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amd/display: Fix 32-bit divide error in
 wait_for_alt_mode

On 8/20/19 4:57 PM, Nathan Chancellor wrote:
> When building arm32 allyesconfig:
> 
> ld.lld: error: undefined symbol: __aeabi_uldivmod
>>>> referenced by dc_link.c
>>>> gpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archive drivers/built-in.a
>>>> referenced by dc_link.c
>>>> gpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archive drivers/built-in.a
> 
> time_taken_in_ns is of type unsigned long long so we need to use div_u64
> to avoid this error.
> 
> Fixes: b5b1f4554904 ("drm/amd/display: Enable type C hotplug")
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

Thanks.

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> index f2d78d7b089e..8634923b4444 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> @@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link)
>  			time_taken_in_ns = dm_get_elapse_time_in_ns(
>  				link->ctx, finish_timestamp, enter_timestamp);
>  			DC_LOG_WARNING("Alt mode entered finished after %llu ms\n",
> -				       time_taken_in_ns / 1000000);
> +				       div_u64(time_taken_in_ns, 1000000));
>  			return true;
>  		}
>  
> @@ -730,7 +730,7 @@ bool wait_for_alt_mode(struct dc_link *link)
>  	time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp,
>  						    enter_timestamp);
>  	DC_LOG_WARNING("Alt mode has timed out after %llu ms\n",
> -			time_taken_in_ns / 1000000);
> +			div_u64(time_taken_in_ns, 1000000));
>  	return false;
>  }
>  
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ