Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3314478iob; Mon, 16 May 2022 19:06:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7e5RytlBgIOWFum7opyE1CmKCCFcY/vzNtq+SiQVl0zsZUBmn8c5hSyA3zoSgWWJSBC6f X-Received: by 2002:a05:6402:703:b0:426:110e:5d22 with SMTP id w3-20020a056402070300b00426110e5d22mr16521781edx.375.1652753172859; Mon, 16 May 2022 19:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652753172; cv=none; d=google.com; s=arc-20160816; b=Xm1fqROLYIwbb58W9SHgYCTB4LADV4LngUVgmdtob3R7T1m00UGF0TPsxm/wdd9XEB ecNj9MQ/GN1MZMO0Cv0oD3pS1UldyRtuFOuvODGznUMz9P8FANTQEF5uCuRlhIId2c1q 0o7cZna7dgEUe1F3OOkL+pCiwsWikqXWeVPf51XclO6WIu8tew2aszCqiVE7eLNcfYRN CGqIpowdXjiEWS4OGk5v+MGXLXF/kMFegZ72b4jNyPshobWZfMmceO0ss04Zxf+K7tWz iWLnwwUXf0n/keNIa4Fnxyjcof0VDHYC+PJxqjU7PCdTUJ+boGyzuog/PWshgUQ2O/gM egQg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FMKdz+f5thcn3fOILcSgCunjfzSj/ICIDQE8/JOAplA=; b=TpO1fYw6OCeoi48wmVBcHBuIhFGzuV3zvDhrakGZizwlqgRb0U0nF1qPrMmlIBR+DS gyat7fTppt3ZVE489a7HwH9iMn3JsoGfNFcn52mmRlmoBgWU9p0x5sBxv1cb8Pm1oPWE jFJbe/Ajyz2wdSCANwkHOketsFtnP4dCmYNsRkR87DPiovqdFPT/t9V2BRV/+shDm6cM iWWriTZAcTeHTUI4EVrQEaexOn/Xqz/MHIBQ162SaV3w10SKcB+EORrqJmjW1nMqJx2q a/X+9Mfch4znmbL5vhvAGT5PZDGFdvHb3Zpp0rlsElrudH5rjP35pSLL8n7vfDxSUDit ia3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hTWMz2ZH; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc17-20020a1709078a1100b006e7edaf2b8asi856534ejc.371.2022.05.16.19.05.47; Mon, 16 May 2022 19:06:12 -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=@linuxfoundation.org header.s=korg header.b=hTWMz2ZH; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346823AbiEPUTu (ORCPT + 99 others); Mon, 16 May 2022 16:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348916AbiEPT7D (ORCPT ); Mon, 16 May 2022 15:59:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 695A9369EF; Mon, 16 May 2022 12:52:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0296F60A50; Mon, 16 May 2022 19:52:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2095C385AA; Mon, 16 May 2022 19:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652730766; bh=D10GPRbEwKJfKsKN2QwvZzhLZ1ISe1aCW6XloW6wvuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hTWMz2ZHIxf2afU+Z06ljK55BRWZDO+40n3KKByvChBKMWUgTovCnamljDx33T2PH Xbzhp90+KqKgshHh/Io5iKLnN7WYdgf0+gUUg1ihHYWb1m0ItbDOzmwlk488879Bo1 fy+HCaF1+5+e9AOQcbek7/4fOfEagr/m5zJW6TX0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Schnelle , Heiko Carstens , Sasha Levin Subject: [PATCH 5.15 051/102] s390: disable -Warray-bounds Date: Mon, 16 May 2022 21:36:25 +0200 Message-Id: <20220516193625.462471436@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516193623.989270214@linuxfoundation.org> References: <20220516193623.989270214@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Sven Schnelle [ Upstream commit 8b202ee218395319aec1ef44f72043e1fbaccdd6 ] gcc-12 shows a lot of array bound warnings on s390. This is caused by the S390_lowcore macro which uses a hardcoded address of 0. Wrapping that with absolute_pointer() works, but gcc no longer knows that a 12 bit displacement 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 gcc-12 for the time being, until there is a better solution. Signed-off-by: Sven Schnelle Link: https://lore.kernel.org/r/yt9dzgkelelc.fsf@linux.ibm.com Link: https://lore.kernel.org/r/20220422134308.1613610-1-svens@linux.ibm.com Link: https://lore.kernel.org/r/20220425121742.3222133-1-svens@linux.ibm.com Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- arch/s390/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index d4fd1426a822..c7b7a60f6405 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -32,6 +32,16 @@ KBUILD_CFLAGS_DECOMPRESSOR += -fno-stack-protector KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) + +ifdef CONFIG_CC_IS_GCC + ifeq ($(call cc-ifversion, -ge, 1200, y), y) + ifeq ($(call cc-ifversion, -lt, 1300, y), y) + KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds) + KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, array-bounds) + endif + endif +endif + UTS_MACHINE := s390x STACK_SIZE := $(if $(CONFIG_KASAN),65536,16384) CHECKFLAGS += -D__s390__ -D__s390x__ -- 2.35.1