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  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]
Date:   Thu, 16 May 2019 15:55:36 -0700
From:   Laura Abbott <labbott@...hat.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-arch <linux-arch@...r.kernel.org>
Cc:     linux-s390@...r.kernel.org,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Arnd Bergmann <arnd@...db.de>, linuxppc-dev@...ts.ozlabs.org,
        x86@...nel.org, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        linux-mtd@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        Christophe Leroy <christophe.leroy@....fr>,
        Mathieu Malaterre <malat@...ian.org>
Subject: Re: [RESEND PATCH v3 10/11] powerpc/mm/radix: mark as __tlbie_pid()
 and friends as__always_inline

On 4/22/19 8:49 PM, Masahiro Yamada wrote:
> This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common
> place. We need to eliminate potential issues beforehand.
> 
> If it is enabled for powerpc, the following errors are reported:
> 
> arch/powerpc/mm/tlb-radix.c: In function '__tlbie_lpid':
> arch/powerpc/mm/tlb-radix.c:148:2: warning: asm operand 3 probably doesn't match constraints
>    asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1)
>    ^~~
> arch/powerpc/mm/tlb-radix.c:148:2: error: impossible constraint in 'asm'
> arch/powerpc/mm/tlb-radix.c: In function '__tlbie_pid':
> arch/powerpc/mm/tlb-radix.c:118:2: warning: asm operand 3 probably doesn't match constraints
>    asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1)
>    ^~~
> arch/powerpc/mm/tlb-radix.c: In function '__tlbiel_pid':
> arch/powerpc/mm/tlb-radix.c:104:2: warning: asm operand 3 probably doesn't match constraints
>    asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1)
>    ^~~
> 

What gcc version was this tested with? We're still seeing errors on
Fedora rawhide with gcc 9.1.1 on a version (8c05f3b965da14e7790711026b32cc10a4c06213)
that should have this fix in it:

BUILDSTDERR: arch/powerpc/mm/book3s64/radix_tlb.c: In function '_tlbiel_pid':
BUILDSTDERR: arch/powerpc/mm/book3s64/radix_tlb.c:104:2: warning: asm operand 3 probably doesn't match constraints
BUILDSTDERR:   104 |  asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1)
BUILDSTDERR:       |  ^~~
BUILDSTDERR: arch/powerpc/mm/book3s64/radix_tlb.c:104:2: error: impossible constraint in 'asm'
BUILDSTDERR: make[3]: *** [scripts/Makefile.build:279: arch/powerpc/mm/book3s64/radix_tlb.o] Error 1
BUILDSTDERR: make[2]: *** [scripts/Makefile.build:489: arch/powerpc/mm/book3s64] Error 2
BUILDSTDERR: make[1]: *** [scripts/Makefile.build:489: arch/powerpc/mm] Error 2

Thanks,
Laura

(config attached, full build log at https://kojipkgs.fedoraproject.org//work/tasks/6327/34886327/build.log)

> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
> 
> Changes in v3: None
> Changes in v2:
>    - new patch
> 
>   arch/powerpc/mm/tlb-radix.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
> index a2b2848f0ae3..14ff414d1545 100644
> --- a/arch/powerpc/mm/tlb-radix.c
> +++ b/arch/powerpc/mm/tlb-radix.c
> @@ -90,8 +90,8 @@ void radix__tlbiel_all(unsigned int action)
>   	asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory");
>   }
>   
> -static inline void __tlbiel_pid(unsigned long pid, int set,
> -				unsigned long ric)
> +static __always_inline void __tlbiel_pid(unsigned long pid, int set,
> +					 unsigned long ric)
>   {
>   	unsigned long rb,rs,prs,r;
>   
> @@ -106,7 +106,7 @@ static inline void __tlbiel_pid(unsigned long pid, int set,
>   	trace_tlbie(0, 1, rb, rs, ric, prs, r);
>   }
>   
> -static inline void __tlbie_pid(unsigned long pid, unsigned long ric)
> +static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric)
>   {
>   	unsigned long rb,rs,prs,r;
>   
> @@ -136,7 +136,7 @@ static inline void __tlbiel_lpid(unsigned long lpid, int set,
>   	trace_tlbie(lpid, 1, rb, rs, ric, prs, r);
>   }
>   
> -static inline void __tlbie_lpid(unsigned long lpid, unsigned long ric)
> +static __always_inline void __tlbie_lpid(unsigned long lpid, unsigned long ric)
>   {
>   	unsigned long rb,rs,prs,r;
>   
> @@ -239,7 +239,7 @@ static inline void fixup_tlbie_lpid(unsigned long lpid)
>   /*
>    * We use 128 set in radix mode and 256 set in hpt mode.
>    */
> -static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
> +static __always_inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
>   {
>   	int set;
>   
> 


View attachment "kernel-5.2.0-ppc64le.config" of type "text/plain" (170596 bytes)

Powered by blists - more mailing lists