From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3827E23EAAF for ; Wed, 8 Jul 2026 13:08:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783516137; cv=none; b=kylfxETQY1Bq63gcN1aNwY45anl80YlAuXCSb8tt2IjZpI9Cvtsg2nGuKB1l5AZZb8HFU9qfIh+OzJLF4MIJah8oj8zaMNgw6PXZ1V5god0s1sJoexBeDpESKkRaYukLvFRkkIxeRJ61qGr/EIjB7MA+fCyqN5BfoeQHXiqrLcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783516137; c=relaxed/simple; bh=slzcngurpvijPvfNkGNfZu5oYV2DsjS057qVvK8Udik=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UffbPDuuC8UioEVl4JuVUWV7ZHJCJIG/jaIAwgvACuKxkvlA1Sel/aoP8wKpFu81N2BdhAgtAxjm60Dw0OrGBQPpEWnjJyth4WfTUKg3M3EgwR8y5v5iHQ6oil5+870tmCfPasEydb9U1xUYFVYgKH2W4ToYs1ua85VoXjJxtLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Nsf1KWgn; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=QPInTU5C; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Nsf1KWgn"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="QPInTU5C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783516135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U+rX2CKg5FhtAMYxFR8MmaCVN8SdzuEUH8feY2iANJc=; b=Nsf1KWgn9A3cbs6NAEMfyl3sVL2Rydewrwnn4CQqvREnSxMiZBhz5+lgJc2Td4EPx8C6oI QUad2eGDFHpQI+VxE7Q9v/DC6R7vMIa/cYjZgIvXzKFwkXeNRR4CCJ0Gi4yAzcXaEJYG1W xHAE6I+O24/ezKLdhxsXP4yAO3ryiF8= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-3BEvzdWrMAe3sERWDI_Y5g-1; Wed, 08 Jul 2026 09:08:52 -0400 X-MC-Unique: 3BEvzdWrMAe3sERWDI_Y5g-1 X-Mimecast-MFC-AGG-ID: 3BEvzdWrMAe3sERWDI_Y5g_1783516128 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-47132f8a98aso625536f8f.1 for ; Wed, 08 Jul 2026 06:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1783516128; x=1784120928; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=U+rX2CKg5FhtAMYxFR8MmaCVN8SdzuEUH8feY2iANJc=; b=QPInTU5CUeHGdhcsNcd/GAqSdNKqhDcJ7Hdf2MPERMoLVR/X17bI8ofp1v/jIpxXZk lbg0QZTFhdV0yG9oGVS0Bb0yIBOsMbWRakDTTGeZCpEVBrQoD+UBe+9Cl52EU7oyjnXi TuLrQLEADEYAbnyIFvMP1WdO4AumqOSD5BTr3RnjA5FoFk/cOcbap7EXVVOM/hS2P2EF WMpxktAkllG7azovep+HAl3PCl0PiO01cBRix4cjRJS+oqQ2pE6CVzJhQOsrMKT73iLR GrFnTFR44/YByVs3xb0TXD6znf6gd7/+Ob1WZEeexr26pnirjdh7x7nL/ZlVxIsVTebY LZKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783516128; x=1784120928; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=U+rX2CKg5FhtAMYxFR8MmaCVN8SdzuEUH8feY2iANJc=; b=Fz9AoezzlveFv1g1jkV/2/YIdJ9QDh6e8U1WmNYX7CU2kFLwdgmhU32qMATOKjClBx Sjz+OmBLXVMSx0rkOs6DrE53LbdLP+u5DxjzY+JJ0P5/RnroeCdDKMXk4pZ5cekXT1ty uGie0KeHz1bftIMt6nar/oSrf78X36rvls4hN0ABvo/UFhPU3FrJsPeB4zbh7vjT8o2a oa16X/AS+3I3Hkm/cjm4LCN0GVCXBFtIa1fF29mXKazt55Xxnj917IUxWPJ3JOS2ejWu /2hIDuuIr4HmLiJn6BsflzQJ+NAC9CDKm1fBU+ebr1ryy05ejDLNTe4YtzB+uoDpmnyF 6NIg== X-Gm-Message-State: AOJu0Yyu4A4K+wxJ9tNMdpOqymyhabomI5WHU5+Xke3nDFintVC8JT+D 7T4Z2G3PM2J5Dw5iGq4XbfgNjJDNzSLEAfGEdx4hRV7imsuRGZIF5Wd2c0gb8MRG/EHTX85XPcS ixYgTDXLuB56uTuWYnWbFOvlN/A4mPX4vR8n+uvqGnGhL1b1wTdHkcntnTMwRXiyvWQ== X-Gm-Gg: AfdE7clFxWJ/J60WAc3ZufuBkbUIDchCVpgU34VNo8VOCZ6guMMFN1BbXGwG7GRpIAE yYRUuPeryc+/Af4/IuuAPcBL+lUD/BliB2M+9/crNNs7pQdTjR8hIyNnSK6HTSkTnCd14v7boi1 lGD8zyJU8s8K+d50RxO6309rZ446a4dQp+CmumtmQBVqR7mgaPIrgJ/2ieqIpxmQI9wwg+LLsxQ hMM0P4yZywqilKprCXYgJEOVwnVkXslZI62oIqE9qwJDUB7W8QzxzqOXR5NnSFw1palRgpYIg6r aIVRf6a4zQSkEOKE4xXRGX+6eTMUr32FdVvwXKA6dVnJY4olvPC6qqo2fb/7t/K5fCagvPwwPY9 cwrOdBVO4x63c9gpV1CHSPCeXwsA4UtTL X-Received: by 2002:a05:600c:8284:b0:493:c8cf:27bd with SMTP id 5b1f17b1804b1-493e68642c1mr25878235e9.19.1783516127946; Wed, 08 Jul 2026 06:08:47 -0700 (PDT) X-Received: by 2002:a05:600c:8284:b0:493:c8cf:27bd with SMTP id 5b1f17b1804b1-493e68642c1mr25877715e9.19.1783516127480; Wed, 08 Jul 2026 06:08:47 -0700 (PDT) Received: from redhat.com (IGLD-80-230-68-31.inter.net.il. [80.230.68.31]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493e0f294a6sm259459405e9.1.2026.07.08.06.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 06:08:46 -0700 (PDT) Date: Wed, 8 Jul 2026 09:08:42 -0400 From: "Michael S. Tsirkin" To: "David Hildenbrand (Arm)" Cc: linux-kernel@vger.kernel.org, Miaohe Lin , Naoya Horiguchi , Andrew Morton , Oscar Salvador , Andi Kleen , Hidehiro Kawai , Rik van Riel , Vlastimil Babka , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Hao Li , Kiryl Shutsemau , Byungchul Park , linux-mm@kvack.org, linux-cxl@vger.kernel.org Subject: Re: [PATCH 0/2] mm: memory-failure: fix HWPoison flag race with non-atomic page flag ops Message-ID: <20260708090739-mutt-send-email-mst@kernel.org> References: <20260630174852-mutt-send-email-mst@kernel.org> <2f884bfa-3cd5-4fba-8aa4-c2e68890ab64@kernel.org> <20260701041112-mutt-send-email-mst@kernel.org> <20260701043024-mutt-send-email-mst@kernel.org> <20260707155658-mutt-send-email-mst@kernel.org> <6ec8f683-77c7-4ddd-830c-030a3d984715@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ec8f683-77c7-4ddd-830c-030a3d984715@kernel.org> On Wed, Jul 08, 2026 at 02:03:21PM +0200, David Hildenbrand (Arm) wrote: > On 7/7/26 22:27, Michael S. Tsirkin wrote: > > On Wed, Jul 01, 2026 at 10:36:31AM +0200, David Hildenbrand (Arm) wrote: > >> On 7/1/26 10:33, Michael S. Tsirkin wrote: > >>> > >>> what do you think ;) post it? > >> > >> As RFC please :) [and if it's AI generated, obviously properly reviewed and > >> reworked by you] > > > > I spent a bit poking at it, and it's hairy. > > What I thought ... > > > The issue is that we have calls to both set and clear bits. > > When we record them in a side side structure so they can be retried, > > we have to carefully record both sets and clears and their order and make sure > > they do not bypass each other. So if there's set already in the > > structure, we need to take it out of structure and only then add a clear. > > > > It gets very hairy because we want to set from NMI. So now we can have > > clear in the data structure and set from NMI bypasses that. Now what? > > And set from NMI can't be 100% safe anyway as we discussed ... Kinda > > reduced my motivation to try and make this reliable at all. > > Maybe we should just really keep it as broken as it currently is. It's not > really worth our time fixing basic design flaws ... given that we didn't have > any report about these races so far :/ > > I mean, sure, if it's easy, ... but it sounds like getting more and more complex. > > -- > Cheers, > > David Right. Either we do the RCU thing or let it be. But then I'm uninclined to even bother with fixing other weird behaviour I see there. -- MST