Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1464419ybt; Mon, 15 Jun 2020 00:30:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOCCBRqyMw7pklCkk9EZgQD3Usi/mpDu3JfRcWiOi176QHbVJpvb/P6elPNEnKdIXZd4lZ X-Received: by 2002:a17:906:ce28:: with SMTP id sd8mr23891213ejb.280.1592206234484; Mon, 15 Jun 2020 00:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592206234; cv=none; d=google.com; s=arc-20160816; b=u8p82DukIh0km+GmOmGq9WBej32AhJeKe9YPajdmA30ClpAfkAS1z3gRqXe/KIAxPh te3LI5Rpa5oNZxMJvUzmWoqWPvbBjdeM2eqOY8vxoW8umzavEmcOs184nMT+oOzQ4ib5 fAYmtpv49gJyzOD+3UsLiuaCSIavTLYL8Bnx7qJIHMisRjlMrYQUyWP5MCbuLmoASm0E EBOgMztEkivOR3jblfgk0z6jSlyCsXIgtxvr8NipICWcBxnUvnSKeABdzHz4csuTAdZI PsCJP3SuuyM+fElAXdul5kMXnWZTxGKefOqJcwcVtpM/Tie02JHwvYI3k0m2j3KEGXMj 7KgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XHwguCxo4c2cVMancqpzmFcNo1EaIuQKAA2ekR4KvOU=; b=TtwLKMnEiyDqdODkXweSbjZIwVhMbgy8eL9yTnuDwrbDAQTqALjuAEszKzpQ+y75yu DPKORoAeXKUMNVNRXt9u/gcNUEhdx3ZIDKsMYxoHX0SxXaQ/h5uE/kGo6BrzdABoivpe GwBLTy173MqIBx/tUEpeMBo3mnqC+PCoLaIHaYuz7LEXyztVrcGy1tu+4bublnw16OUE i4Fi8noPThn3BtK3Fc8BkIWL4Hqe5UOKW9mYzhwIJGPnx2nEHH9HcRJpoPn6kfkOywXS n0K1PcN51i4RhRf79dqqsUuxPYPrfz7YJpMjiLx5ezbMNVEpSafen8yCfD6+pc+moRfM +VTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GQO48Y7H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si7962572edq.185.2020.06.15.00.30.12; Mon, 15 Jun 2020 00:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GQO48Y7H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728698AbgFOHZo (ORCPT + 99 others); Mon, 15 Jun 2020 03:25:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:51544 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728521AbgFOHZj (ORCPT ); Mon, 15 Jun 2020 03:25:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592205937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XHwguCxo4c2cVMancqpzmFcNo1EaIuQKAA2ekR4KvOU=; b=GQO48Y7H7OSovPkuta2dq3dwywWCrC8ONAWgnO27bRXRI4RgPL1xMIP/NFpUrfJ5KdgOJl aB8txB4F/GnxkeibxyfTulA7sCmyq7mX1/NoRmKXFJyGcLFbwz64xiLiAYSYcXsX5q25ER r5EBjun6FYdnezmz0P3VnQIIk2Wr1wk= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-436-PB54_YscNOuJ6zh8S2pVrw-1; Mon, 15 Jun 2020 03:25:34 -0400 X-MC-Unique: PB54_YscNOuJ6zh8S2pVrw-1 Received: by mail-pf1-f198.google.com with SMTP id m11so12513420pfh.22 for ; Mon, 15 Jun 2020 00:25:34 -0700 (PDT) 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:user-agent; bh=XHwguCxo4c2cVMancqpzmFcNo1EaIuQKAA2ekR4KvOU=; b=oBtD8mFLtCKQ1+DdK3hLs+u9oo7KjXeHbEocN+zEyYsUzuRASKYHIK3KOhJ9C6uIcZ 8qnRQ/zxyqQqtYY1cehaabTVqlHoU5SNh0RmYQeWMqpY90NYE0EAHLb/o7sJzWIWXtNc GI3GDCiMKDJmzKkcCrln16b5gxu8phd6SN8/Aw4XV6haLgXFEnGuWava/FQBzetT5QV6 GFzErjG7Qa5xXWzue0/kl67pJuGsopVJXGRsPmCHNystM0oQnChcukgtnToAcVJ63HhP 8cnm2nYkewb6Fu+J9UzT/XPkm4qF/zDB/UVw0i/3o0nd8udoDZitRFFMK14wq+vkDeOI 4tkA== X-Gm-Message-State: AOAM533tWjv7oV/4VXW0bco5wxoh9dy6qpodJ1sIm63ELiw07fX/zv1+ TKbtvx7tl4o7aZiescyCe4t91pCDMVt/8E5woNf1Up4XAVS3Ejl9XLMvYd6cMziVMFJgKv2IB4D 3eDSdItHeCmSzQtqi8bqwzkEh X-Received: by 2002:a62:7ccb:: with SMTP id x194mr23171903pfc.318.1592205933331; Mon, 15 Jun 2020 00:25:33 -0700 (PDT) X-Received: by 2002:a62:7ccb:: with SMTP id x194mr23171888pfc.318.1592205933006; Mon, 15 Jun 2020 00:25:33 -0700 (PDT) Received: from xiangao.remote.csb ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id mw5sm13015199pjb.27.2020.06.15.00.25.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 00:25:32 -0700 (PDT) Date: Mon, 15 Jun 2020 15:25:21 +0800 From: Gao Xiang To: Jason Yan Cc: xiang@kernel.org, chao@kernel.org, gregkh@linuxfoundation.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Kees Cook , kernel-hardening@lists.openwall.com Subject: Re: [PATCH] erofs: Eliminate usage of uninitialized_var() macro Message-ID: <20200615072521.GA25317@xiangao.remote.csb> References: <20200615040141.3627746-1-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200615040141.3627746-1-yanaijie@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jason, On Mon, Jun 15, 2020 at 12:01:41PM +0800, Jason Yan wrote: > This is an effort to eliminate the uninitialized_var() macro[1]. > > The use of this macro is the wrong solution because it forces off ANY > analysis by the compiler for a given variable. It even masks "unused > variable" warnings. > > Quoted from Linus[2]: > > "It's a horrible thing to use, in that it adds extra cruft to the > source code, and then shuts up a compiler warning (even the _reliable_ > warnings from gcc)." > > The gcc option "-Wmaybe-uninitialized" has been disabled and this change > will not produce any warnnings even with "make W=1". > > [1] https://github.com/KSPP/linux/issues/81 > [2] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ > > Cc: Kees Cook > Cc: Chao Yu > Signed-off-by: Jason Yan > --- I'm fine with the patch since "-Wmaybe-uninitialized" has been disabled and I've also asked Kees for it in private previously. I still remembered that Kees sent out a treewide patch. Sorry about that I don't catch up it... But what is wrong with the original patchset? Thanks, Gao Xiang