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 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75F38C4332F for ; Wed, 2 Mar 2022 20:19:24 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nPVRV-0002zp-0s; Wed, 02 Mar 2022 20:19:23 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nPVRU-0002zi-0g for linux-f2fs-devel@lists.sourceforge.net; Wed, 02 Mar 2022 20:19:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Uy+qIY61mUv01aVZ77KYqcI4VQ6CnEr5ehBFaIlKwdg=; b=AV2n1iHpObMWkvdcT4mZjoOhbi wORQgjawqPPak/j0g/CRf7EC/qX89OO95Q+nYLYnKevGcpHmZqQQ2y/8RAvzh4LMH0UJOoZ4NBdSx RzVXaW5rZEk8vjZRKqxjoUIFzjOEu/VaFHVNWyBP3LUPbnfCspaYy2doHIaq9cnO9uUg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Uy+qIY61mUv01aVZ77KYqcI4VQ6CnEr5ehBFaIlKwdg=; b=dJo7iKHKxpk495g6UstgAIzziG sZHgspJMjdNUKpenv6NEo5nZy7q+r9mk4W1i5h+EmvAZOATEWt0J7WW5tBC/5g156NvI7ZlIXBPzC MCiGZXiXgHFNaj3tKQSbW29WVCuGcjZli2RbYGlqNekXIlMFTes+Q6Z+Yr4UGQZvMhBM=; Received: from mail-lj1-f194.google.com ([209.85.208.194]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1nPVRQ-002uzC-6e for linux-f2fs-devel@lists.sourceforge.net; Wed, 02 Mar 2022 20:19:22 +0000 Received: by mail-lj1-f194.google.com with SMTP id r20so3929154ljj.1 for ; Wed, 02 Mar 2022 12:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uy+qIY61mUv01aVZ77KYqcI4VQ6CnEr5ehBFaIlKwdg=; b=Be+smD91jIehBxsphVP8GxPmG9fZ7UzsziFVI8sCcayH4ghcjVwFadN69qX3SSZZfA w/nKcppYscRVDTynDM99u+3Int1mDvzuW1vHPoDdJ+8JxYLDdH7+xaY9DZL7COnmW4q3 yEVm7FisHcBkdW7xwzBny/SyDipBoZU1ONqUc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uy+qIY61mUv01aVZ77KYqcI4VQ6CnEr5ehBFaIlKwdg=; b=Bvsaf0ye5qMT5N9bIXsTLowLfIoimP6hbZLyK0mPmrJjqrfuN4Hu9F5HWjGPAR6phc QhnGsKPqvig290N0tVlorVa2qU3m66ymkhMqF7vFC3tn0vAlyg8Atvt5DFbFQCkXShyY yI5wjkqdexF8HmPnb/7iIM5Z21+ERxZLK5uNxanRUVc+OqA4eO45dIzxZeUUyCiyGnYi gzIsReufANh4qTtY7yRz9yMUg9Xo4k2v1XPKW1c6ZSbdY1d+8g9ojqpCEcBqevYTavyk a7hmokAFpSm7mzUHHRlTt79Ou1jNqnSNQhX6BDxsiRC2f9Ji3dv6SIPfpHuKWfGsOBWQ Lq/w== X-Gm-Message-State: AOAM533YEwtVUHNOoWqjX2t3SEFOyl6MGCMLZo1rL7sn4KP95vyV5t+o S7h965sNaUCpEqAzdjYTBQWwnm4GYjVFAQLlTck= X-Google-Smtp-Source: ABdhPJwbXe58Cocjs6m+v7xqtOmlxSKHRWHSCt1SM0Q3fuV5tULMJGJjL68GL5jGgC/WFM3QUJfxSA== X-Received: by 2002:a2e:3c04:0:b0:238:eb48:5fc8 with SMTP id j4-20020a2e3c04000000b00238eb485fc8mr21665525lja.148.1646252353670; Wed, 02 Mar 2022 12:19:13 -0800 (PST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id q4-20020ac25a04000000b0044315b39a14sm8891lfn.285.2022.03.02.12.19.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Mar 2022 12:19:13 -0800 (PST) Received: by mail-lj1-f170.google.com with SMTP id v28so3894680ljv.9 for ; Wed, 02 Mar 2022 12:19:12 -0800 (PST) X-Received: by 2002:a2e:3013:0:b0:246:2ca9:365e with SMTP id w19-20020a2e3013000000b002462ca9365emr21092331ljw.291.1646252342192; Wed, 02 Mar 2022 12:19:02 -0800 (PST) MIME-Version: 1.0 References: <282f0f8d-f491-26fc-6ae0-604b367a5a1a@amd.com> <7D0C2A5D-500E-4F38-AD0C-A76E132A390E@kernel.org> <73fa82a20910c06784be2352a655acc59e9942ea.camel@HansenPartnership.com> <7dc860874d434d2288f36730d8ea3312@AcuMS.aculab.com> <0ced2b155b984882b39e895f0211037c@AcuMS.aculab.com> <78ccb184-405e-da93-1e02-078f90d2b9bc@rasmusvillemoes.dk> <202203021158.DB5204A0@keescook> In-Reply-To: <202203021158.DB5204A0@keescook> From: Linus Torvalds Date: Wed, 2 Mar 2022 12:18:45 -0800 X-Gmail-Original-Message-ID: Message-ID: To: Kees Cook X-Headers-End: 1nPVRQ-002uzC-6e Subject: Re: [f2fs-dev] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "alsa-devel@alsa-project.org" , "linux-aspeed@lists.ozlabs.org" , "Gustavo A. R. Silva" , "linux-iio@vger.kernel.org" , "nouveau@lists.freedesktop.org" , Rasmus Villemoes , dri-devel , James Bottomley , Cristiano Giuffrida , "Bos, H.J." , "samba-technical@lists.samba.org" , "linux1394-devel@lists.sourceforge.net" , "drbd-dev@lists.linbit.com" , linux-arch , CIFS , KVM list , linux-scsi , linux-rdma , "linux-staging@lists.linux.dev" , amd-gfx list , Jason Gunthorpe , "intel-wired-lan@lists.osuosl.org" , "kgdb-bugreport@lists.sourceforge.net" , "bcm-kernel-feedback-list@broadcom.com" , Dan Carpenter , Linux Media Mailing List , Arnd Bergman , Linux PM , intel-gfx , Brian Johannesmeyer , Nathan Chancellor , linux-fsdevel , Christophe JAILLET , Jakob Koschel , "v9fs-developer@lists.sourceforge.net" , linux-tegra , Thomas Gleixner , Andy Shevchenko , Linux ARM , "linux-sgx@vger.kernel.org" , linux-block , Netdev , "linux-usb@vger.kernel.org" , linux-wireless , Linux Kernel Mailing List , Linux F2FS Dev Mailing List , David Laight , "tipc-discussion@lists.sourceforge.net" , Linux Crypto Mailing List , dma , "linux-mediatek@lists.infradead.org" , Andrew Morton , linuxppc-dev , =?UTF-8?Q?Christian_K=C3=B6nig?= , Mike Rapoport Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Mar 2, 2022 at 12:07 PM Kees Cook wrote: > > I've long wanted to change kfree() to explicitly set pointers to NULL on > free. https://github.com/KSPP/linux/issues/87 We've had this discussion with the gcc people in the past, and gcc actually has some support for it, but it's sadly tied to the actual function name (ie gcc has some special-casing for "free()") See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94527 for some of that discussion. Oh, and I see some patch actually got merged since I looked there last so that you can mark "deallocator" functions, but I think it's only for the context matching, not for actually killing accesses to the pointer afterwards. Linus _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel