Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp981756pxb; Fri, 22 Apr 2022 15:54:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1ot4ogI2FwQ/HTZTiH+nTm0BCn2pWwDGSNOQhsrFUDfpnotczebQd8I1VOVCV02Np6q/Y X-Received: by 2002:a17:90a:f3d6:b0:1cb:a0aa:5e60 with SMTP id ha22-20020a17090af3d600b001cba0aa5e60mr7797839pjb.161.1650668044407; Fri, 22 Apr 2022 15:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650668044; cv=none; d=google.com; s=arc-20160816; b=WjeuXmGfZSiFWdywvV/auFBOaL3bY3x6ZffpVdJCD8psTzoMgj+0/LEPGVBfIwcVED a0XAUup2xsMjW/+l0H20vQs4o2VMlcSRwj9fNuo43fxSkKBY63g5iNK4VPZnxr5eIyGv h3c+mENrX8odt1/+y89tR5Zptq8GXNVeSZP+DXj9sI6EAKId49YTUmeDQp6GwxZwO/Wb 9hMAkelNFKPpXC+aHc/8+Fi7H7Q0YpaS+S/vAmfVnN6hTYX0PY71KhvrlQG+Jc5ynPHV tEqcJNsx42wdKXf+TVF/gFmHjR5j8XXMCCQtg7yrlitzf8um396ha2Ka8i3mine0jwZn ZHdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EA5Dvtyc9OF9mDEGvXc65P+qnZTNWtINBFUEbIsPcf8=; b=JQnsL3oO7VH9e7riYKewxmLiOFs2TM0vDWTYyLilmEnx3uvWhedqLCYQV9lImlHpqS IVlh2Alsh5NJ/7ZobbzittKCqsmeXqeFh7s5BnwsQzN4KO6dD3CqrJIJoAF4VdfZpYl7 LAaeeqEPIB6DSnKDjSN/p7CtqnpTOJ/5GBZKWF2Jg4rkSi0tQZY9Sr/ddIgHRpJuIkrp 4LtHYmY1A3DRNwtY0XgQ7HeBavBxlwKnWsqcAZFlJVRFBZU+fko/gLgKEoo5tE3YQ2Uk Tr691VZ2HLperMeRx5PwUiMl8NPpqsty4xHa1d2cwt9UCvloD/Sedzmez4FhbZ1H7oAH DtRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=VVY0P2pc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t6-20020a639546000000b003a2637c44c4si9797329pgn.767.2022.04.22.15.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=VVY0P2pc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8841B2C8C09; Fri, 22 Apr 2022 13:44:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448130AbiDVNqX (ORCPT + 99 others); Fri, 22 Apr 2022 09:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448124AbiDVNqS (ORCPT ); Fri, 22 Apr 2022 09:46:18 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02E858E68 for ; Fri, 22 Apr 2022 06:43:23 -0700 (PDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23MDbXoN020787; Fri, 22 Apr 2022 13:43:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=EA5Dvtyc9OF9mDEGvXc65P+qnZTNWtINBFUEbIsPcf8=; b=VVY0P2pcp3CPR1jVpJ50wb46gCkgpLmHtyqV2jxFdswSENL6B1/ss0VLtWpdex8chtSE e5B2p0WB6wgDkloTx/iHj29uwTgMC9NWrw4XK9S4T4ddai+vEErF0pXgPFTvgFaFLn5K n/vnYflj+UqXKyhN/4mbgU61GM7QPMyfFJGoNpBvZ0h9ctvLFX2u8vekmH6+mxja/bTn Ir0CsRyMxPOtvibjOLXpfHVg4RKS9bvnKnqJBYFFcl3nzfzKVparwJZzAxlTTpH83GR0 ZPKpq1Hr8HvkXF6/IQWdufvuIiEnzS98kKKNZf7ohY9kRPDdTZ7cTkpY3h9BWSEIOau+ ig== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fkrbbph0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 13:43:22 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23MDeR0G025053; Fri, 22 Apr 2022 13:43:20 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3ffn2j1fn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 13:43:19 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23MDUOxb42467734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Apr 2022 13:30:24 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D772C52051; Fri, 22 Apr 2022 13:43:16 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id C6EEA5204F; Fri, 22 Apr 2022 13:43:16 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 9755DE1367; Fri, 22 Apr 2022 15:43:16 +0200 (CEST) From: Sven Schnelle To: Heiko Carstens Cc: Vasily Gorbik , Alexander Gordeev , Linus Torvalds , Kees Cook , Linux Kernel Mailing List Subject: [PATCH] s390: disable -Warray-bounds Date: Fri, 22 Apr 2022 15:43:08 +0200 Message-Id: <20220422134308.1613610-1-svens@linux.ibm.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: q2RQPZkQg0NSng7cV7GSIA0HW4ugw5Uo X-Proofpoint-GUID: q2RQPZkQg0NSng7cV7GSIA0HW4ugw5Uo 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-22_03,2022-04-22_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=697 adultscore=0 bulkscore=0 clxscore=1015 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204220059 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 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 --- arch/s390/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index e441b60b1812..aff0f66e25fb 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -14,6 +14,7 @@ KBUILD_AFLAGS_MODULE += -fPIC KBUILD_CFLAGS_MODULE += -fPIC KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 +KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds) ifeq ($(CONFIG_RELOCATABLE),y) KBUILD_CFLAGS += -fPIE LDFLAGS_vmlinux := -pie @@ -28,6 +29,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables KBUILD_CFLAGS_DECOMPRESSOR += -ffreestanding KBUILD_CFLAGS_DECOMPRESSOR += -fno-stack-protector KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member) +KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, array-bounds) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) UTS_MACHINE := s390x -- 2.35.1