Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4489167rwb; Tue, 17 Jan 2023 01:17:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXvkQTtNMaMaCSJ/qV/pr9X3yD3UNluXU4/cf68J6dK4uuoBgF0D1RiFnTNMgP7yvNBpvutS X-Received: by 2002:a17:906:9f0b:b0:84d:14c8:b669 with SMTP id fy11-20020a1709069f0b00b0084d14c8b669mr2041668ejc.77.1673947051521; Tue, 17 Jan 2023 01:17:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673947051; cv=none; d=google.com; s=arc-20160816; b=Chk4wzpAgLE1ecerCGdV18/ZLhv99wj/XqMnRv8pfG8Ze4sRm55OO+EiSwJ6/zilwf QWEaBRt+DTcfOKCUJIjQMDleJc9v0nFyHs5KiiKSnDLfRGSZ47NBbxwqL+2OIgdWqQZ3 h8azYoiXwhImFqJAhDA85xpKouaPBEQGiX6sAw6o5W3Al0d8FY7n0AguBZlhfLsvWPai NQDkNaopmwU7TqalUrDvD8wWSHSqfItpC+w4DhN/IIeuYi25vGQwdA0AHFPhbWglUFYx 089dGb2iDcnkZz6yE3kVdlONAknvZ0tPwsRpbHmXsDQ5OXjjeYovdG3Fgf8OXBywp/cN +MRg== 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:sender:dkim-signature; bh=0NAtipYSyTW+GwDFf12zqOPhjTjzg7AWvFqV0EBka+Q=; b=PpDia04OAD2/5jLpWiJmpuogPtElv3GaHN7A7PT4cD3O6qDEJvixz/Z4iYQkO1COSf c9WzTdV4kjhYTByBQVcbpznauAdyaYUpGfMd87kckP2yArL1I1qErodfEFl6FueW/Du6 F86qlolhn1pO0U3Y2I6vl87GKT0qSJUfqz/UzEu3xSv3nkPgkXXQy6qONnEYeoO6TCR1 B8g1b12qLrQyM33UqqAK/c9iEq/xOHAKtPSmcpIi3VvyazHonW+VwXEQCDOEjkS2huZg 6TO1nSPrdIiht4pkJor05y9rrcoJ4yf6RPd6vQ3TBFDE6WGHPN+bHbwEifh5oC4akxog PKlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eN26VWG1; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xb13-20020a170907070d00b007dd1da8cd85si32106651ejb.126.2023.01.17.01.17.19; Tue, 17 Jan 2023 01:17:31 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=eN26VWG1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235987AbjAQJKI (ORCPT + 49 others); Tue, 17 Jan 2023 04:10:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236454AbjAQJJl (ORCPT ); Tue, 17 Jan 2023 04:09:41 -0500 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A613302A4; Tue, 17 Jan 2023 01:03:46 -0800 (PST) Received: by mail-oi1-x233.google.com with SMTP id p185so4281152oif.2; Tue, 17 Jan 2023 01:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=0NAtipYSyTW+GwDFf12zqOPhjTjzg7AWvFqV0EBka+Q=; b=eN26VWG15wRzfEmyfbgEpgrnkd+1vEg9MtMA4OwJsJffJd9jrJ+X/urBex/z60kcXE QSbODoslFuO3oZPzu8gv46JFExd0s/znOcTeQ32KB2yUlI2VGUUvZ0W0cgcfRslIyf1p i5B5FHmvWmflMFjGJtmRHFLfsxp9l5/cQy9QNFnLZpz62TtUQ1G5cAhLWKPEVURtM6Ri 2RQjwCP6qJPCcUaW0AWToJaLi7+SuNOLpKAaFELXqpbDQNqnQ0tAscuSJhuh/wXkSqg5 TWhlFURWN08stm1Jk3H/GhuZ8iwulvTkygpjA6LxXGgAlWeANY2EZLIT56vCAw8t1m1i GV+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0NAtipYSyTW+GwDFf12zqOPhjTjzg7AWvFqV0EBka+Q=; b=EvqC3pakVdFZU1S5vYXhCd+qpS0wK5GWuw9emJ5qQgxM/uO75cyA4zRofedaAvl0rx Eu8sMNlUq7tR5ZmKMTVgifajPggNeIbwDhBGawPZuaT+hzIftZTbefMxsE+V/0wJh9Yv K/0/1YxXzlhs7gRgHeV9xVcOmp3Vvvh4cCy1hRug62v8Ev2ikQq6MbU/8ngpncPfvt2W UdIq60/3Y2CcN7yKumnzlVPsO/5YJLvpO6mSpFe4YtOkJQ1JiuhyK7fLdFlWhD2cN4Kf UJlMapTtfaLGlNEHQ//oH+jxuWq1Amd+FIAEw2yIX5TMj5Vv1fGIgselCibF/Q3+rCfh 6v9Q== X-Gm-Message-State: AFqh2kr3/xx7B7oVNo6lqJ6hZRGaPe1a2JmSE8dG5LzakShvaqtkx2xA wsgSwh/IFvtn6Gg/LXtZYSkk490CCBU= X-Received: by 2002:a05:6808:6d7:b0:360:c338:b958 with SMTP id m23-20020a05680806d700b00360c338b958mr1024178oih.55.1673946225861; Tue, 17 Jan 2023 01:03:45 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v63-20020acaac42000000b003670342726fsm2108210oie.12.2023.01.17.01.03.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Jan 2023 01:03:44 -0800 (PST) Sender: Guenter Roeck Message-ID: Date: Tue, 17 Jan 2023 01:03:43 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Build regressions/improvements in v6.2-rc4 Content-Language: en-US To: Heiko Carstens Cc: Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Alexander Gordeev , Vasily Gorbik References: <20230116122924.116745-1-geert@linux-m68k.org> <46ba7912-3df6-dff9-792-49f4eaadefec@linux-m68k.org> <20230116184127.GA1721129@roeck-us.net> From: Guenter Roeck In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On 1/17/23 00:57, Heiko Carstens wrote: > On Mon, Jan 16, 2023 at 10:41:27AM -0800, Guenter Roeck wrote: >> On Mon, Jan 16, 2023 at 05:40:00PM +0100, Heiko Carstens wrote: >>> On Mon, Jan 16, 2023 at 01:36:34PM +0100, Geert Uytterhoeven wrote: >>>> On Mon, 16 Jan 2023, Geert Uytterhoeven wrote: >>>>> JFYI, when comparing v6.2-rc4[1] to v6.2-rc3-8-g1fe4fd6f5cad346e[3], the summaries are: >>>>> - build errors: +1/-5 >>>> >>>> + /kisskb/src/include/linux/fortify-string.h: error: '__builtin_memcpy' reading 128 bytes from a region of size 0 [-Werror=stringop-overread]: => 57:33 >>>> >>>> s390x-gcc11/s390-allmodconfig >>>> >>>> /kisskb/src/arch/s390/kernel/setup.c: In function 'setup_lowcore_dat_on': >>>> /kisskb/src/include/linux/fortify-string.h:57:33: error: '__builtin_memcpy' reading 128 bytes from a region of size 0 [-Werror=stringop-overread] >>>> 57 | #define __underlying_memcpy __builtin_memcpy >>>> | ^ >>>> /kisskb/src/include/linux/fortify-string.h:578:9: note: in expansion of macro '__underlying_memcpy' >>>> 578 | __underlying_##op(p, q, __fortify_size); \ >>>> | ^~~~~~~~~~~~~ >>>> /kisskb/src/include/linux/fortify-string.h:623:26: note: in expansion of macro '__fortify_memcpy_chk' >>>> 623 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ >>>> | ^~~~~~~~~~~~~~~~~~~~ >>>> /kisskb/src/arch/s390/kernel/setup.c:526:9: note: in expansion of macro 'memcpy' >>>> 526 | memcpy(abs_lc->cregs_save_area, S390_lowcore.cregs_save_area, >>>> | ^~~~~~ >>>> >>>> Looks like this was "'__builtin_memcpy' offset [0, 127] is out of the bounds >>>> [0, 0]" before. >>> >>> Thanks for reporting. Of course this doesn't happen with gcc-12, and >>> this code will be rewritten with the next merge window anyway. >>> But to workaround this with gcc-11, we could go with the below: >>> >> >> This is because of >> >> #define S390_lowcore (*((struct lowcore *) 0)) >> >> and is fixed with something like >> >> #define S390_lowcore (*((struct lowcore *) absolute_pointer(0))) >> >> See commit f6b5f1a56987 ("compiler.h: Introduce absolute_pointer macro"). > > Yes, I'm aware of that. However absolute_pointer() is not an option for > S390_lowcore. See also commit f0be87c42cbd ("gcc-12: disable > '-Warray-bounds' universally for now") and the referenced s390 commit. > Interesting. It works (builds) just fine for me after the above suggested change. Guenter >> The problem is only seen with gcc 11.2. I don't see it with 11.3 or 12.2. > > FWIW, the compile warning is seen with gcc 11.1 and 11.2, but not with any > other compiler. Given that this isn't the first report, I'm tempted to > workaround this now.