Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3386744iob; Sat, 7 May 2022 04:00:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/TAxM6oO1RmA9RUs0iYUHAb2v7tgrg0cmnS6MNrA6W8NzqnW0KWcL/EhRupl+6jkpZX5z X-Received: by 2002:a17:903:1107:b0:15e:f451:4034 with SMTP id n7-20020a170903110700b0015ef4514034mr4858451plh.3.1651921239604; Sat, 07 May 2022 04:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651921239; cv=none; d=google.com; s=arc-20160816; b=vV5WyemIoNIKxX96C14NTNQczmwhVR+b47Gtk0BNdpu+y3/9tawbcOh0G0Zz8pEzPp hVpVCcpkUkTFT9ZCqRAgcKH6scTXcA8j0JgW9JEOVcT1zI7nQKbNeL0n4ufar+1aNsAK MBXdrbn6mVIXMkQDdhf58s8h3/h/+zGVTJvpRYlTsIXY0sygLtW2K3FX4qBgPfI6gqik 1d4aMRVLmTx8Cs1Fy3QSvQrrucZtW5fH3EOQ9k3/EXDVqrSRVHdtNce4/RSy+8YmoXL/ 6qhgsqjJksR7svuBE7klaq5dfetOXAUOWc7tALpcZpWKvZs4h/Hw1OpVMbTTd0BG9lEN CS0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=YKR1p2XpapTkYTRRGdf56YSSJBMEPrgZBznxidBKLms=; b=M7z4wnSYCHEP69e8s1nQd92Ixpsx80Rt9nO6d/5UWBr1t/taMmZ3cnbL0zzh8gMJ97 FYUqldcZklnLVl5mlHZsj6KwGbN7nzYs+5CQW9qLr8/UoCbzgx9CKgKoB642W9icPMSk vevHCHudaX//zUeyNhoEFmwyjDCmH79zjmz75iVJlgq5f1Y+tc/uy52j7I8WsOMZOGwQ A67gWLHAzmSTqlxc3g1tP1DkWht1Qv0nr2oBV/OYDl9WrnAvzRkCjyGrjP3to7vUelnX YB4E3001YczOe/CoNofzoZrC+85kuwOrqSAiq05FqAgh6jXExrWOr12e5nlAC3PxonVU 5wUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=FifVGujk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a635a4c000000b003ab22403d93si7163258pgm.109.2022.05.07.04.00.22; Sat, 07 May 2022 04:00:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=FifVGujk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443747AbiEFQ1a (ORCPT + 99 others); Fri, 6 May 2022 12:27:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443746AbiEFQ12 (ORCPT ); Fri, 6 May 2022 12:27:28 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A676B097 for ; Fri, 6 May 2022 09:23:44 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id e189so7981029oia.8 for ; Fri, 06 May 2022 09:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YKR1p2XpapTkYTRRGdf56YSSJBMEPrgZBznxidBKLms=; b=FifVGujk5CYZw9INUWSaYsjuguzlc6FVqyvGQxK+CXMFIAj34CHTH4MURITWp/780b hpvkAYUtMaF6Y+GzmxmlMQgIa1gomt5iALx1LC0Z1BlYpyETqLgXJ3PoIz6nVH7f2OlB f3NTsF3hqDCdqtrJbaeOGeV+xAb4SKTXTKGG0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YKR1p2XpapTkYTRRGdf56YSSJBMEPrgZBznxidBKLms=; b=c+lpQrL92e9APLi5/Ql79j6Y8TpXqIAaf5tuiQ80dL1uDVlH4AubGQzkROv9R7x8xL 1xy2Z/1yJME1UYk7cGg4GDFov6KTiQorlcoj9FPTxWR6r45/Vniu56QTzJ96Y1m3F2wi BJqAuAWiNceSUXzeMmr3P8h2jW3LKLC+uTUvWCZpIvtwfZbyWHoMC5iAJh26OXj6RWhW kEBZvFnaXg8nr/+xoskObyA4Izuv1HsbJ2dFEzVd9xbueAjcnSgFhYLpKmT52BnSWCBj jhGqYVtU6BqIXj241lKti6ejR/7NE8oq9pI6K6o37ZFFiSJXLhEnanHNxCTmAJIwgwA8 5V7A== X-Gm-Message-State: AOAM533Wh3oqTyRzzFGi3dUBWp4uiEgkrdQRmhgd+/K+Jhif42VMGK9q bdqZYgb88MssYdYBiY0HLdyCPg== X-Received: by 2002:a05:6808:180f:b0:326:60a9:501b with SMTP id bh15-20020a056808180f00b0032660a9501bmr5147973oib.91.1651854224289; Fri, 06 May 2022 09:23:44 -0700 (PDT) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id p11-20020a4ab38b000000b0035eb4e5a6c2sm1981364ooo.24.2022.05.06.09.23.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 May 2022 09:23:43 -0700 (PDT) Subject: Re: [Ksummit-discuss] uninitialized variables bugs To: Arnd Bergmann , Dan Carpenter Cc: Nathan Chancellor , kbuild@lists.01.org, Linux Kernel Mailing List , ksummit , kbuild test robot , Shuah Khan References: <20220506091338.GE4031@kadam> From: Shuah Khan Message-ID: Date: Fri, 6 May 2022 10:23:43 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/6/22 5:56 AM, Arnd Bergmann wrote: > On Fri, May 6, 2022 at 11:13 AM Dan Carpenter wrote: > >> >> It's frustrating. Sometimes the false positives are hard to analyse >> because I have to read through multiple functions. A lot of times >> when I write a patch and a commit message Nathan has already fixed it >> so it's just a waste of time. > > Agreed. I'm not actually checking for those warnings on gcc any more, > but just the clang warnings point to a bigger problem. > >> It's risky as well. The Smatch check for uninitialized variables was >> broken for most of 2021. Nathan sometimes goes on vacation. >> >> I guess I would hope that one day we can turn on the GCC uninitialized >> variable warnings again. That would mean silencing false positives >> which a lot of people don't want to do... Maybe Clang has fewer false >> positives than GCC? > I would like to throw resource leak bugs in the mix. I am finding cppcheck has been effective in finding them. I am seeing a lot of file pointer leaks in error legs in kselftest code error paths. I have a few fixes in the works to send out. We could discuss this topic at the LPC Kernel Testing and Dependability mini-conf as well. thanks, -- Shuah