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: <5bdad86b-3ab5-a1c2-7dcd-8c45c7aa4555@linux.vnet.ibm.com>
Date:   Mon, 16 May 2022 12:42:50 +0200
From:   Jonas Paulsson <paulsson@...ux.vnet.ibm.com>
To:     Heiko Carstens <hca@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Ulrich Weigand <ulrich.weigand@...ibm.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Alexander Egorenkov <egorenar@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        Andreas Krebbel <krebbel@...ux.ibm.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Subject: Re: [PATCH 4/8] s390/entry: workaround llvm's IAS limitations

I will try to get a patch for clang ready soon... /Jonas

On 2022-05-16 12:19 em, Heiko Carstens wrote:
> On Mon, May 16, 2022 at 11:07:43AM +0200, Alexander Gordeev wrote:
>>> diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
>>> index a6b45eaa3450..f2f30bfba1e9 100644
>>> --- a/arch/s390/kernel/entry.S
>>> +++ b/arch/s390/kernel/entry.S
>>> @@ -172,9 +172,19 @@ _LPP_OFFSET	= __LC_LPP
>>>   	lgr	%r14,\reg
>>>   	larl	%r13,\start
>>>   	slgr	%r14,%r13
>>> -	lghi	%r13,\end - \start
>>> -	clgr	%r14,%r13
>>> +#ifdef CONFIG_AS_IS_LLVM
>>> +	clgfrl	%r14,.Lrange_size\@
>>> +#else
>>> +	clgfi	%r14,\end - \start
>>> +#endif
>>>   	jhe	\outside_label
>>> +#ifdef CONFIG_CC_IS_CLANG
>>> +	.section .rodata, "a"
>>> +	.align 4
>>> +.Lrange_size\@:
>>> +	.long	\end - \start
>> Isn't the machine check handler refers to this memory before checking
>> unrecoverable storage errors (with CHKSTG macro) as result of this change?
> Yes, indeed. However implementing this without another register will
> be quite of a challenge. So what I would prefer in any case: just
> assume that this minimal set of memory accesses work. Actually I'd
> seriously like to go a bit further, and even move the checks for
> storage errors back to C for two reasons:
>
> - this would make the machine check handler entry code easier again
> - it would also allow to enter the machine check handler with DAT on
>
> After all we rely anyway on the fact that at least the local lowcore +
> the page(s) which contain text are still accessible. Assuming that a
> couple of page tables also work won't make this much worse, but the
> code much easier.
>
> So I'd suggest: leave this code as is, and at some later point move
> "rework" the early machine check handler code.
>
> What do you think?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ