Received: by 10.223.176.5 with SMTP id f5csp2996007wra; Mon, 5 Feb 2018 13:49:50 -0800 (PST) X-Google-Smtp-Source: AH8x227v4Ejf8NFE3c0++as7/8V9djIG67GYSolcTUI9la+Mzo7R8X0QjogZTa8qNOIBSkd1P6Oc X-Received: by 2002:a17:902:5a8c:: with SMTP id r12-v6mr201591pli.87.1517867390199; Mon, 05 Feb 2018 13:49:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517867390; cv=none; d=google.com; s=arc-20160816; b=DmefPCFcRx+Xy0S/G+7H1TB0yq1G/7xkFDUUG+m/vkhHm1q26ULekZItQn9oTYWZt/ gEXn58dpBj13ph0zuRqqrg7emVnK40/No7cMeVCgq9LwNdtXWHjSyExRik0qc6WBRQZ4 JFw1MdDvf4qv7Zxu9Dgy1zhTRnt4XfmkMiV5K+nB55YKsfWOTZGm5IwTtQnimwiHDN37 kv8SrgUtL8S9nfVO9719g4pfjQ/qJ9/AkoMy1T+gmY7o5lteN35X8R4skGtvssB8C8j9 n6UAnFOR9sb95b/cd9iUvJO9Rab/tEAdZOF8AnRJ++1Nobq22JYhPidfaYjdqM6QwW48 ToZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=UPBT75uSKa508B68CX9kvGB0h9hc/0Gh9wkGezsTttc=; b=BNMmZlO66aUIsI6iC3b4BhRXTMYaqaBlJ1PrAJL1AUoXwCIeUemjbrfpKG8ADs8UC0 4njuCCSBDlWwL2JLeOF5+daMSm1mIRzw+Y5DVz9uBb2Tx2aZM3JSe/w8HKRSXRYDxv24 vmiUm6cwiM52+vOo+1WboGGa/LGzLzTbnVbu8YjvqkGo+PgP3RbfXLtv5sCunqtRlJ2L fAievpP+kWrsZB1g+YRJarCsOZS94/jt261i+AfH4fGIQxysy2MeeFnWC1TOfGu0leov T4l7DOwDW1/NutMU1WpPjQPJv00a4758YtfBPsrWVKLiTX5tBwGcVnHhmk0+5zecGX2r PtHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pE5q2pyX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si374609pls.222.2018.02.05.13.49.35; Mon, 05 Feb 2018 13:49:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pE5q2pyX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752215AbeBEVso (ORCPT + 99 others); Mon, 5 Feb 2018 16:48:44 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:37373 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbeBEVsh (ORCPT ); Mon, 5 Feb 2018 16:48:37 -0500 Received: by mail-ot0-f195.google.com with SMTP id e64so8456423ote.4; Mon, 05 Feb 2018 13:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=UPBT75uSKa508B68CX9kvGB0h9hc/0Gh9wkGezsTttc=; b=pE5q2pyXxOTPkZl5hbX6QudpR02Lb/yDiU1iUjcEVgPZFFoXaw7Vt7mBszq93rnfNm gfKOS018jk46C706eIiTXRYl8qxzqJHi9+A9DYgaNtpRMli10vjK9vkNORyAoqQwSRXR zWihQSyxszrkFi7ZKxZ1KUgKhL8IRgjbnFbrCfZcASQBp/XdJBAOlwH2wmhPddzA3DHD LSrllWGswCQEGa9eCrmMGNU7UvD9ePD8FUJDrjR3jQdBqts6rGdmMoIqt3Qhf/9nTDzv LgQ2BU/tyJBWveluiZcRhqHYtSd03n8pXOdWt/y73eL0rQjOwrsCzJJPVvYhJzdkllpL 2ZeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UPBT75uSKa508B68CX9kvGB0h9hc/0Gh9wkGezsTttc=; b=ulEw6c7CrKHViCp4AmegEUNp+Apy+HM9PoaKLT6FFKFMkFaDyfvUrMJsdJAznIkKOk R4duPH9EN8npViWnw+sZPs8Dy3gCeEAtBixvlf8Q94SsFSDQFQSD9RgBbl1raRHE8Kh/ GPcALyeOiABm7UZgCLcZwDoXA3Vsa2qv1lYwa5GQZ6x6jbTrN3Zsx9hCr25ubNoqT1J3 5Cv3Uf4YVIVjkUoCSYsqsGSyrwDXBCzZ7nL8VsVdB7zT8Hj5NPuymFJkgv13YaG0kViW DqZWNwXLxM0M2g+Ie0VaCVMYKVhALwn9SYqIEOKhZ392TZIrsyEnVjsDXaTqWi4s1dbk kybA== X-Gm-Message-State: APf1xPCYZc+VT3GMMl+UD0awjLFsWEBLoCuFEsaQ2jfR/neHsU4NIodp pO6Pfe1XuWWldAWujJpqIVLxBMPZq4ZtadT0A80= X-Received: by 10.157.9.220 with SMTP id 28mr176869otz.363.1517867316708; Mon, 05 Feb 2018 13:48:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.33 with HTTP; Mon, 5 Feb 2018 13:48:36 -0800 (PST) In-Reply-To: <20180205213911.2auyud6a3k2ng7jx@treble> References: <20180202145634.200291-1-arnd@arndb.de> <20180205213911.2auyud6a3k2ng7jx@treble> From: Arnd Bergmann Date: Mon, 5 Feb 2018 22:48:36 +0100 X-Google-Sender-Auth: qRPcNHlVDprwvvR8qovfqsSDNw4 Message-ID: Subject: Re: [tip:x86/urgent] x86/dumpstack: Avoid uninitlized variable To: Josh Poimboeuf Cc: Ingo Molnar , Dave Hansen , Thomas Gleixner , Nicolas Pitre , Vlastimil Babka , Peter Zijlstra , Andy Lutomirski , "H. Peter Anvin" , bpetkov@suse.de, Linux Kernel Mailing List , Andi Kleen , linux-tip-commits@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 5, 2018 at 10:39 PM, Josh Poimboeuf wrote: > On Mon, Feb 05, 2018 at 10:21:06PM +0100, Arnd Bergmann wrote: >> On Fri, Feb 2, 2018 at 11:36 PM, tip-bot for Arnd Bergmann >> wrote: >> > Commit-ID: ebfc15019cfa72496c674ffcb0b8ef10790dcddc >> > Gitweb: https://git.kernel.org/tip/ebfc15019cfa72496c674ffcb0b8ef10790dcddc >> > Author: Arnd Bergmann >> > AuthorDate: Fri, 2 Feb 2018 15:56:17 +0100 >> > Committer: Thomas Gleixner >> > CommitDate: Fri, 2 Feb 2018 23:33:50 +0100 >> > >> > x86/dumpstack: Avoid uninitlized variable >> > >> > In some configurations, 'partial' does not get initialized, as shown by >> > this gcc-8 warning: >> > >> > arch/x86/kernel/dumpstack.c: In function 'show_trace_log_lvl': >> > arch/x86/kernel/dumpstack.c:156:4: error: 'partial' may be used uninitialized in this function [-Werror=maybe-uninitialized] >> > show_regs_if_on_stack(&stack_info, regs, partial); >> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> > >> > This initializes it to false, to get the previous behavior in this case. >> > >> > Fixes: a9cdbe72c4e8 ("x86/dumpstack: Fix partial register dumps") >> >> >> I just noticed my annotation got lost when I sent the patch. I originally >> meant to ask Josh to double-check whether it should be 'false' or 'true' >> here, or if we maybe need a larger change. >> >> Josh, could you take a look? Unfortunately I did not really understand >> your original commit, so I don't know what the safe choice is here >> in those cases in which 'partial' is uninitialized. > > I think it doesn't matter, it seems to be a false positive warning. > > The 'partial' variable is only used when 'regs' is non-NULL, and 'regs' > is only set in unwind_get_entry_regs() after 'partial' gets initialized. Right, got it now. So my patch is correct either way, just the description could have been better. Arnd