Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp168548iof; Wed, 8 Jun 2022 18:23:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw00r+sW9uX25JwLD8z8DXLK+4lOo9vfNEE8tIHy9++NLVH0QPzZJLOvUtOzVu+D36eB2Gu X-Received: by 2002:a17:90b:3850:b0:1e2:a755:162 with SMTP id nl16-20020a17090b385000b001e2a7550162mr790167pjb.241.1654737789987; Wed, 08 Jun 2022 18:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654737789; cv=none; d=google.com; s=arc-20160816; b=qkzPO4qFlqPLxmOx6nBWduHiOrk5akR79xqx/253SGNwyK2aIyg67qvanrE/8Wy707 WYg+PqL9liZQCGP7gCMjReRLvlR6V1wXOW//C5ZHLgaUH43S4MliveSlYqt6vQSDQVsm 9Ff+8Zsz8Rv32mHKKtFdTiIW/4bcPgI6HWW9J3bxuzxxrpBpuj6bFJIzUOlz2kb/Leph 8QjWIB7NTCLpChw2/ge6yQSGVX2OmXuu9hT4F5BwY9Rg5BL3V6R3jDoGl2s3Tbq6K8TL nPOhlLmqPKb/oyK1LdRD1YsmkU4tzpqiqi/6EbimY90LIvz5k2hiLriyaaMX7NqcvexS Z2jQ== 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:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature; bh=fzZbe8intrXhthn1s1bNq36n/kNKj5fAUKcD/RdB7Mc=; b=PXW+XN7bF1oFT6DYkOzLnGPUdnHc5NLEcehx70eTVbWHT7yMEPfUK7zgFgvShXUYUR WgkoLjH57VJqasMgxaH10iS2zVGHeAh/wDcvJqOdamQWijaZfCTm5800DS8Qhx7Xr/Pm bMu6f4ItDdLhymG0J9CUkW/w04z8E8rkl2jCxBdXKCVeGrxNBUB4opNKHKOT3P7Kz5Hw +Lz5yMHowryKC3JBwfltNvA5Up0lUw8u0qs8/I+FRXe5uHHGFRr2moYz3NRZfborUUdC YORTgEl6gecgPHbjG/mAn1ezhcO3BBTMP4sYt+4b8x1765KK6cBe0UhfUf2xZdtbVH75 Y08w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fVDYPTbC; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a170902cec200b0015f4370afbdsi32509150plg.516.2022.06.08.18.22.57; Wed, 08 Jun 2022 18:23:09 -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=@chromium.org header.s=google header.b=fVDYPTbC; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233735AbiFIAjm (ORCPT + 99 others); Wed, 8 Jun 2022 20:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbiFIAjl (ORCPT ); Wed, 8 Jun 2022 20:39:41 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FCDB1182E for ; Wed, 8 Jun 2022 17:39:40 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id w2-20020a17090ac98200b001e0519fe5a8so19753441pjt.4 for ; Wed, 08 Jun 2022 17:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:user-agent:in-reply-to:references :message-id:mime-version:content-transfer-encoding; bh=fzZbe8intrXhthn1s1bNq36n/kNKj5fAUKcD/RdB7Mc=; b=fVDYPTbCWFa8rRMmV83/fu1sbKOoZnDztqEPT7N63Ze0B0mGeqpoQJ+78nQzUyxrb/ XHPlYFKJleZWIvbXKv9q4cuEZ8o4C5Q8/nUIeIa343oX0fIIASasOHxG4/nbwZK0KzSZ jUCH1XuPsRaWEfx01sK7ZAeRJr0SsFZy0o/VQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:user-agent:in-reply-to :references:message-id:mime-version:content-transfer-encoding; bh=fzZbe8intrXhthn1s1bNq36n/kNKj5fAUKcD/RdB7Mc=; b=be+pd7wjf5CxeWAam+tm2vP67Ppy5plMBe8vDyulLJTfdi/RvkqzGBIdpOeCI7ZZ0A TCusZUN1AK0SSU11E1X5c6CYIffuShNRBhYIucAHZHjO+Hm94+Q8N2ytnuc9sHHPm6cu OgIA5XKUBDIT0lBoWg7h0qICeTisocdVmlahdhza7x6OaNFVQ1iJA9PV8reY4jJcBBes n25W2gvViQ98De1T7yqIyCIb9XQ+zoKgIS167vw6h5XPDeHiJbahh2NM3r0RDP73y/cD l8HZwOZKAdkvXGcyvF+KxGKFOPZGu2LfjKABx5w3H0SYlU+uDR7mUEjn5TM7lMO1A3Nd TkxA== X-Gm-Message-State: AOAM532xJ7Op9xHzvIEgcRf9Hep5/xQIeskjl9dIlT7jDwmAa2QLlpH9 zuRZwzWClw1anRZtBtEiDKdV2w== X-Received: by 2002:a17:902:db06:b0:166:42b5:c827 with SMTP id m6-20020a170902db0600b0016642b5c827mr34384226plx.145.1654735179664; Wed, 08 Jun 2022 17:39:39 -0700 (PDT) Received: from [127.0.0.1] (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id k16-20020aa79d10000000b0050dc7628162sm15808314pfp.60.2022.06.08.17.39.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 17:39:39 -0700 (PDT) Date: Wed, 08 Jun 2022 17:39:36 -0700 From: Kees Cook To: Linus Torvalds , Philipp Zabel , Shawn Guo , Sascha Hauer , Fabio Estevam , David Howells CC: Sven Schnelle , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Linux Kernel Mailing List Subject: Re: [PATCH] s390: disable -Warray-bounds User-Agent: K-9 Mail for Android In-Reply-To: References: <20220422134308.1613610-1-svens@linux.ibm.com> <202204221052.85D0C427@keescook> <202206081404.F98F5FC53E@keescook> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 June 8, 2022 4:59:29 PM PDT, Linus Torvalds wrote: >On Wed, Jun 8, 2022 at 2:33 PM Kees Cook wrote: >> >> I and others have been working through a bunch of them, though yes, >> they're not all fixed yet=2E I've been trying to track it here[1], but >> many of those fixes are only in -next=2E > >Hmm=2E Even with that disabled, I get a few warnings I *really* would >want to get rid of=2E Yup! :) > >The one in ipuv3-crtc=2Ec seems valid about "address used as boolean is >always true"=2E > >The 'dangling-pointer' warning does seem interesting, but not when the >compiler does as bad a job as gcc seems to do=2E > >See the attached patch for > > (a) make the s390 "use -Wno-array-bounds for gcc-12" be generic > > (b) fix the ipuv3-crtc=2Ec one=2E IMX people? > > (c) disable -Wdangling-pointer entirely for now I'll take a look; thanks! Should I send them back as a pull request? >but that still leaves the netfs_i_context games, which gcc-12 is very >unhappy about: Yeah=2E Happily, this has already been solved, but it looks like David did= n't do a pull yet for it? https://git=2Ekernel=2Eorg/pub/scm/linux/kernel/git/dhowells/linux-fs=2Egi= t/log/?h=3Dfscache-next >I'd like to use something more surgical than >CONFIG_CC_NO_ARRAY_BOUNDS, but considering the s390 issues, it may not >even be worth it=2E Kees, just how far away are we from that being ok on >x86-64? For gcc's UBSAN_SHIFT (I typoed this in my first reply) bug, netdev has be= en moving it to W=3D1 builds on a per-source basis for the moment: https://git=2Ekernel=2Eorg/linus/e95032988053c17baf6c7e27024f5103a19a5f4a Some discussion: https://lore=2Ekernel=2Eorg/lkml/202205231229=2ECF6B8471@keescook/ Perhaps these could be even more carefully limited to GCC 12 only, using t= he Kconfig you suggested? -Kees --=20 Kees Cook