Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2226707rdd; Fri, 12 Jan 2024 03:25:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdau0sBKzJqYxSv0FU36T/i9bPu1/6fLu75XLRrGm2Qq62ExFicIU0EIrkTJnlDSZAvo1F X-Received: by 2002:a05:6214:5199:b0:67f:9c62:301 with SMTP id kl25-20020a056214519900b0067f9c620301mr1009801qvb.60.1705058701964; Fri, 12 Jan 2024 03:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705058701; cv=none; d=google.com; s=arc-20160816; b=WEZQ8+iG918H8OcS8cWgUuCp/hAZzQCCbyp5cwdN9k7zUTZeVPeAbYLQd/hvt7UMO9 6nF80GB6hfY134kK7DWIWFGwrnG8tE9tUHlXGyzsDLX8IlyqD25H1ZO+UIldc6GLLx+p cloOLQ7Chtm2bVTdPccAgSMEy64jgK7VwBMKLwsfXNiLKN5rPZLfIVWyTClWTlUgjOXx JiGVyvrK1ADn6dij7Cz4pOdC+dKaqEGHehkrJXxag4QgbKct1nqc+S2vd2p2NEw+DnqW i0CGDTlzx51jsDj1Qx8XRwd2u9YMqYDTO7w0xiIj9jo4EERnx6bjDusaH39uCtsM+j8b wllg== 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=LSf0SiijIVzkqraaNl7VZeYKE9TrQNnQYNEHNGLb4m8=; fh=NcjzWw5maZOIfB8VBX/9Hzyx9VbSls8xQ2VDSQIT5ek=; b=hiJPsxTwJgXg+CdTjA1TikTF2XzwC2Bgy7wwNfclph0V0bcuI3bat52d8XxAquADc8 kW4tU+cNcg3KoYCiaZQ6mPjeMl++tOuROdjPbTgxa67RGS/nYGo6TOOAcXyhRB6GSppm 2nXeWsiR2QlJBhBRWorasI6cqFVTw0qrI2KvL9d4rB7K2vlAWESWtNVtmn9s927ijbcv Ti0HviCu/TIUdFxTfkJClhf/OuRJVi8cyaMEF9T4i0vdJV40K3Np7FeDYJKfUD8j7wXU xfjfaIAr4pQP3H/T9RPuisVcwKas97xzvmTv19gGKf4Y6v85ZesR/Zni7RBnRqevSdty 7NAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=pIoaubWI; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mlHrRsJ9; spf=pass (google.com: domain of linux-kernel+bounces-23877-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23877-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p4-20020a0ce184000000b0067f9111b539si2701541qvl.506.2024.01.12.03.25.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 03:25:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23877-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=pIoaubWI; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mlHrRsJ9; spf=pass (google.com: domain of linux-kernel+bounces-23877-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23877-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F5D81C240DD for ; Thu, 11 Jan 2024 16:37:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6353750269; Thu, 11 Jan 2024 16:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="pIoaubWI"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mlHrRsJ9" Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 375715024E; Thu, 11 Jan 2024 16:37:35 +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 9FC743200A0F; Thu, 11 Jan 2024 11:37:33 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 11 Jan 2024 11:37:34 -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=1704991053; x=1705077453; bh=LSf0SiijIV zkqraaNl7VZeYKE9TrQNnQYNEHNGLb4m8=; b=pIoaubWIow5E/9yD4EaILySIjh GpbArRXiopDzKgj/x5OSJP1/XrLuOiFYpW2OCZrAxPlGEEDEnMaQspUVvdGYNBeZ 9eqSS6uRBInNQjp0mSFBeMRycMepS2IZ/LumKkG2hovNWwHSfnNwg0V/cT1TiPKm OY99U7plvUSsrXJF2u8wITKGJ4ybLeKw5PtBGzi8j4ry4SCDC6b0NP+EPr+8Z61l C81i8xYvoW5uLVnjSzOSawclt2UYMTQKgHgi274QAuKVYsPYN2YLZCZrzUpjHyHB sbd7NZEkdctr+xwi6R6vTMxc6rWcxKHsdmsM68DKRwi14iDGbyEtey+UqdQg== 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=1704991053; x=1705077453; bh=LSf0SiijIVzkqraaNl7VZeYKE9Tr QNnQYNEHNGLb4m8=; b=mlHrRsJ9xxJZ9UagtFXuT/OJT5doT6uscqzyrs+n0D4Y Pyg0iG1906ueZkDsppl4UAurbfyC3HKQNOjlZSZlcZEHrtbZO2+cgQC83edJ6T8Z NFWyfkJwRaNGRD149FEE7YAdAMxJjupM8dNCDvrWRLlQuHUS9XNaD32Y6xPIxiQ5 TtubAhgrRmuHjBbClF4HGf3MT+BZj21t/Wg5XrEFzwz3+Yitjyz2zoPQFnP7fh4T 2hVTWhD+Jn91CKM8U03V1S2P+STQq+ODDAMzRmybN/CllIr8SPcsFbkzGoJI3Y7Q 9mZeahCRYW00ajKxKM9ijfioL7FN04QX74eg5RGsnQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeifedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepvefhffeltdegheeffffhtdegvdehjedtgfekueevgfduffettedtkeekueef hedunecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C0B46B6008D; Thu, 11 Jan 2024 11:37:32 -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: In-Reply-To: <908325ed-08af-4b0c-926e-da9afba25772@app.fastmail.com> References: <628bf675-77fc-4ccc-be2f-9c3ec8a7b0b8@moroto.mountain> <908325ed-08af-4b0c-926e-da9afba25772@app.fastmail.com> Date: Thu, 11 Jan 2024 17:37:12 +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 13:55, Arnd Bergmann wrote: > 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. As it turns out, gcc did find this one in the default -Wuninitialized regardless of -Wmaybe-uninitialized: mm/vmalloc.c: In function 'vmalloc_dump_obj': mm/vmalloc.c:4691:22: error: 'addr' is used uninitialized [-Werror=uninitialized] 4691 | va = __find_vmap_area(addr, &vn->busy.root); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/vmalloc.c:4684:23: note: 'addr' was declared here 4684 | unsigned long addr; | ^~~~ 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/ Arnd