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=-5.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A9C95C433DF for ; Sat, 20 Jun 2020 15:57:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F486235E4 for ; Sat, 20 Jun 2020 15:57:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QDUi4+cS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F486235E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8DB118D000A; Sat, 20 Jun 2020 11:57:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88C3A8D0008; Sat, 20 Jun 2020 11:57:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7797F8D000A; Sat, 20 Jun 2020 11:57:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id 5C82D8D0008 for ; Sat, 20 Jun 2020 11:57:09 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D9214180AD838 for ; Sat, 20 Jun 2020 15:57:08 +0000 (UTC) X-FDA: 76950044136.21.walk68_50088b926e22 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id AB3EC180442CB for ; Sat, 20 Jun 2020 15:57:08 +0000 (UTC) X-HE-Tag: walk68_50088b926e22 X-Filterd-Recvd-Size: 4893 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Sat, 20 Jun 2020 15:57:08 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id n2so5369750pld.13 for ; Sat, 20 Jun 2020 08:57:08 -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=9tYajToBSjCKrMeO3oPfRpy8eb8n4thx7RWSAT9gnU0=; b=QDUi4+cS/+VkJarQJer8i54NB6wrYUApoWkctsr63KwWXWXArOZDidsHLokQDZp1dW eZ4mUUVqPLdtc98QdwYojIxlVjsSvdT6uJdK2Pr6SfHfX+CS5ufDjNUbv4fBIhf1Kcxv MQ/YY9T6qSNqLt4/98fJo5BCZXSyE37vzBS0w= 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=9tYajToBSjCKrMeO3oPfRpy8eb8n4thx7RWSAT9gnU0=; b=Bcul8OJypTBvE/TYZGM62BZZT7FjzUEFNnVDOWHKJz88/Yk7iD9jJX0sEi+vpO+Ddn HsCC3q2brKqK8xetfdrm27puM1hwOqFK/TcLn092CPZDXk3+11r7AJs0FbSJUVi+HCSR 69SyNhrdbt5AVThkPMbvNUl7etX8dyIZBX5zBvjvYPFscYdUCnRK5o6mW/oADFCRB3Hq ixfsnbQZDi0oX9F2qzO6E2OClHOz+JX7la5dp7ylmnD4aCvw/BFaDQLyl3igyWeXcJ7K gJS9NeOyVSSQ7cnosDjKj5eCHguMQuZ7twAGpnBJxJGeFwr4S7QHRGjpbiIGrkPHIZ4m UXOw== X-Gm-Message-State: AOAM532qddZH6QxXcdNPzIYJtMXW6i6Z1HAUBNTJGRHYf6avsnHUyMg7 WDO1z0Zvw4i0AvAyAx1lwadkmA== X-Google-Smtp-Source: ABdhPJxL62JhXi8o+nSID6QHqBiLZ4YAHSAeaQKUwiACFjUcLS2k4S/MAlD8WL4T8tKBotrZuujIYg== X-Received: by 2002:a17:902:b78a:: with SMTP id e10mr12682612pls.201.1592668627259; Sat, 20 Jun 2020 08:57:07 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y4sm8954278pfr.182.2020.06.20.08.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 08:57:06 -0700 (PDT) Date: Sat, 20 Jun 2020 08:57:04 -0700 From: Kees Cook To: Sedat Dilek Cc: 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-doc@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 v2 00/16] Remove uninitialized_var() macro Message-ID: <202006200854.B2D8F21@keescook> References: <20200620033007.1444705-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: AB3EC180442CB X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Jun 20, 2020 at 09:03:34AM +0200, Sedat Dilek wrote: > On Sat, Jun 20, 2020 at 5:30 AM Kees Cook wrote: > > > > v2: > > - more special-cased fixes > > - add reviews > > v1: https://lore.kernel.org/lkml/20200603233203.1695403-1-keescook@chromium.org > > > > 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. > > > > Most of the 300 uses don't cause any warnings on gcc 9.3.0, so they're in > > a single treewide commit in this series. A few others needed to actually > > get cleaned up, and I broke those out into individual patches. > > > > The tree is: > > https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/log/?h=kspp/uninit/macro > > > > -Kees > > > > Hi Kees, > > thanks for doing a v2 of your patchset. > > As I saw Jason Yan providing some "uninitialized_var() macro" patches > to the MLs I pointen him to your tree "v1". Thanks! > BTW, I have tested your "v1" against Linux v5.7 (see [1]) - just > yesterday with Linux v5.7.5-rc1. > > Is it possible to have a v2 of this patchset on top od Linux v5.7 - if > you do not mind. Since it's only going to be for post-v5.8, I'm fine skipping the v5.7 testing. Mainly I'm looking at v5.8 and linux-next. Thanks for looking at it! -- Kees Cook