Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1622183rdd; Thu, 11 Jan 2024 04:56:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOZQYeqOqCyP7RGrohuo0pqrVlrqpIV4+laP17HOy0QlKr4zbgrlU0UnklAjBOTr3Ub0Z2 X-Received: by 2002:a17:906:59:b0:a2b:1a80:7b8d with SMTP id 25-20020a170906005900b00a2b1a807b8dmr360837ejg.196.1704977798231; Thu, 11 Jan 2024 04:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704977798; cv=none; d=google.com; s=arc-20160816; b=UsuMhNqD4J/f0tvN/s9+cC8oFdD5NZ/+vLyJDFkKRpSTWHiaxTn6b0VLzctCDxzPyC wUZiXy7ojpA/XSJTePkI9j/7/wUAkPu9ytj2z7iKyXdKeXAFhhZF5zgWfDHGoMAazNhM GoikF+tY2060dKd8Evi/LuBF0Y7x00wi9qK4rgZwpK8gNNp3KTzy7UTbk/lyGt/mKxFV N0Xg6XpoyeoHO/UjWKhmcmpaNKuOAJ9da09PGV3Afeb3HGm9/y+zY+2CkruD2Be9JTUx xW8F0FMHC/kHzBMf2LNfKcIynnZrey0mNdKQFfBvnUsl5xlVuPsSM/L3qtFaAeQkuUa0 arMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=n7Flv4sDP2we1RAcMNYutGo+Ms3cmgPKVxBB6NzlfbI=; fh=NcjzWw5maZOIfB8VBX/9Hzyx9VbSls8xQ2VDSQIT5ek=; b=B64/umjxzk1PEPR1cYcRUJKhipQqFDDhrd+ntCWhXM0x26xBemazYWGKOGyNKEZzWM rqKtPyoeDstIytye9I+RufUDgi6HIU3vWEFeTsY5HCWxu+6JjeR0z24/x+SKOS5QPLkC Gv756YwSIlyrRDLKKsSo3zEceBQjfnAqfpjHpjO87+ls75e9y71Gk38qmSGSb1JY3qOK oqyZvxxL3pPFu6sVQ1hOuy9eYdD7wax7hq9PgDO+CiqIZ0Sv8qpJXd01uBAAOD/kCq7d 8mgCMDOh0o9M1PLMFXglH9AMnGHrdETwX1o41gXVCStvS19TAQAMHbbZBZsSx8t4Swme MdLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=BMV4yOHv; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=nrUdzr6x; spf=pass (google.com: domain of linux-kernel+bounces-23608-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b7-20020a170906038700b00a28ef5ea773si464125eja.524.2024.01.11.04.56.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:56:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23608-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=BMV4yOHv; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=nrUdzr6x; spf=pass (google.com: domain of linux-kernel+bounces-23608-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6384E1F237FC for ; Thu, 11 Jan 2024 12:56:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF48715E96; Thu, 11 Jan 2024 12:55:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="BMV4yOHv"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="nrUdzr6x" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 C60C315AE9; Thu, 11 Jan 2024 12:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id F2A543200258; Thu, 11 Jan 2024 07:55:47 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 11 Jan 2024 07:55:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1704977747; x=1705064147; bh=n7Flv4sDP2 we1RAcMNYutGo+Ms3cmgPKVxBB6NzlfbI=; b=BMV4yOHvD6RNJ4gKwjz8eJiho5 MuZnwjbYPMPctC3x5+8khcxrp10wy43dm0CuDs41cIlUu1itHZpeur4ThCGOpH5Q R/PAKoF4uJsOX0MEAnGqPwYGrnWO/p/+j95ZAZ+QDHBUq4tJmU7oKoKgsLrD6kO8 iEctsAHd4R903F/Xwo8lb5OS5qB4dLUOi8kYU4qEsdY0Uwcv+7JOkjxJZ2MEVfUG YbkpODU5INMHIbc5FoF9BBrOn/RvuYPryRLHuudMvQ5ZmjfPLczg+vVFgj1Jg1UJ Wj8SrRapaSTz/aQkcPW6qo37nPlfqjQmK3PQptDu2j/IjRNAX6B2yr5+cggw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704977747; x=1705064147; bh=n7Flv4sDP2we1RAcMNYutGo+Ms3c mgPKVxBB6NzlfbI=; b=nrUdzr6x4aT4f4aJSErB7UJYRsMkiISvZnY5PXbhtgpb EfBhv9SmKahvHIaV88z+Of1ai0prhzzuGiVJs4rB2qkZWdI7nFwoZ+J9xqORqhpi q71KiRfmqJW6Wqn3TjQg54RZBrf7eALnwotOd1wW7baIjdpwRinDtkt/Yn0Th5ik 3STJ5Q5Gk4sLmlbyXfZAGxdRErWdtzIElfFVCzQpCnNu1/SDftDdLxbOvfuyaQT7 5Recd5pmgvGuJsAUyeo3OgFRQgYO0Oa4BixRO0eMUPzByzyTD9Y3lMZ4zmCeeHVj R84jonajBxTqt2W2eiQzAOlQ4pCDKgOOkwh5dZ6yfA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeifedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1A00CB6008D; Thu, 11 Jan 2024 07:55:47 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1374-gc37f3abe3d-fm-20240102.001-gc37f3abe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <908325ed-08af-4b0c-926e-da9afba25772@app.fastmail.com> In-Reply-To: <628bf675-77fc-4ccc-be2f-9c3ec8a7b0b8@moroto.mountain> References: <628bf675-77fc-4ccc-be2f-9c3ec8a7b0b8@moroto.mountain> Date: Thu, 11 Jan 2024 13:55:15 +0100 From: "Arnd Bergmann" To: "Dan Carpenter" , "Naresh Kamboju" , "Uladzislau Rezki" Cc: 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] Content-Type: text/plain On Thu, Jan 11, 2024, at 12:16, Dan Carpenter wrote: > On Thu, Jan 11, 2024 at 04:23:09PM +0530, Naresh Kamboju wrote: >> Following build failures noticed on i386 and x86 with clang builds on the >> Linux next-20240111 tag. >> >> Reported-by: Linux Kernel Functional Testing >> >> Build error: >> ---------- >> mm/vmalloc.c:4691:25: error: variable 'addr' is uninitialized when >> used here [-Werror,-Wuninitialized] >> 4691 | va = __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; >> | ^ >> | = 0 >> 1 error generated. > > 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. 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=. 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. Arnd