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: <57AC2AA5.1030808@huawei.com>
Date:	Thu, 11 Aug 2016 15:35:01 +0800
From:	"Zhangjian (Bamvor)" <bamvor.zhangjian@...wei.com>
To:	Yury Norov <ynorov@...iumnetworks.com>, <arnd@...db.de>,
	<catalin.marinas@....com>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
	<linux-arch@...r.kernel.org>, <libc-alpha@...rceware.org>
CC:	<schwidefsky@...ibm.com>, <heiko.carstens@...ibm.com>,
	<pinskia@...il.com>, <broonie@...nel.org>,
	<joseph@...esourcery.com>,
	<christoph.muellner@...obroma-systems.com>,
	<szabolcs.nagy@....com>, <klimov.linux@...il.com>,
	<Nathan_Lynch@...tor.com>, <agraf@...e.de>,
	<Prasun.Kapoor@...iumnetworks.com>, <kilobyte@...band.pl>,
	<geert@...ux-m68k.org>, <philipp.tomsich@...obroma-systems.com>,
	<manuel.montezelo@...il.com>, <linyongting@...wei.com>,
	<maxim.kuvyrkov@...aro.org>, <davem@...emloft.net>,
	Andrew Pinski <apinski@...ium.com>,
	Andrew Pinski <Andrew.Pinski@...iumnetworks.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
	Hanjun Guo <guohanjun@...wei.com>,
	"Zhangjian (Bamvor)" <bamvor.zhangjian@...wei.com>
Subject: Re: [PATCH 05/19] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

Hi, Yury

On 2016/6/18 7:54, Yury Norov wrote:
> From: Andrew Pinski <apinski@...ium.com>
>
> In this patchset  ILP32 ABI support is added. Additionally to AARCH32,
> which is binary-compatible with ARM, ILP32 is (mostly) ABI-compatible.
>
>  From now, AARCH32_EL0 (former COMPAT) config option means the support of
> AARCH32 userspace, ARM64_ILP32 - support of ILP32 ABI (see next patches),
> and COMPAT indicates that one of them, or both, is enabled.
>
> Where needed, CONFIG_COMPAT is changed over to use CONFIG_AARCH32_EL0 instead
>
> Reviewed-by: David Daney <ddaney@...iumnetworks.com>
> Signed-off-by: Andrew Pinski <Andrew.Pinski@...iumnetworks.com>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@...obroma-systems.com>
> Signed-off-by: Christoph Muellner <christoph.muellner@...obroma-systems.com>
> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>
> Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
...
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index c173d32..af200a8 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -134,15 +134,17 @@ static int c_show(struct seq_file *m, void *v)
>   		 */
>   		seq_puts(m, "Features\t:");
>   		if (compat) {
> -#ifdef CONFIG_COMPAT
> -			for (j = 0; compat_hwcap_str[j]; j++)
> -				if (compat_elf_hwcap & (1 << j))
> -					seq_printf(m, " %s", compat_hwcap_str[j]);
> -
> -			for (j = 0; compat_hwcap2_str[j]; j++)
> -				if (compat_elf_hwcap2 & (1 << j))
> -					seq_printf(m, " %s", compat_hwcap2_str[j]);
> -#endif /* CONFIG_COMPAT */
> +#ifdef CONFIG_AARCH32_EL0
I saw that compat_hwcap_str and compat_hwcap2_str is defined when
"CONFIG_COMPAT" is true. Why we only change it to CONFIG_AARCH32_EL0
in c show()?
> +			if (personality(current->personality) == PER_LINUX32) {
And "compat" is "personality(current->personality) == PER_LINUX32;",
it seems that there is no need to add this twice.

Regards

Bamvor
> +				for (j = 0; compat_hwcap_str[j]; j++)
> +					if (compat_elf_hwcap & (1 << j))
> +						seq_printf(m, " %s", compat_hwcap_str[j]);
> +
> +				for (j = 0; compat_hwcap2_str[j]; j++)
> +					if (compat_elf_hwcap2 & (1 << j))
> +						seq_printf(m, " %s", compat_hwcap2_str[j]);
> +			}
> +#endif /* CONFIG_AARCH32_EL0 */
>   		} else {
>   			for (j = 0; hwcap_str[j]; j++)
>   				if (elf_hwcap & (1 << j))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ