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: <CAKv+Gu-ZxvK7L90Xkf=U=GEeucGg9qJ+TDabuguFCxeUbn_GeQ@mail.gmail.com>
Date:   Wed, 24 Apr 2019 00:57:41 +0200
From:   Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Alex Matveev <alxmtvv@...il.com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Yury Norov <ynorov@...iumnetworks.com>,
        Matthias Kaehlcke <mka@...omium.org>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] arm64: sysreg: make mrs_s and msr_s macros work with
 Clang and LTO

On Wed, 24 Apr 2019 at 00:55, Kees Cook <keescook@...omium.org> wrote:
>
> On Mon, Apr 15, 2019 at 7:38 AM Kees Cook <keescook@...omium.org> wrote:
> > +#define __msr_s(r, v)                                          \
> > +       DEFINE_MSR_S                                            \
> > +"      msr_s " __stringify(r) ", %x0\n"                        \
> > +       UNDEFINE_MSR_S : : "rZ" (v)
>
> BTW ... is "%x0" a typo here? Shouldn't this just be "%0"?
>

No, iirc, that is required to force clang to choose a x# encoding
(which is the only one supported by msr/mrs instructions). Otherwise,
it will infer from the operand size which encoding to use, and attempt
to use w# for 32-bit system registers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ