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: <38359442-e219-18ad-926b-42a6e5ab4e7d@c-s.fr>
Date:   Tue, 12 Mar 2019 21:06:56 +0000
From:   Christophe Leroy <christophe.leroy@....fr>
To:     Mathieu Malaterre <malat@...ian.org>,
        Michael Ellerman <mpe@...erman.id.au>
Cc:     linux-kernel@...r.kernel.org, Nicholas Piggin <npiggin@...il.com>,
        Paul Mackerras <paulus@...ba.org>,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/64s: Mark 'dummy_copy_buffer' as used

On 03/12/2019 08:29 PM, Mathieu Malaterre wrote:
> In commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch
> when possible") a buffer 'dummy_copy_buffer' was introduced. gcc does
> not see this buffer being used in the inline assembly within function
> '__switch_to', explicitly marked this variable as being used.
> 
> Prefer using '__aligned' to get passed line over 80 characters warning
> in checkpatch.

Powerpc accepts 90 characters, use arch/powerpc/tools/checkpatch.sh

> 
> This remove the following warning:
> 
>    arch/powerpc/kernel/process.c:1156:17: error: 'dummy_copy_buffer' defined but not used [-Werror=unused-const-variable=]

commit 2bf1071a8d50 ("powerpc/64s: Remove POWER9 DD1 support") has 
removed the fonction using 'dummy_copy_buffer' so you should remove it 
completely.

Christophe


> 
> Cc: Nicholas Piggin <npiggin@...il.com>
> Signed-off-by: Mathieu Malaterre <malat@...ian.org>
> ---
>   arch/powerpc/kernel/process.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 77e44275d025..5acf63d45802 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -1153,7 +1153,7 @@ static inline void restore_sprs(struct thread_struct *old_thread,
>   
>   #ifdef CONFIG_PPC_BOOK3S_64
>   #define CP_SIZE 128
> -static const u8 dummy_copy_buffer[CP_SIZE] __attribute__((aligned(CP_SIZE)));
> +static const u8 dummy_copy_buffer[CP_SIZE] __aligned(CP_SIZE) __used;
>   #endif
>   
>   struct task_struct *__switch_to(struct task_struct *prev,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ