From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383757; b=ksj555xtHYzwLfqyk7Np6LorthgSc3qO34mVTlfvT5D6LOyU+sKy8hcMo0BIGZCNqj5U FT5DejLhgrmguq12HktB6WwK8yH0OnsYUFtXYcL4hn2fnFYUcPXfA9Otfe9Sml5JhKkTw SATX2GGCJ8kk/2JsAwYc57VcyvLNt5GZUu56TAxjg23xBQrb/M2hYoK1bEMS1I3BbDVq2 VabLYvmyUrk+afvYlrClyBIs3nOlrpyDvn5oqiXox+D75YTZ9/2EwVzOCGcDydCR6sSAg I5GfNLQX4zuSuQhek5gnf0E0NtXNYM1Cf2Wxupr92sKH9qJdlcNRC4ha/31DU4awPyw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383757; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=wRpTC07X3Qf/Q/SMmvK9ZGdUtPhrjYNVYcT/uOQ7voc=; b=hVOyRHOo7ExeCFl+qJEAmThHHIdDmByqzMfmEtArNVpKtr8TTzx/Kb/2P7DSEsMHSj0K UGbF/QElB8jRVT6EJkH7vi2snc4LIhq/oFv84CNfah/i+ViD3gCmEIUE76w5XNIkWlDuf sqGcEkcFTvmlPJc7LOBSUdAsOapLJjFB6U+BrXlE2B8JOk782xE5hWWBeWEOEGMoJNGY1 jrBHqYIxRhH+camkvTu5gSFHmOIa576vTDOZ5b0srPQWpwZAqNCPGFTNwOf1DYZ9HunaN 8o+GaPAVWehJGi9vgNCVaI03ufMP8Z0lF6C/iW4JmSbJC/w07yIqPAynN32+m8GVOvw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=J8+MiDdo; arc=none smtp.remote-ip=209.85.221.52 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 63093606A333 for ; Fri, 4 Dec 2026 11:29:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63093606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=J8+MiDdo Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4a7b8abe209so567721f8f.0 for ; Fri, 04 Dec 2026 03:29:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796383755; x=1796988555; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=wRpTC07X3Qf/Q/SMmvK9ZGdUtPhrjYNVYcT/uOQ7voc=; b=J8+MiDdox11yUmQkvBbsdZRxn0n2OwX0mpLis0achIPWrvvqkpeZi9kIk0wzrLlVQO EeFuQLsog9CHww2ErWGMkCwilQmGV81MsSQihevy0EwZUfxR1Sjbbwht0zaxMBz78MBk hmGgPzaagUIt696amU0rL5zu/PekkdPUyM6Pt33UpTJQQ2nJRO6Xprqwlc6X1H+1Ra8w UGmorjwltLzKJsVzH/MWc0pWP2vpxXuxQsiHYNnUIuqmdEkiPkgRdejMZFaG1XK+ecoy zCjRbUyLnBLad9FsYsnt6qbNs4nyVJWKI5EY6daLiQC6WPvzgIiN62bgRzeGnY4Bx/eS HuWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796383755; x=1796988555; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=wRpTC07X3Qf/Q/SMmvK9ZGdUtPhrjYNVYcT/uOQ7voc=; b=uTtiigRIBoXpmJ3Z4KNjJaYM1nXbCOchATG56D3GjWP5TPbyJMksZIkAcUMv/tMjJ/ 5cJ/B7HntgZ7Bqk46OVYTxEpVTjmBkSXQnuoEpqqK8rdsYKN/pca/VjUlHiAPFBPWOWT 35T2fxxOTMD8DbNBWzWz0N3/q0nmgEKnVJkCQ1kTyrx84qJqkYLUXaiHFY5yjrpHrRir VRoOd0krnn8iRuSp/kX4ewD7bNdO2iFtvgKFsVcLTw50tGiQioIkIKFisv3sqzeJDLa7 ls6lH0xjaw8KsA8gZECERKKzVynqAaBcBHvKIMCPFLzlfbm8t+BEGqzAy9Qx8AvUp6zW +o4w== X-Forwarded-Encrypted: i=1; AL+hErGm2dxtcEtjYdX54OnkPjQh8qWaEzINEu9M61qyRuZBl/mEKRwFppvhaKk4o8fRMzA1NH7Xclm+w3zwIzrz@vger.kernel.org X-Gm-Message-State: APuU4Z+5W6MhBIh2aQvP+hjm6/r8pf1D9IbGNUh7AQIU7B+k8rX/3F7u qgdr/SVSUkAJtXh5sbkx9B6xoGftDf3P6ksYq3TO4YiFNY/6RivHd1pD X-Gm-Gg: AZFdTZejlm4SO7kTpC7DMkpv6w2dbIBtGVxNZloznfyYEMCkqRTkrUaXykVFILRKVsW AUErkGQU1C4iYSUXpicrbYiTuxKDxtlSbj9z/QGiEg218fuR9eNfblhrwyMoYFGL20GDy1md000 kYw/ZaNwpZ6oNc8XkNJc6bKti1NahENm5yz5ov78rm62FmZ7boKriQ2C9x3FZf8Q3jQmkJfEZUC nNYR3Bxt+x1ZVrYyWQjhAR11jFeaEQoeirmb58bP4p8pZDEzx7YMUqJuiJrpzOpGB4i6SNoqNNL w/sAbVWue/O299FwF5TVX7lqQFxspqHrVS0Pr30r1UVozeLKkxRx2IxL0gQjwX/8E5Cd8ysp4nJ TTMbyknuATh5lP2OCA6/xsh5CZ3pRJV5E/S7oEbpdeCVJe4WLf3V3MXy0ag059+XyzUjTrkbB+D StLnaj467gZG/2KSRIuglEPKbeKMi2r3HEsxWr9Ve4h5Jhz0l1TA983dxfgWTd1phUlxUX6XrEk OqIL8Bygp4phCYIa4i4gQwSssRA0tmleU4b2AGFbwhrHsQl3WHqQVJTv4Ec7kVCVph1ufh4Nx0S 2XBu1wCHUuIP01IjBTt1dwo2G0rTnQaTckaiyvcjjxn491B4G39tltw= X-Received: by 2002:a05:6000:2011:b0:4a8:cf12:6f34 with SMTP id ffacd0b85a97d-4d1e236036dmr3652946f8f.4.1796383754713; Fri, 04 Dec 2026 03:29:14 -0800 (PST) Received: from [192.168.1.22] ([83.231.69.9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d1724ace7csm4380050f8f.14.2026.12.04.03.29.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 03:29:14 -0800 (PST) Message-ID: Date: Fri, 4 Dec 2026 12:29:10 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 25/35] hugetlbfs: zero all hugetlbfs-specific fields of new inodes To: "David Hildenbrand (Arm)" , 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" Cc: 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 References: <20261203-hugetlb_fixes_2-v2-0-9bbeabb555d2@kernel.org> <20261203-hugetlb_fixes_2-v2-25-9bbeabb555d2@kernel.org> Content-Language: en-US From: "Jose A. Perez de Azpillaga" In-Reply-To: <20261203-hugetlb_fixes_2-v2-25-9bbeabb555d2@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/3/26 12:37 PM, 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) LGTM: Reviewed-by: Jose A. Perez de Azpillaga -- cheers, jose a. p-a