From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F167C433E0 for ; Thu, 4 Jun 2020 14:27:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18F7120772 for ; Thu, 4 Jun 2020 14:27:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="e7eITrZA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729037AbgFDO1r (ORCPT ); Thu, 4 Jun 2020 10:27:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729019AbgFDO1q (ORCPT ); Thu, 4 Jun 2020 10:27:46 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A9FC08C5C4 for ; Thu, 4 Jun 2020 07:27:46 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id g12so2238744pll.10 for ; Thu, 04 Jun 2020 07:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ELp8NKpDU/b4oaZzGkEuk3yIxekW0FfVsfMh0kEq3DQ=; b=e7eITrZAAG4SVhaatsNGEFfKSAV4mgFFeMordqmQufFe6/vzeagmQ484X5shPhREQO NcIW+cQNizrMWNfglE0Jh5V6uWSzvceN4EXsYppzfKNVQcK2K6MGcm3eAbNC9iODqDY1 7i/uriuA9VGz8WZ62VSr78LapWZNk/5N3ydBE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ELp8NKpDU/b4oaZzGkEuk3yIxekW0FfVsfMh0kEq3DQ=; b=DHHcplpqTl/a9IRoDxBTlOsEfHmpVMGkmUkB4ACi+u7uJ7axZE3KUp6W0A4uMUpaR6 oyBuEwG5/sh9tWrygKrsSVwAseLKZGZiSDRQWGmiE+w5rWt6xkC+mi9RFD2IeufhXxxN SeG6yrnBAEOAHfAc62EEjE4I6YqhHx98Mj/ZxF+f0cY4Hh84HB8pKhN+6aKgoGtA+e5w VKnSciHZMIRBHK2bXUHx00Dlj0E6OiVm4Fm/zw5jbFid/D7ktVQ4T6rC2EdnikZDFRCr qbtmWnX4z5a4wL4+JgyJgQJlopCH3utk8PHCJm8VjKj7fPEcfBePvRdrmCooHHJtebNv 4yzQ== X-Gm-Message-State: AOAM5315CH5R/tUhbpkgbNvUAtPO8RuSkqLDZ2zZ/vhVNg4xunZOrtTO BFsQ6KtG83yIcvgIViBDyWHvGw== X-Google-Smtp-Source: ABdhPJyh46iXXKU9Sh1DXTFOzkFXYm4paCXLSWoWqbxFRDWCjy8xbqFVrhjjddGEPZlvsY+JnIndAg== X-Received: by 2002:a17:90b:188d:: with SMTP id mn13mr6391960pjb.84.1591280865425; Thu, 04 Jun 2020 07:27:45 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j15sm5944936pjj.12.2020.06.04.07.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 07:27:44 -0700 (PDT) Date: Thu, 4 Jun 2020 07:27:42 -0700 From: Kees Cook To: Sedat Dilek Cc: Nathan Chancellor , linux-kernel@vger.kernel.org, Linus Torvalds , Miguel Ojeda , Alexander Potapenko , Joe Perches , Andy Whitcroft , x86@kernel.org, drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, b43-dev@lists.infradead.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-spi@vger.kernel.org, linux-mm@kvack.org, Clang-Built-Linux ML Subject: Re: [PATCH 00/10] Remove uninitialized_var() macro Message-ID: <202006040727.265B0E586@keescook> References: <20200603233203.1695403-1-keescook@chromium.org> <20200604033347.GA3962068@ubuntu-n2-xlarge-x86> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2020 at 09:26:58AM +0200, Sedat Dilek wrote: > On Thu, Jun 4, 2020 at 5:33 AM Nathan Chancellor > wrote: > > > > On Wed, Jun 03, 2020 at 04:31:53PM -0700, Kees Cook wrote: > > > Using uninitialized_var() is dangerous as it papers over real bugs[1] > > > (or can in the future), and suppresses unrelated compiler warnings > > > (e.g. "unused variable"). If the compiler thinks it is uninitialized, > > > either simply initialize the variable or make compiler changes. > > > > > > As recommended[2] by[3] Linus[4], remove the macro. > > [...] > > For the series, consider it: > > > > Tested-by: Nathan Chancellor [build] > [...] > > I tried with updated version (checkpatch) of your tree and see no > (new) warnings in my build-log. > > Feel free to add my... > > Tested-by: Sedat Dilek Awesome! Thank you both! :) -- Kees Cook