Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3360911iob; Mon, 16 May 2022 20:39:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvA45l5lCBRHjibNMi21WSOynEH/PWcWpLIz2ZyLD5yftMRHJPYPr92cc+9bHiG5QJeZh8 X-Received: by 2002:a05:6402:4241:b0:428:177b:5fd with SMTP id g1-20020a056402424100b00428177b05fdmr16571824edb.193.1652758776063; Mon, 16 May 2022 20:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652758776; cv=none; d=google.com; s=arc-20160816; b=LmdF2bocSxTnbjlMZIIDgNjFRXcdgkHuPJ+J6H6ByCDuc4Q+VIgZXgrsQQo53vkHB5 dXMJNCyqq4dlXBELXtJGV6UvxgNSqQyUmQyPjHStfyQQH2+TtQubXSm/f9QWucgFhSQe rXO/G5gHE6UVRmyPQvZ8qkcQOzyN52KXiSen1WKnWeEnunBsq0D6idDNmL/JlCptd5Ks pLdXSwbFk0yzRaGp9enh/G+1Qk0FwQd0O4bQ5kTNj3TEO6lmZUv+6HZoNPMWskPAQ38A FCYujyQVlImrRBhRdmVPVABCScRF/JNr4xt5UaNKouDPUf2q1jefIV4TNWHY553Iyl5d Wo8w== 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=ipCe3LdRw22KtKAyOU3/lQuDl0/n2M7xMAW+kz0g8hA=; b=eKKeuVE0qV+df6+sApnunerTQ3BEEr67CCa4PLoWcODdHSggNZdqD1J8+a2TPnRQPk ncR48wXAipnAicKQB1nF5/Du1P98vNoF0LmKOlqqbVRGMTbFK9oWJXHK+D7Hax6mH+EW kbTAxk9ZgnzziYh50WkNzj/XU9xhhGc7d72Esr9oUiQhYB0sYYwYLuKFH3bVM+9ex3Cg 6eFDQqpwLSt4FM3VffXAd9qpxsavtRa3YATJuq45ZMiy7QCyJV6qVyUFEIiThsJl2amU BJz3qbMl4puDJkFRET0V2+wW7JM8rdRu7C40cBlhHkwvttK/RxyJcjDv5VT1q68dRRdA iGRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FCLMqMWF; 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 dd15-20020a1709069b8f00b006e01f1d9677si1261893ejc.532.2022.05.16.20.39.11; Mon, 16 May 2022 20:39:36 -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=FCLMqMWF; 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 S1346291AbiEPTuH (ORCPT + 99 others); Mon, 16 May 2022 15:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346095AbiEPTn0 (ORCPT ); Mon, 16 May 2022 15:43:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E0A63EF14; Mon, 16 May 2022 12:42:54 -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 2D97461512; Mon, 16 May 2022 19:42:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DC97C3411B; Mon, 16 May 2022 19:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652730173; bh=sAbBE4ZK/Gtrs3Du8M9bUK9bxR4OSTLCtTqbA3WnEw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FCLMqMWF+/fSbyXlFtjKTjpJm1akJwJp3O7EWEXCefpcBGl+xfD67ngmQMG0q2QaS xsJB5r/gGSHBP4oMswLva0hHNOTtI/KalnHZLxaUu7brU0GabFudGf4ER+zs3i/kpi /aMCp9KCy0GosjfH65WLHPoK5PSRcAEJm648pXg0= 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.4 22/43] s390: disable -Warray-bounds Date: Mon, 16 May 2022 21:36:33 +0200 Message-Id: <20220516193615.373763803@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516193614.714657361@linuxfoundation.org> References: <20220516193614.714657361@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 2faaf456956a..71e3d7c0b870 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -31,6 +31,16 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding) 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