From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.25 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796366460; b=UFS41vy7EyVcsY19eMZ+w9kefRhzBTOICGuOKScSj81xekYr67mx0URdf9zUqcOFLwrZ NjtioF4azvkVWhlsKKptqAsrVHGD1g1GXZrjIphjqJltOjuIk86Fm8YT18bihEElb0wvD duP1SmkY6L/Ib0pS89QHaI7jIs7ptm5rcFmTwl7jkPhpntH2EGDa0xulGOlwVZ3DEQSwQ +zSuOtRabuTHWa+MFsgb7/1X7+wBwBSQyOSloVTCoyEwiiCUfc1wcXuJFt74z6OiqPdHg lZ0h3fWDWXe1Td9srTOkX3FsFdRVSlHOo93IqkLLRgNwwrF8TZT/q0o2+4bCcnaskog== 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=g4ohvPow5HuoxU+Nenq/Rd4DZXnOgfDeg8tgnKOlLgwKlTsNkE+SZboiG6DFNONeQ6cP 60uCxx5LmLwgdFMiQ/LE4L0yH2/v99yFoRnxXxSTVadGHbWx7YKL6QnfLta+W8MBmDiS1 TpSAwaVw3w4hkx5W7CmZjAVxmqpPL2sJejQhAXkpwMFEOYiuiAPQ8+DMHN3FU05D/DMQq AXqldfeuU2rl2x0YocrrhEnm2NWmo7pCC4ghwarEElREYgxkRNpkvpV2FA2pOq1Mr7F/H Bw0bghZ6Y6Eo4rbBXC7K5ASskKsG6ucJYlPlc/uU+hrvojmEF+kDcy1ONMOh92RIcTg== 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=91.218.175.25 Received: from mta0.migadu.com (out-25.mta0.migadu.com [91.218.175.25]) (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 7F008606A32C for ; Fri, 4 Dec 2026 06:40:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7F008606A32C 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-doc@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-doc@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-doc@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.