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: <658a63b5-2d18-2837-9639-75a14c959f73@de.ibm.com>
Date:   Fri, 19 Nov 2021 11:57:05 +0100
From:   Christian Borntraeger <borntraeger@...ibm.com>
To:     Heiko Carstens <hca@...ux.ibm.com>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Ilie Halip <ilie.halip@...il.com>,
        linux-kernel@...r.kernel.org, Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Mete Durlu <meted@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        linux-s390@...r.kernel.org, llvm@...ts.linux.dev,
        Ulrich Weigand <Ulrich.Weigand@...ibm.com>
Subject: Re: [PATCH] s390/test_unwind: use raw opcode instead of invalid
 instruction



Am 19.11.21 um 11:54 schrieb Heiko Carstens:
> On Fri, Nov 19, 2021 at 10:39:15AM +0100, Christian Borntraeger wrote:
>>> So if I understand
>>> https://sourceware.org/binutils/docs/as/s390-Directives.html#s390-Directives
>>> https://sourceware.org/binutils/docs/as/s390-Formats.html
>>> that `e,` prefix is for 16B opcodes?
>>
>> e is an instruction format as specified by the architecture.
>> See http://publibfp.dhe.ibm.com/epubs/pdf/a227832c.pdf
>> without any parameters.
>> Normally RR would be the right thing for MVCL, but since
>> we try to build an invalid opcode without the assembler
>> noticing (ab)using e seem like a safer approach.
>>>
>>> LGTM, thanks again.
>>> Suggested-by: Ulrich Weigand <Ulrich.Weigand@...ibm.com>
>>> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>>
>> added those and added my RB. applied to the s390 tree. Thanks
> ..
>>>> diff --git a/arch/s390/lib/test_unwind.c b/arch/s390/lib/test_unwind.c
>>>> index cfc5f5557c06..d342bc884b94 100644
>>>> --- a/arch/s390/lib/test_unwind.c
>>>> +++ b/arch/s390/lib/test_unwind.c
>>>> @@ -176,7 +176,7 @@ static noinline int unwindme_func4(struct unwindme *u)
>>>>                    * trigger specification exception
>>>>                    */
>>>>                   asm volatile(
>>>> -                       "       mvcl    %%r1,%%r1\n"
>>>> +                       "       .insn e,0x0e11\n"       /* mvcl %%r1,%%r1" */
> 
> Sorry, I disagree with this. As you said above rr would be the correct
> format for this instruction. If we go for the e format then we should
> also use an instruction with e format.
> Which in this case would simply be an illegal opcode, which would be
> sufficient for what this code is good for: ".insn e,0x0000".

Why not simply use .short then?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ