Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1636991rdb; Mon, 8 Jan 2024 05:56:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsv12CXZoxqP/MDwQispSf+WcKF/iDZ5XFT87i165yeUyhLofEOFBU0Z+9DQC1CLpJN1M4 X-Received: by 2002:a6b:ce14:0:b0:7bb:a85b:e67f with SMTP id p20-20020a6bce14000000b007bba85be67fmr4917515iob.1.1704722167423; Mon, 08 Jan 2024 05:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704722167; cv=none; d=google.com; s=arc-20160816; b=txjnAn7O1wvNrWmMeisRYTMMj5zSitb8yly2EaVhZC/S+zfAUtu8cBxXoPvIMEpSLm kZb8iLXN03sn8AjEXQd1fJrwtnRZzBpXqW+U0XN7XZoKwMLZQevOY+JdcTYHsTSfOn00 vypPAv2QD8iM2j1/GTrq0t4UDiI6lRKDjl6tEiP2vjfoee3w7DjEN8yx+ysyfKZRJNwZ UU2zvKKMT8V10l/RPf9i2/ijXIH9H6qtaxLyxKcPyPkd8E7q0ANHFN168yTXgZRtQkN0 B+WIQGhjoT++ZW6kbRSfVJ+d8vJyTZ59G1SVZSHp+ldjjkCn1oN8df4291Z4MPm6Pvvs WUiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:from:content-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:cc:to:references :in-reply-to:organization:dkim-signature; bh=xIbiAoj2Z3CYeI3SIW7dD3XbJpcWqFJ6BlUheRPsgEg=; fh=9A272QN6uIqAeSIw4b2b5ykHO7d1n9nQjPoTq5tdWZg=; b=QOHFWi9z3znKD1rHKIHATiwK69pBZ8Z6Rx2EmpJrFAnWL1uNhD2f+9KqLKMXG/q5PO WhjkDtUhnRaQnek8mssUrUKLSfHX7Aqcbeq+y9aF28+FE72rbtK/+8WlAXy6DFGckZBd 7Rd0lCogdlY0qZ0E2Uf5/npGnKKu8aJk2vkpkaPOXpyIOzg7ahTyXKvGNIZMb7cYNet4 T4N28NvW7sL2Ckm1bXrgD7sbqM9XjatBAsUs+cqbeDhgwwqcm5ABER3UaFkd/pCGtiy2 0l1DTh7fi40+ONL10FGCAJbVgDi9GADQ4k/5qo4gGt7xEE/s7ICS+7isJ7+BJhG1d9nW Hl2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ayGPonu+; spf=pass (google.com: domain of linux-kernel+bounces-19655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m20-20020a6562d4000000b005cdf8b1fcdasi5800527pgv.194.2024.01.08.05.56.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 05:56:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ayGPonu+; spf=pass (google.com: domain of linux-kernel+bounces-19655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E7D3A282F48 for ; Mon, 8 Jan 2024 13:56:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6E1046535; Mon, 8 Jan 2024 13:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ayGPonu+" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5366A45BE9 for ; Mon, 8 Jan 2024 13:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704722155; 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=xIbiAoj2Z3CYeI3SIW7dD3XbJpcWqFJ6BlUheRPsgEg=; b=ayGPonu+/W6KP2m09nxEcHr3X7oa1lzNQ4u6ckSMfFOfofC4cvbhxQdt6YNo6YeMPRM9hu yGVgRBuiZIOLG3G4K7Y5aoDta/dmCt7V0AInVzy4pOf7vYxA2k+YwnFfZmkGDXXIacWhHk NFlsXRSBIm3a/ynCvB2Isshk8atbySA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-212-m1uR15DwN7WbwmdvBHyrcg-1; Mon, 08 Jan 2024 08:55:52 -0500 X-MC-Unique: m1uR15DwN7WbwmdvBHyrcg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4C6A832D60; Mon, 8 Jan 2024 13:55:51 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 001B8C15E6A; Mon, 8 Jan 2024 13:55:50 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 In-Reply-To: <20240108112713.20533-1-duminjie@vivo.com> References: <20240108112713.20533-1-duminjie@vivo.com> To: Minjie Du Cc: dhowells@redhat.com, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_cookie() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1521939.1704720813.1@warthog.procyon.org.uk> From: David Howells Date: Mon, 08 Jan 2024 13:55:50 +0000 Message-ID: <1522748.1704722150@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 Minjie Du wrote: > linux-cachefs@redhat.com (moderated > list:FILESYSTEMS [NETFS LIBRARY]), linux-fsdevel@vger.kernel.org (open > list:FILESYSTEMS [NETFS LIBRARY]), linux-kernel@vger.kernel.org (open list) In future, could you edit the comments out of the email addresses, please? > key might contain private information, so use kfree_sensitive to free it. > In fscache_free_cookie() use kfree_sensitive(). There's no real point. These are written as filenames (possibly base64-ish encoded) on disk by cachefiles and represent the information given to the server to indicate the file (in afs, for example, that's cell name, volume name, vnode number). David