From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796472935; b=ggYHkmi+1i+m6DsIewIVgY8IhA1DRWwkMr9Fvbrh0y/w2DFOyYnt1NZ988tBH4CUOs+r NdZpDgCE8RBV0OgXW/ksoFfxWDsGLJZ0kareECOM2yOXU/OASpgqFG6FFtJfRjMvCXtnQ PEPWo/lu3Fkn2jSwuEUr4BSYUfOL9l9C6E5m+GMBhdLg73Rrr6NqOrrL1sG7C9zhRxOQn f6hBtECMXTWFmge77tvq1hEz85YE8t1m0DM4/Ypao+GsWXcSXJJ75KonitdsZP2qDUjy+ U8wPtrVRXhoCpUMlV29v4gure1azBg+Afd5akWzQnjfQ2FDvLPI/0LZHBUPOfspeq1A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796472935; 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:From:Subject:To:Cc:References: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=eLK3Bw1NzOKzIUF0h8AHZZnNbgtzT0hGeZiU/uLFLtE=; b=DvPWl2YuuQWgpn42kHNRzZvmynKQub5AA6eKEplYUVHHDJN3QULUCakELkQBmea9hdsk CwgMVQ4D9zVRS0JTJioq6WLbuhOV8BtNeS5/DB6nZEL03zq+IZ4LOq7uCXv7OmO5G55tI LRYp+/U/TYve72Ao/ZSood/O5Q60CPB+8amr2BEOI2IBKtfYx9Ftu3+tPADDbhoF4cY1h F9UB/sXysqEPmby/NUTeE07KwBO7ot64e+RLyIRMCpprtCQDG50HzNwDbWupHLT0WS8G+ JB3UdDXunYLfF4llypiRPzXmdDp6yud1qEnyw4h3JUtyqiauUYdTQ8Lp7du2nPvS8mA== 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=A27ZWf0g; arc=none smtp.remote-ip=209.85.128.44 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 659A7606A332 for ; Sat, 5 Dec 2026 12:15:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 659A7606A332 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=A27ZWf0g Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4bb6057b333so8813655e9.3 for ; Sat, 05 Dec 2026 04:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796472934; x=1797077734; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=eLK3Bw1NzOKzIUF0h8AHZZnNbgtzT0hGeZiU/uLFLtE=; b=A27ZWf0g8BtM216MkrTqJEUMNmk3OIY+m/bwoFa5a1LCK/eVnRmia2oXCcRs6X2h7u G68pdmy4jFxLHd/CoSPhz79KU112g7jxm969ZQH0tWEGRubjOKUg4fMwzekkBbeAjn+m M5s3uQGrlpbHOlk1eiXjSY/AbQaboMTjfAP+u/y+OThU9X2SXvT1LweKit7R8heLE8PD 2xnbtrWf2qvZoiuzx5ZEZo20OWdhWJqIBzs8zj+FyXZ2bOK86B7MdmTyKKTzzk3OMWc+ tnV5qmiis4UxETj+LAFJF4c7LfFQ2Zis791V2fIT4ZY4YHXNwXKirEE0ecjRdHqoV5yR bygA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796472934; x=1797077734; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from: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=eLK3Bw1NzOKzIUF0h8AHZZnNbgtzT0hGeZiU/uLFLtE=; b=c979CeOM6+G6fQIWrJ3ojNG2cUbODBWqCPWGUT5cjB+JWleZxKAaJRV26vrt6uF2c5 9bDV82N1ys3oADwUXZy9VyO3DO20i5PROnJeYTptxOxAwXENTZjrQAUscOWeZJn4Sngw lHwnBYyDlAzhj2/1oD2Y5McX6NKxkQABK1FZq0o+tRlXaRF/Gae967YV+JwJCphVXtfO VARTUqBU2g0NBk2oMZMYQ0G7+xRn+Ka6y+30JKeXnb526D3AOqM10voK48XFQlZUJ3y1 0Tn+vRkWcmv62aDgSfLpTIvWC7/EHIeK7oD66Gr8O/7rWLNdRXag5eUGkwymjoKPHEge /Zcw== X-Forwarded-Encrypted: i=1; AL+hErEz5yhCcoJiuJKwEZGtfINrO9LWldk0Ahurl+cdJMV9cry30zmSDGg7L6RV0PSu+zIDev/QGYC1dIw=@vger.kernel.org X-Gm-Message-State: APuU4Z8UEb95R9BAS3ZbRkwSYLUwYQHguZM92+96g77jbIvSSVblX2V5 iEI1/AK1lWjiBv1kKOohpousOmuU3lyQ092dwE46WVBq+NWCuKEC7sB+ X-Gm-Gg: AZFdTZduLVsujoKyljG/t/ESuxzzEnW/Fd3nZHqgQV9+1jwjxBgYLgNlhYo2AuRhfqI 32oqSdLSpTdpcAGZ6vPAc2sPuJMSumnkHXfTuP2ihUkihGiQA2QQVcQgBfZxSt52H/0FS0U13Ke nifxfHaGNr14/iBBfKXUN7Tma3mIo8gEOrg7dhD/lLJOyepJJwkjaPjBDt6rkKlOT4+ZlN/54n8 oujSEI3G7gE1N0uq+g01UHXLeoU5zu6Y1km+tLrERwGxsa1gMLYyHaFd2Wx1snirdfV618GynNV ckqsPWz5VhL/D3UF0oVZpnummVoepGEurrLgy6a6a7VjHABiVRPbOalCNoR21TY4e0P+Y79i/qb IlYLHRfuvJ8ydHbHl0dRbyDZs/Fp9A1rfG5P0ljs6KBiAKEMBXnJAW54ox1xpMd7uaAy7JuEdge GNThUMvIjAdzj4zQzT/3mx23rpzRZOdJPiIaHwidBfcBnFYey1GgnSK8cMe9LFiDuLiiQQyimqr y3YyufgVBZ3Rvkxn/Fu82mCjTjdaHLdIHwjaO8DIGxvh8t4Ph+ByQNx6pv6J1KQF3z0dCwqgOvf YO8bYbHDX3TwpoYh3rItcUAgYHXAECix8hmGqP2byTt0a4T133tK17k= X-Received: by 2002:a05:600c:a4d:b0:4af:c210:5b3f with SMTP id 5b1f17b1804b1-4bbeb8c92b2mr93634795e9.24.1796472933602; Sat, 05 Dec 2026 04:15:33 -0800 (PST) Received: from [192.168.1.22] ([83.231.69.9]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbea29f8casm130670575e9.9.2026.12.05.04.15.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Dec 2026 04:15:32 -0800 (PST) Message-ID: Date: Sat, 5 Dec 2026 13:15:29 +0100 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 User-Agent: Mozilla Thunderbird From: "Jose A. Perez de Azpillaga" Subject: Re: [PATCH v2 35/35] mm/hugetlb: resolve protnone faults without a uffd bit 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 References: <20261203-hugetlb_fixes_2-v2-0-9bbeabb555d2@kernel.org> <20261203-hugetlb_fixes_2-v2-35-9bbeabb555d2@kernel.org> Content-Language: en-US In-Reply-To: <20261203-hugetlb_fixes_2-v2-35-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: > From: Chris Mason > > hugetlb_fault() only restores the protection of protnone entries that > have the uffd bit set, assuming that accessible VMAs cannot have other > protnone entries. If such an entry existed nevertheless, any access to > it would result in an endless fault loop. > > We are not aware of a way to trigger this: paths that drop the uffd bit > (fork(), mremap(), unregistering) restore the protection, and > remove_migration_pte() only drops the uffd bit for writable migration > entries, which cannot be created from protnone entries. > > Let's be defensive and make any protnone entry in an accessible VMA > accessible again, unless it is an RWP fault that has to be reported to > user space, like do_numa_page() does for small folios. > > Signed-off-by: Chris Mason > [ david: adjust comments and description ] > Signed-off-by: David Hildenbrand (Arm) LGTM: Reviewed-by: Jose A. Perez de Azpillaga -- cheers, jose a. p-a