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: <89476138-a279-761a-21be-4a7cd1d80167@au1.ibm.com>
Date:   Tue, 17 Apr 2018 14:21:10 +1000
From:   Andrew Donnellan <andrew.donnellan@....ibm.com>
To:     "Alastair D'Silva" <alastair@....ibm.com>,
        linuxppc-dev@...ts.ozlabs.org
Cc:     linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        mikey@...ling.org, vaibhav@...ux.vnet.ibm.com,
        aneesh.kumar@...ux.vnet.ibm.com, malat@...ian.org,
        felix@...ux.vnet.ibm.com, pombredanne@...b.com,
        sukadev@...ux.vnet.ibm.com, npiggin@...il.com,
        gregkh@...uxfoundation.org, arnd@...db.de,
        fbarrat@...ux.vnet.ibm.com, corbet@....net,
        "Alastair D'Silva" <alastair@...ilva.org>
Subject: Re: [PATCH 2/7] powerpc: Use TIDR CPU feature to control TIDR
 allocation

On 17/04/18 12:09, Alastair D'Silva wrote:
> From: Alastair D'Silva <alastair@...ilva.org>
> 
> Switch the use of TIDR on it's CPU feature, rather than assuming it
> is available based on architecture.
> 
> Signed-off-by: Alastair D'Silva <alastair@...ilva.org>

There's a use of TIDR in restore_sprs() that's behind the ARCH_300 flag 
as well, ideally it should never trigger in the !P9_TIDR case, but you 
might want to update that too for clarity?

> ---
>   arch/powerpc/kernel/process.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 1237f13fed51..a3e0a3e06d5a 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -1570,7 +1570,7 @@ void clear_thread_tidr(struct task_struct *t)
>   	if (!t->thread.tidr)
>   		return;
>   
> -	if (!cpu_has_feature(CPU_FTR_ARCH_300)) {
> +	if (!cpu_has_feature(CPU_FTR_P9_TIDR)) {
>   		WARN_ON_ONCE(1);
>   		return;
>   	}
> @@ -1593,7 +1593,7 @@ int set_thread_tidr(struct task_struct *t)
>   {
>   	int rc;
>   
> -	if (!cpu_has_feature(CPU_FTR_ARCH_300))
> +	if (!cpu_has_feature(CPU_FTR_P9_TIDR))
>   		return -EINVAL;
>   
>   	if (t != current)
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@....ibm.com  IBM Australia Limited

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ