Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2844188iob; Mon, 16 May 2022 07:25:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+ChCRjv1RYjwDxuEZh/QiROsxtXiFqNg1rjZQndEETs1/gHNKTq8XhcPu0xAkYjBPLdmL X-Received: by 2002:a17:907:1c87:b0:6f0:29ea:cc01 with SMTP id nb7-20020a1709071c8700b006f029eacc01mr15513086ejc.671.1652711146869; Mon, 16 May 2022 07:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652711146; cv=none; d=google.com; s=arc-20160816; b=VONWgfn2ssCwhjTKQTnEeLkg/WMV4P8kZk8Z9SBGiKvbUYWCk1C/ydCiOPf1SIScgF Ru2RaN8GfN5SykOqMxTVNcowjwy6wiFyPj8IhaUWwx8zVW1h2sLc26GGhPYafURThbpt jZ74dt+UKfEAqUBbIGpaVLkScHXmzaKkOtzQGbhFZz09sf9jMzzpK9VLaolVroSmPulw fK4QUSQdQYO5xzwWSKT1GszxnKf0dKr2y+F++H+lyIriovuZuCke0tko/neaOv/Pnc9q PSD80K+HE1U8vajvYC5gKDvn6mZEGeCKHJDZRkjCWGw/g6VdqX5R3slusbvHffzdYAWM NbHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ncD54g7wkJHCvpdHQtNwcfU/ssypel9ss6Wqx7eG4kA=; b=lN+9vkWlvyAb0DCslNumRz3R0eA7EwPkU+XHdPZTCT5Vp7vj4gTfoJzLIS8SIBhNvn Bci3xEsykq+V9SSxcGuWWIb4t6UjtotkzNwnYLYBT/w5uFm+k6mot8fKHZWG3V8JY1lg Ndxodb5DmHPpYm4mIfJez6DZy54UqiRlU0lzP7irSNQoNE4wvolCzYoxNz7GqvDD6PPk y5MLFbGMDUG9HAj03cRnLd7RLrWfM2qgU1jpRCxZR7YBq44ebPBrpSjZoF50qvwc3Ew+ odpoW6c4TX7Hyj2E3Qxgi+Q+reJSSQtAVe6ORFrvJWcaAyKHAUBV2t9pf2UBku3619SC KcfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rDqgfOIb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020aa7c60b000000b0042ab243efc1si2630269edq.423.2022.05.16.07.25.20; Mon, 16 May 2022 07:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rDqgfOIb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235995AbiEPKon (ORCPT + 99 others); Mon, 16 May 2022 06:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242854AbiEPKnc (ORCPT ); Mon, 16 May 2022 06:43:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C99E248EC; Mon, 16 May 2022 03:43:02 -0700 (PDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24GAV3F7011810; Mon, 16 May 2022 10:42:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=ncD54g7wkJHCvpdHQtNwcfU/ssypel9ss6Wqx7eG4kA=; b=rDqgfOIb6ptjKyB9fwPyp+U8anFbeSilSlfmfcnzqDeOiHNCF8MXO+fjZQvxUEzfFQ/T J2S0Agj3xj1LlU8tn5XqjQLranNVCU9kDVGzDJIzUh8dOuNc5AhttlkAVYPz7TA8jni4 3K+NJqzEh1gfk8eVz2h+KxXeSs0T6LwAhGyAfHuE88eQouPI85JsaW5WSnmDp3kTn9zj MAdUC89LG26MrlZlbMNhjWqc5UIHK6/pxMmFPT1SIMQ0eumdnTPvDEElLfPQqgJlqNxc 3mKtyXRanqBSnY061mdnxMnHPTXohu8Xj9LgiSIBDt9FxR/myClqwbd1Z0RxnRmKU280 nA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g3mx98576-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 May 2022 10:42:59 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24GAWIQY015146; Mon, 16 May 2022 10:42:58 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g3mx9856n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 May 2022 10:42:58 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24GAcNvP011722; Mon, 16 May 2022 10:42:56 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03fra.de.ibm.com with ESMTP id 3g2428sx3t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 May 2022 10:42:56 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24GAgLMi30802186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 May 2022 10:42:21 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F02154C040; Mon, 16 May 2022 10:42:51 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17E2F4C04A; Mon, 16 May 2022 10:42:51 +0000 (GMT) Received: from [9.145.43.21] (unknown [9.145.43.21]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 16 May 2022 10:42:51 +0000 (GMT) Message-ID: <5bdad86b-3ab5-a1c2-7dcd-8c45c7aa4555@linux.vnet.ibm.com> Date: Mon, 16 May 2022 12:42:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 4/8] s390/entry: workaround llvm's IAS limitations Content-Language: en-US To: Heiko Carstens , Alexander Gordeev Cc: Nathan Chancellor , Vasily Gorbik , Ulrich Weigand , Masahiro Yamada , Alexander Egorenkov , Sven Schnelle , Andreas Krebbel , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org References: <20220511120532.2228616-1-hca@linux.ibm.com> <20220511120532.2228616-5-hca@linux.ibm.com> From: Jonas Paulsson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: kZqrCQfQy1VPDZ6Jutw2xP3BAwUz6_mQ X-Proofpoint-ORIG-GUID: fk-BFvK2Jv0N16rbrVKGs8mJnqN5C1YU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-16_06,2022-05-16_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 bulkscore=0 impostorscore=0 suspectscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 clxscore=1011 phishscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205160062 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?