Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2555657rwl; Mon, 26 Dec 2022 17:36:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXtoBOvCdG4zokuAlnu1kghjhAUh5SJUyzhNtCnwVwvRh3DZTcjLowT1myETQ/P7cObrn0l2 X-Received: by 2002:a62:b412:0:b0:581:3557:f75b with SMTP id h18-20020a62b412000000b005813557f75bmr4335933pfn.5.1672104962696; Mon, 26 Dec 2022 17:36:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672104962; cv=none; d=google.com; s=arc-20160816; b=NH5m/3KRJ2TREmIOm59xIcFnVKS2kAWyazrp/ye/uPUHaKlGB6rmBLjhziLrs5jXHI y2c/deNvWVLQEhby2hGXcQ6Vgd4yl8Aik3FLYBJDdVF9jpq62G5x/tSg7zZbufoMoqLQ aRIL2Ckt8UXLVfAew6+vZhBkgfG4Vp4+6o8iT39Q8ZVAwRU7jKqytDTtZAMWKPLOsGZr 5UY/Kuv4VQIgF+pJnC72CrqDAOnu9oGJKSPLt+x0MvWkc1XQTfcPdymuTVZBEqULhrcu gt5/mwkChaP1swxF6CoKk5eC8TciNnC5j11uLjmujYIit7mwdtnS2Gju9ax5D4puQIey GklA== 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=xEPa1WwuMkUPBnFpzc5M6uXxKwvAEmH6+v5bk6APBco=; b=bK0nTqJCgDJRoonP1OWMEEVdWLzUwQg9Wzt6Ib/aHrFGcF2nP+wcHBTUAzmBoJk8lV 9wXNoe3+gob7anr9O1zbuiIpWsqKOCbevL/psC+skgZiUDCzDEJ/Sc2/WHoZdbvPBkdz E7tbxpQAFtZVxIdkiB9XY2Nl3EG8QY1+cxcRfDy6nuEYm/XWNUahiE/aNpt+NBDs6JcK NEii92hgMWneZGxNa40eGK1xY8xEJRh+IkqYBklj8hD9OhFbRfSpJ1XCyN9aBJ4EoTvm 8VRjkSd1/2Yg6/PXj+K6gdXNMesnaJlkrgbRE/wPilwdcjn/XEWzp5+p5I0UXUVJ9imh pTJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gWDsF8I2; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 73-20020a62144c000000b0058167c50a3asi667974pfu.142.2022.12.26.17.35.54; Mon, 26 Dec 2022 17:36:02 -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=@kernel.org header.s=k20201202 header.b=gWDsF8I2; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbiL0Bcf (ORCPT + 67 others); Mon, 26 Dec 2022 20:32:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbiL0Bcd (ORCPT ); Mon, 26 Dec 2022 20:32:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0749389E for ; Mon, 26 Dec 2022 17:32:31 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 4F358B8069F for ; Tue, 27 Dec 2022 01:32:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D428DC433F1; Tue, 27 Dec 2022 01:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672104749; bh=Sm6tXr3yNFCUNf85oYBS5NHm7gc9058DgQHZ5OKhgl4=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=gWDsF8I2kE0GZF4aO2EdWsLiNS5NtwTtwxQTB3yAhqO12ISV6W4rsSjMTLJBcEaAZ 0MgLOm4J/4dOp1Gn4R04vvttv3Li30uB4zGirFRA+cUcLi9sGbiEm4Diih/sjRcSZv xJxOwCRD4bKvXlq01m2MIv/vDwApzdWnfq47bmxEY28kZiUvizPRZWkz/Ol5+XzoLC 7+3FGsdgD/uwRkYajD3c+1nt32yHqE+08rChi7NLMw5wiS0QH8GiCOxKyo9yi6lW1M iyWB/exqhLs+SgvJB2+dg9oZY1OMHP8sYx7+j6tF3pmiKSiAElP7najTDNHoxyEB7Z ekDvoKhxO6HaQ== Date: Mon, 26 Dec 2022 17:32:28 -0800 From: Kees Cook To: Guenter Roeck CC: Linus Torvalds , Jaegeuk Kim , Chao Yu , Linux Kernel Mailing List , Vlastimil Babka , Peter Zijlstra , Nick Desaulniers , Kees Cook Subject: Re: Linux 6.2-rc1 User-Agent: K-9 Mail for Android In-Reply-To: <20221227002941.GA2691687@roeck-us.net> References: <20221226195206.GA2626419@roeck-us.net> <20221227002941.GA2691687@roeck-us.net> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 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 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 December 26, 2022 4:29:41 PM PST, Guenter Roeck w= rote: >On Mon, Dec 26, 2022 at 01:03:59PM -0800, Kees Cook wrote: >> On December 26, 2022 12:56:29 PM PST, Linus Torvalds wrote: >> >On Mon, Dec 26, 2022 at 11:52 AM Guenter Roeck = wrote: >> >> >> >> fs/f2fs/inline=2Ec: In function 'f2fs_move_inline_dirents': >> >> include/linux/fortify-string=2Eh:59:33: error: '__builtin_memset' po= inter overflow between offset [28, 898293814] and size [-898293787, -1] [-W= error=3Darray-bounds] >> >> fs/f2fs/inline=2Ec:430:9: note: in expansion of macro 'memset' >> >> 430 | memset(dst=2Ebitmap + src=2Enr_bitmap, 0, dst=2Enr_b= itmap - src=2Enr_bitmap); >> >> | ^~~~~~ >> > >> >Well, that's unfortunate=2E >>=20 >> I'll look into this=2E >>=20 > >I did some more testing=2E The problem is seen with gcc 11=2E3=2E0, but n= ot with >gcc 12=2E2=2E0 nor with gcc 10=2E3=2E0=2E That's what I'd expect: 10 didn't have variable range tracking wired up to= -Warray-bounds, 11 does, and we disable -Warray-bounds on 12 because of 3 = separate 12-only GCC bugs=2E > gcc bug ? Should I switch to gcc 12=2E2=2E0 for >powerpc when build testing the latest kernel ? Sure? But that'll just hide it=2E I suspect GCC has found a way for dst=2E= nr_bitmap to be compile-time 27, so the size is always negative=2E --=20 Kees Cook