From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.216 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792576203; b=hK7cNBWKKaNVs/iQgnveaiai+dp8FpuIBp2jvJl5gHbSYOAATELooYXcpO5DC3EB06Zc YRUiajFbPw5mLMMqLfYvj8vCiq2wttdTq8xPIKTCHQBif6NomzWN1u6iF1z+Jwy7Wh3eU GurseN50ymKrwyt0nSr0EkoZQ0vl9HDQ9SyE4mPdVB+kDu9yPusmagpgylLbBFrqU99QV jrj/zHpVj7EmvSLq1Hzny1BbfYj7f+S3D1wlDKwgfIqiEqMvzn3w2/aELhvjbHyArCVgv PMGcXurohTst7r9UHvjcM8WbjNE1HLkErE+3Wlxayk4e4BqE61bF3N5x+fRsy0KSAAw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792576203; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=G53IIIXhDfjfjxT9ZDHI2vAikXwb38otkA5QxpRYrN8=; b=epRk2Onw7q2WJ549vDW+4xxD4cvMUiYngpnd6W5+noNRmttRFIooKmI6Ppa62XTX7fUo SxSgdIE5wUypdBfGYdq/NzWO8Icir7wnA0uH2f5uDdyw0GGgcqhEhgx2s9ZesEKPL4r2Z p88Cj5u4Uqrffz/3F2ReQj6GASXadZSErDD/ZbES8NfEndNa/7dI3MHR7ifp+IDurRIIa AnQEPjTnAmGElBCzly1VRwQqJW5kSE5VLARIrHyLdVYYBXYadDN6RoV3jZrQRwraiH+Nr xx0jzc7On7hgzcrjt09BtPv0ZFT3/KY0VdZ0vlyRW0jGtKYGJIkCYleAqyrJn7Umacw== 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=HhledqBj; arc=none smtp.remote-ip=91.218.175.216 Received: from mta0.migadu.com (out-216.mta0.migadu.com [91.218.175.216]) (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 5C981606A321 for ; Wed, 21 Oct 2026 09:50:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5C981606A321 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=HhledqBj X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=VR9I6eMpxuCj5V9ollyYvyPkLG3wtvmTCmYpBpxiZ2o=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1792576200; v=1; x=1793181000; b=HhledqBjzKKur4GB7XnhRqxlnismylTJ8jxijNG+tr+PiZQp4dR7vte5aP1DJJr0sA58plYC fEiUbQHlfeMJ0k7QO6LY0whr+P/ngEVJ4X014VCRQp9ybqIf7vLTK9enKYJDeFO9Luht01YROek 8wZvAIMyHaV9l4hZbijp1OZw= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 83e3e21a2d7caf67; Wed, 21 Oct 2026 09:50:00 +0000 X-Mizu-Trace-ID: 83e3e21a2d7caf67 X-Migadu-Flow: FLOW_OUT Message-ID: <2329ee64-f9be-4826-a496-65344e9a9c18@linux.dev> Date: Wed, 21 Oct 2026 17:49:51 +0800 X-Mailing-List: linux-kernel@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] mm/ksm: keep soft-dirty and uffd-wp when merging a page To: Kiryl Shutsemau , "David Hildenbrand (Arm)" Cc: samarth.colleges@gmail.com, akpm@linux-foundation.org, xu.xin@linux.dev, chengming.zhou@linux.dev, peterx@redhat.com, rppt@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20261020055518.36087-1-lance.yang@linux.dev> <3da45e6d-2b46-4fff-9ff3-241f70d68296@kernel.org> <68f17ee7-d272-4475-8a59-645442e2c210@kernel.org> Content-Language: en-US From: Lance Yang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/10/21 16:55, Kiryl Shutsemau wrote: > On Wed, Oct 21, 2026 at 10:21:53AM +0200, David Hildenbrand (Arm) wrote: >>> +1. Did it ever actually work there :) Why not just skip them and >>> call it a day :D >> >> I think QEMU just always sets MADV_MERGABLE and later activates uffd. So that >> needs some care to not disable them. So let's rather try to get it fixed properly. >> >> Can you send out proper patches? Thanks! Thanks David! Will take it over next week and get proper patches out :) > > +1. > > Lance's direction is right. Unsharing is not an access: do_wp_page() > already skips the uffd-wp fault on FAULT_FLAG_UNSHARE, and RWP should do > the same. Thanks Kiryl! Will take a close look at that :) Cheers, Lance