From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.219 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796366460; b=TF84YzTvL//U8MlSDkzCVUOcvNe7CmdYxjRTx9ib39PCFdnejgZrpwO3ueyBK0CskiZe iEUPJMMgSCtunRxdQ+TY9DtlDCKRu0KAG0AxXnzmEVz5G84jtNmzQ3yYU2vmFj73azBPk 5SDFnOTELyf826a0/232R/ucdnJd5mjfD5XWQOWxhepJFrE/ooNB0Tte5z8f4ZTAyHsj+ jauLA9Z6znsIwJ0KeJqPDe22X9gAw3HaNEsXNSfC8WQfeRnjZzR/jOJQLQ2lEEAnzWZVO ABBjoJrjVZVKLJFN4M6Drpkmq5McvW9YhPbjiqdQxZ24dQPt0KB71iqeCREZ0neGOEA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796366460; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Content-Type:Mime-Version:Subject:From: In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References: To:X-Mailer; bh=sqbCAnpJ7plARebxjEvCoOM/pkMQmPhSP8ZpsoVULaw=; b=MuRt5k4Cyxor7fAwdfunCefOIgB2FIwYp+HwWt4hGdukFiqNluHB4EF4deWgSTwp1UKJ WDD5kphUJqAv+mLGJ5NjrxYGkrmSfLzsqKN4RXuuj1EYR2E8gM0fqdyUmXXpyhYNUwLzN 6ru7FstLDmRLittdgN56njA1PrndBOHD4j9s0UrPqOkrKhFMxjDoSlAwjebNvtz4wm91u 6RTYLd+xg1dy8fr8e7XuqFUMDTvR8PvCWUMkt2GDiH7ydXJXh4Qc7BwHamS7ol8KkM5FT iJ7vB8rB1cf0G3YowYYI6UD3cCrF1PAK6lXt46KMACG5s0rD7grfg0oVwr/WETy87Hg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=xqt4FS6u; arc=none smtp.remote-ip=95.215.58.219 Received: from mta1.migadu.com (out-219.mta1.migadu.com [95.215.58.219]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B09E9606A32D for ; Fri, 4 Dec 2026 06:40:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B09E9606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=xqt4FS6u X-Envelope-To: linux-fsdevel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=TEGRUCEYUh/PU1YymPmYKMayJqhyDZajkK1kIm9YUXw=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796366457; v=1; x=1796971257; b=xqt4FS6uaRQLWy1KRIA+1ZcjhKxDQ/NsIsyxtjVAY8f4OTE5AKa313dwZ214hCwUjXRrqjqE fNwXIlLO/pJVf7w4m+C4SLT6kXuKAYc0xgNJOxYewgJTbcBmBXRJTj4Hz0NwPPvvH0dT5gXfWco xuYypq0MXrwGnBFmXz/DdIu0= X-Envelope-To: linux-fsdevel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id e2a6430a870bbd1f; Fri, 04 Dec 2026 06:40:56 +0000 X-Mizu-Trace-ID: e2a6430a870bbd1f X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset=us-ascii X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\)) Subject: Re: [PATCH v2 25/35] hugetlbfs: zero all hugetlbfs-specific fields of new inodes From: Muchun Song In-Reply-To: <20261203-hugetlb_fixes_2-v2-25-9bbeabb555d2@kernel.org> Date: Fri, 4 Dec 2026 14:29:36 +0800 Cc: Muchun Song , Oscar Salvador , Andrew Morton , Hongfu Li , Jinmeng Zhou , Mina Almasry , Davidlohr Bueso , Naoya Horiguchi , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Michal Hocko , Jonathan Corbet , Shuah Khan , Randy Dunlap , Vivek Kasireddy , Mel Gorman , Hugh Dickins , Baolin Wang , Dave Airlie , Jason Gunthorpe , Andy Whitcroft , Roman Gushchin , Barry Song , Andrea Arcangeli , Lorenzo Stoakes , Suren Baghdasaryan , Shakeel Butt , Pedro Falcato , Jann Horn , Guillaume Morin , Yang Shi , James Houghton , Rik van Riel , Harry Yoo , Lance Yang , Axel Rasmussen , Peter Xu , Sasha Levin , Kiryl Shutsemau , Christian Brauner , "Steven Rostedt (Google)" , Hongbo Li , Gregory Price , Zi Yan , Joshua Hahn , Rakie Kim , Ying Huang , Matthew Brost , Byungchul Park , Alistair Popple , Andi Kleen , David Rientjes , Joern Engel , "Aneesh Kumar K.V" , linux-mm@kvack.org, linux-doc@vger.kernel.org, Gerd Hoffmann , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Johannes Weiner , Chris Mason , Jiaqi Yan , Sashiko Content-Transfer-Encoding: 7bit Message-Id: <230F248B-46DA-4EAE-926B-2A30ACA97EB0@linux.dev> References: <20261203-hugetlb_fixes_2-v2-0-9bbeabb555d2@kernel.org> <20261203-hugetlb_fixes_2-v2-25-9bbeabb555d2@kernel.org> To: "David Hildenbrand (Arm)" X-Mailer: Apple Mail (2.3901.200.71.1.16) > On Dec 3, 2026, at 19:37, David Hildenbrand (Arm) wrote: > > hugetlbfs_get_inode() initializes the seals of new hugetlbfs inodes, and > the hugetlbfs inode tracepoints record them. > > However, we don't initialize the seals in two cases: > > (1) For the root inode through hugetlbfs_get_root() > > (2) For an inode that alloc_inode() destroys right away because > inode_init_always() failed. > > Consequently, when such an inode is evicted or destroyed with the > tracepoints enabled, we record stale seals, and KMSAN reports an > uninit-value. > > Reproduced by closing a hugetlb memfd with seals, and mounting and > unmounting hugetlbfs with the hugetlbfs_evict_inode tracepoint enabled: > the root inode reports the seals of the memfd. > > Let's fix it by zeroing all hugetlbfs-specific inode fields when > allocating the inode in hugetlbfs_alloc_inode(). > > We can now drop the manual initialization of resv_map in > hugetlbfs_get_root(). > > This has low urgency, as it only affects the tracepoints. No need to CC > stable. > > Fixes: 318580ad7f28 ("hugetlbfs: support tracepoint") > Reported-by: Sashiko > Signed-off-by: David Hildenbrand (Arm) Acked-by: Muchun Song (ByteDance) Thanks.