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: <3A77E6D2-2BFD-4728-B33F-4EEFD0BB07BD@flygoat.com>
Date:   Fri, 14 Apr 2023 09:13:21 +0100
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     Qing Zhang <zhangqing@...ngson.cn>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        linux-kernel@...r.kernel.org, Huacai Chen <chenhuacai@...nel.org>
Subject: Re: [PATCH] Mips: Fix _CONST64_(x) as unsigned



> 2023年4月11日 07:31,Qing Zhang <zhangqing@...ngson.cn> 写道:
> 
> Addresses should all be of unsigned type to avoid unnecessary conversions.

It’s defined as signed for a reason. To keep consistent with 32-bit address, which
Is sign-extended on 64bit systems.

Thanks
Jiaxun

> 
> Signed-off-by: Qing Zhang <zhangqing@...ngson.cn>
> ---
> arch/mips/include/asm/addrspace.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h
> index 59a48c60a065..75d36115a25e 100644
> --- a/arch/mips/include/asm/addrspace.h
> +++ b/arch/mips/include/asm/addrspace.h
> @@ -25,9 +25,9 @@
> #define _ATYPE32_ int
> #define _ATYPE64_ __s64
> #ifdef CONFIG_64BIT
> -#define _CONST64_(x) x ## L
> +#define _CONST64_(x) x ## UL
> #else
> -#define _CONST64_(x) x ## LL
> +#define _CONST64_(x) x ## ULL
> #endif
> #endif
> 
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ