Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2043333rdd; Thu, 11 Jan 2024 18:46:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSZWwbMp0ttJILqC4ohJcIwgbwJj98UioHcyFjVwfrDC/EYua9Oglv5M60tWkd0l/CdZcM X-Received: by 2002:a17:902:780b:b0:1d4:dff1:d7a7 with SMTP id p11-20020a170902780b00b001d4dff1d7a7mr170940pll.123.1705027616140; Thu, 11 Jan 2024 18:46:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705027616; cv=none; d=google.com; s=arc-20160816; b=rpNYd49X5ptjB3+8//fj5lA6F9tBr3eURa5g4uhBnzAEWuJ4Ur38yCLfpuBKy0HyGv 8QqV2AiB7D/5aqSwYDt07MMpmwmohmsivETmCne2LNtkY8xpgz+X2EL0ilpSCnmb2A60 GOKQBgJsKcnR/auL7k5YNxt33T/0JY3lRtFtz/W0CnFYp3qu78vvy3pJnLX0kgnoLicO FYZ9CUzLXTWVA5SJjRoIcW8+SXIBaUBEcDb1FA1EiuCPtz0NyakCzNq3qqjNxMLs9gr4 16RaZ6Zcy2+XJkFt6Uqo5OEHcXLjCwBY+QrjXWOceOF0zH/0H+g7RSqFtDxR6JbbyLlo blsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=aOzE0IZkDrT6wsMDuYs1urNAAPhIonB3teDjyxpaRsY=; fh=ZA4t8/eGUHFPFRqDkWqOH4Y1Ak5SAh0N/VNBkgrdQ2o=; b=hFhqxWUISr9kjuAIjyz+cy4jH3ws7fD6dyHzPNf/Bhb8PZ4nIWx4jKMtnUeSsKXoxW +tkKjSYc0tCnFHfn/yabTxABelpYP+426tkqsJSTG4fRRIS2gYKTsiBB4D2lXw2yU0tW 7dqqWZ/n2y4bhmlgiKVnF8uh3eUjo03sGxj/AgkQvciO2QyRNmeyRvIXRc204oVsvQNU Qjdd3Ra7cBkaUEXEx0kekapuyaGQgf7rBWu9bm7TS9NzFz+l2n42dNDEmb/qkb9M9NwC XZP+Qap/UiZ8HcwZal5d5yDXJKov6+S30I61ztDADQe+oeB2qqoonGjdtBZlH5HP6l/N IYvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@canb.auug.org.au header.s=201702 header.b=NkZHiGgo; spf=pass (google.com: domain of linux-kernel+bounces-24245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l21-20020a170902eb1500b001d4b04724a9si2422480plb.133.2024.01.11.18.46.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 18:46:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@canb.auug.org.au header.s=201702 header.b=NkZHiGgo; spf=pass (google.com: domain of linux-kernel+bounces-24245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CDCA4B23605 for ; Fri, 12 Jan 2024 02:46:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FAB015C9; Fri, 12 Jan 2024 02:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="NkZHiGgo" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 035681118; Fri, 12 Jan 2024 02:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1705027585; bh=KzTy9q41J+Iz61mM8YvhQ8+Vz6G42mnYqSFsJShOuN4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NkZHiGgoSR7guJRAt+YOwPSHIZ6rN3xqHulVZsTyRy8nZ3H40yLiLGe11v8Mygxh4 M3XGFuiUnVMS1wfQDxwKwAUEbDlOEcYxjhu90Uhw3EgX7oZa6e7CBTwBHsVN3VveoA j3yU6Qf83WLGKlKgyr1NKVRf88Jh/a+K8U44kamy1vNOWHx070EzTmZ6ogeJYZSRKK sQIzIrSczY8TPzPBL91uojbOilesRU7fig98xyuybIeAUUpib0qWkWHjqmC5LLZP3a 2OuSEb3cXIxhr+TQ0eMr2GhhwHPGv6phMDY2DWRhxX1Ks/YTv1rKLXSR3EKSj0l4zf Zv+pa5qgAjqiA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4TB5X04LnGz4x5h; Fri, 12 Jan 2024 13:46:24 +1100 (AEDT) Date: Fri, 12 Jan 2024 13:46:22 +1100 From: Stephen Rothwell To: "Arnd Bergmann" Cc: "Dan Carpenter" , "Naresh Kamboju" , "Uladzislau Rezki" , linux-next , "open list" , "Linux Regressions" , clang-built-linux , lkft-triage@lists.linaro.org, "Andrew Morton" Subject: Re: mm/vmalloc.c:4691:25: error: variable 'addr' is uninitialized when used here [-Werror,-Wuninitialized] Message-ID: <20240112134556.1c73c072@oak> In-Reply-To: References: <628bf675-77fc-4ccc-be2f-9c3ec8a7b0b8@moroto.mountain> <908325ed-08af-4b0c-926e-da9afba25772@app.fastmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/FXcs1LWAtjjuljVrt8TKt6X"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_/FXcs1LWAtjjuljVrt8TKt6X Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Thu, 11 Jan 2024 17:37:12 +0100 "Arnd Bergmann" wrote: > > On Thu, Jan 11, 2024, at 13:55, Arnd Bergmann wrote: > > On Thu, Jan 11, 2024, at 12:16, Dan Carpenter wrote: =20 > >> On Thu, Jan 11, 2024 at 04:23:09PM +0530, Naresh Kamboju wrote: =20 > >>> Following build failures noticed on i386 and x86 with clang builds on= the > >>> Linux next-20240111 tag. > >>>=20 > >>> Reported-by: Linux Kernel Functional Testing > >>>=20 > >>> Build error: > >>> ---------- > >>> mm/vmalloc.c:4691:25: error: variable 'addr' is uninitialized when > >>> used here [-Werror,-Wuninitialized] > >>> 4691 | va =3D __find_vmap_area(addr, &vn->busy.root); > >>> | ^~~~ > >>> mm/vmalloc.c:4684:20: note: initialize the variable 'addr' to silence > >>> this warning > >>> 4684 | unsigned long addr; > >>> | ^ > >>> | =3D 0 > >>> 1 error generated. =20 > >> > >> We turned off uninitialized variable warnings for GCC a long time ago.= . > >> :/ I don't know if we'll be able to re-enable it in a -Werror world > >> although Clang seems to be managing alright so perhaps there is hope. = =20 > > > > The problem with gcc's warning is that it is non-deterministic and > > in recent versions actually got more false-positives even without > > -Os or -fsanitize=3D. Clang does not catch all that gcc does because > > it doesn't track state across inline functions, but at least its > > output is always the same regardless of optimization and other > > options. > > > > At least this particular one is an obvious bug and easily gets > > caught by lkft and lkp even if gcc's -Wuninitilized doesn't > > flag it. =20 >=20 > As it turns out, gcc did find this one in the default -Wuninitialized > regardless of -Wmaybe-uninitialized: >=20 > mm/vmalloc.c: In function 'vmalloc_dump_obj': > mm/vmalloc.c:4691:22: error: 'addr' is used uninitialized [-Werror=3Dunin= itialized] > 4691 | va =3D __find_vmap_area(addr, &vn->busy.root); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > mm/vmalloc.c:4684:23: note: 'addr' was declared here > 4684 | unsigned long addr; > | ^~~~ >=20 > and I see that Uladzislau Rezki already sent a fix, which > is the same that I tried out in my randconfig tree: > https://lore.kernel.org/lkml/ZaARXdbigD1hWuOS@pc638.lan/ I have applied that to linux-next today. --=20 Cheers, Stephen Rothwell --Sig_/FXcs1LWAtjjuljVrt8TKt6X Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmWgp/4ACgkQAVBC80lX 0GyUgQf7BqMWgH6cRs1tGNAs4BKWtftlLyJyZxCjYclzY9kjUIECSS6YKmZqH13Q XPy97i7GodFZJWaOwgf0RGtGB45wBjK/odZHpxLGmPVddDW3Lw4b+hoz/VnPzUyx 3UcHxWZrX2sjM7MHASXOmNlRvTr7BYVDTUFIojzdOFpELAaDHgIp+25i3NT/s7b9 xuE4cywwHA7i49iKZHBCPahxT9wcIaREwKMcClWM824G0oTEZ9hFjkTlOUy7EGfV vxgUIvc4KBRGUXq+ghdfru/SDnFXSjVxQzBF/Y/+u6CbLJpXsl4/zAmHH01c39q4 Tf4CfWS8RbJHiEfFwPeSAw5ayu+f/w== =YCNG -----END PGP SIGNATURE----- --Sig_/FXcs1LWAtjjuljVrt8TKt6X--