Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp138815pxb; Mon, 25 Apr 2022 07:16:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRetBxln6SueOzG3Mp/7tQ8qzZDjiyt+6LsF1Larq2FTF3lehvCvOWCTzQAtAmzP6tyfHr X-Received: by 2002:a17:907:6e1c:b0:6ef:fb80:d92a with SMTP id sd28-20020a1709076e1c00b006effb80d92amr16283022ejc.539.1650896217262; Mon, 25 Apr 2022 07:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650896217; cv=none; d=google.com; s=arc-20160816; b=HuXVFUQfH1KWLqcf9kHR+ilZWK+Jz2U+7erhNCNSlFBtqgZboiVnKSHq/Qt02NkeUz kKf/xyJ1F+9aKF/TGjz1vg+tm/inTrI2m6bvnFVR9+0tFtCQmHjhr3jI6MWr29aoSA0C 0t5KcWWaK7oQoCemYPfAeuwjUKHh0o6Af9pUkzYwCsKc0RAB03p8CjH5mgnFElw9x94k jrVp2O+0x6UrNsDx4qqIE2zcKqqH0JjH8lPa0V67sP22SyM3B6gNQj5h2Pl75AtfblX0 KpGQBRMu2ZOsWqSjbxdA24OVuTkkFmVmZAWtVbZcylpHMvbGE3soQoYFmi6hMS+Xj+ew jqMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6X2jedQwijB4Kh0e2riYItaL9nIyj05CViCMzGahzWk=; b=TvzGbjH+QWod50s5jkJDvDHV6T2ASujeo7My6oJ4Cp/XTCNBl8TQWWiIJOVIu72XP6 5CduI2RztHNbiLx6B4ttEQDn4I1++9C1foktSQvjXt0cNbHR+CUxGNQgV/4WZvukbAwS /K/x9jm9GiwXQ7yxObrRZvjTPeyPOaY7Coz8wmuojrkM9pSMsSUxRV8Q/y6ahM1fdJan Q50Lxd6pQRfd/mS4Fu0LVBOZIJcnvo3vsavnfmCyebVUWfe22SOrDvi9c3lLNKhJNe4r 0cYVfRt+iq1pHldIiJM9P5BJcOUuN9bkQg63XvLKTPLz/+ubdaO4KBcSXjq9qVW/6gi0 473A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=PdJt77zs; 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 g6-20020a056402424600b00425e87ced9esi2684860edb.512.2022.04.25.07.16.28; Mon, 25 Apr 2022 07:16:57 -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=PdJt77zs; 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 S240781AbiDYJS3 (ORCPT + 99 others); Mon, 25 Apr 2022 05:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241559AbiDYJQ7 (ORCPT ); Mon, 25 Apr 2022 05:16:59 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B52F321 for ; Mon, 25 Apr 2022 02:13:51 -0700 (PDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23P8dEd6030426; Mon, 25 Apr 2022 09:13:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=6X2jedQwijB4Kh0e2riYItaL9nIyj05CViCMzGahzWk=; b=PdJt77zs0jrYt5X4a5k+7M3MnYsAbWu5t+mzzaHVpgDSTGJwH8E+tV2zVEIcRpZUaB+0 xjR/FCJm8tm9RbXXuIizJf1AJrXLYGXUZuMjSpdJfa/v/bMfRB8xcjQBwZ9w3QKhavb5 u1pWkzhEZtnJT22NPcr+y3CPoYd7f5wPHS/zXy/K3TJNxgL6fbV2TC2VBLZ1M1eX2Q8T f7dTxEJlvQMuCxcs5Z0xF4+0lWBvCodxLN1CSYriy+eHIk+IoW0vRSL23jbI0XYu/i/T ARYaR23fUhtSGal2Rox0ak9PCcrpLmP3ndXiHsqpdcZrdZTkagkH3J+L6QCBvwwlPYeA Dw== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fnraugqb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Apr 2022 09:13:49 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23P99NnW002691; Mon, 25 Apr 2022 09:13:47 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03ams.nl.ibm.com with ESMTP id 3fm938t3aj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Apr 2022 09:13:47 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23P9DiQ220578720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Apr 2022 09:13:44 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5537DAE055; Mon, 25 Apr 2022 09:13:44 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C8D2AE051; Mon, 25 Apr 2022 09:13:44 +0000 (GMT) Received: from osiris (unknown [9.145.60.82]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 25 Apr 2022 09:13:43 +0000 (GMT) Date: Mon, 25 Apr 2022 11:13:42 +0200 From: Heiko Carstens To: Kees Cook Cc: Sven Schnelle , Vasily Gorbik , Alexander Gordeev , Linus Torvalds , Linux Kernel Mailing List Subject: Re: [PATCH] s390: disable -Warray-bounds Message-ID: References: <20220422134308.1613610-1-svens@linux.ibm.com> <202204221052.85D0C427@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202204221052.85D0C427@keescook> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: kFHppHQ3132OF6_IEtMjIkGaIK8ytjbm X-Proofpoint-GUID: kFHppHQ3132OF6_IEtMjIkGaIK8ytjbm 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-04-25_05,2022-04-22_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 bulkscore=0 impostorscore=0 mlxlogscore=381 adultscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204250040 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 On Fri, Apr 22, 2022 at 10:54:09AM -0700, Kees Cook wrote: > On Fri, Apr 22, 2022 at 03:43:08PM +0200, Sven Schnelle wrote: > > gcc-12 shows a lot of array bound warnings on s390. This is caused > > by our S390_lowcore macro: > > > > which uses an hardcoded address of 0. Wrapping that with > > absolute_pointer() works, but gcc no longer knows that a 12 bit > > instruction is sufficient to access lowcore. So it emits instructions > > like 'lghi %r1,0; l %rx,xxx(%r1)' instead of a single load/store > > instruction. As s390 stores variables often read/written in lowcore, > > this is considered problematic. Therefore disable -Warray-bounds on > > s390 for now until there is a better real solution. > > > > Signed-off-by: Sven Schnelle > > It looks like the source of this problem (the literal-values-treated-as-NULL) > is gcc-12 specific. From the discussions, it sounded like Jacob was > going to fix this "correctly" in gcc-13. It might be a good idea to make > this version-checked? (i.e. only disable on gcc-12) That makes sense, so we still get at least some coverage for compilers < gcc 12; and also latest clang still seems to do the right thing. Sven, could you either send an updated patch, or an addon patch, please? Whatever you prefer.