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: <aFVe+8Wfo45S2OAx@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>
Date: Fri, 20 Jun 2025 15:15:39 +0200
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Heiko Carstens <hca@...ux.ibm.com>
Cc: Ingo Molnar <mingo@...hat.com>, Naresh Kamboju <naresh.kamboju@...aro.org>,
        Anders Roxell <anders.roxell@...aro.org>,
        Sven Schnelle <svens@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Subject: Re: [PATCH 2/2] bugs/s390: Use inline assembly without input operands

On Tue, Jun 17, 2025 at 03:50:42PM +0200, Heiko Carstens wrote:
> The recent change which adds DEBUG_BUGVERBOSE_DETAILED support for s390
> changed the __EMIT_BUG() inline assembly so it has a string as immediate
> input operand. Some older gcc variants cannot handle strings as immediate
> input operands for inline assemblies. Doing so may result in compile
> errors:
> 
> mm/mempool.c: In function 'remove_element':
> include/linux/compiler_types.h:497:20: warning: asm operand 0 probably
> doesn't match constraints
>  #define asm_inline asm __inline
>                     ^~~
> arch/s390/include/asm/bug.h:12:2: note: in expansion of macro 'asm_inline'
>   asm_inline volatile(     \
>   ^~~~~~~~~~
> arch/s390/include/asm/bug.h:43:2: note: in expansion of macro '__EMIT_BUG'
>   __EMIT_BUG("", 0);    \
>   ^~~~~~~~~~
> include/asm-generic/bug.h:77:57: note: in expansion of macro 'BUG'
>  #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
>                                                          ^~~
> mm/mempool.c:149:2: note: in expansion of macro 'BUG_ON'
>   BUG_ON(pool->curr_nr < 0);
>   ^~~~~~
> include/linux/compiler_types.h:497:20: error: impossible constraint in 'asm'
>  #define asm_inline asm __inline
>                     ^~~
> 
> Rewrite the s390 generic bug support very similar to arm64 and loongarch,
> and get rid of all input operands to fix this.
> 
> Fixes: 45c79ca947c9 ("bugs/s390: Use 'cond_str' in __EMIT_BUG()")
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Closes: https://lore.kernel.org/r/CA+G9fYuu5r34=bndUYWNxe_yLgBaPGXmK9WP3WTtoXMs_2LX-Q@mail.gmail.com
> Cc: Anders Roxell <anders.roxell@...aro.org>
> Cc: Naresh Kamboju <naresh.kamboju@...aro.org>
> Signed-off-by: Heiko Carstens <hca@...ux.ibm.com>
> ---
>  arch/s390/include/asm/bug.h | 81 +++++++++++++++++++------------------
>  1 file changed, 41 insertions(+), 40 deletions(-)
...

Acked-by: Alexander Gordeev <agordeev@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ