Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1127594pxb; Thu, 23 Sep 2021 19:21:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNuWoZKEo0h8rCt9vdL9qlAow5zqQ+mqS5/sUsCQGqn2b/ooAwn+dVVbOKliUY3CkJ3fgd X-Received: by 2002:a05:6638:408f:: with SMTP id m15mr6957722jam.94.1632450105381; Thu, 23 Sep 2021 19:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632450105; cv=none; d=google.com; s=arc-20160816; b=j09ozkl/gcpQ1LqqHuSFuMTIwXAO9oWfCVtgo9CmYyAbedEk2c6dHfPwoVJXXuKNeL koMd5dzgpbK1C8WSGAeg9qRKhngfwna/Tqa5Kc2ZAKfkeqQJ7/FsWD9I18PI9Q1IwpJC FuRUmPTV1g8/zXPjc8lWNHwI9LLwpdKLCXLccnIa3r/54pyK/8xJNtts199TpcCAzY1V vD+gt5Nt1q/GFE0LLnVUY65zfaTfPsHlZyAirsOZ2B/Fwe84PzPPYd+IrB3MqudbomsK o2rahhopUDkt4dk6C1iHpZ8AW735D/bT7lVC34oJvj5eWSvoFK1MFzrgOPQremTxDFHP sh3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=A8LEGU4OBcKuPu0HGa0EyAtsTTGuh20UPmeJGo48CTo=; b=bSx3TppKqs6Wr4wPfb0iHKMfjd0eosvJOJOOp+0qZjLXFZeSlhTtkpUCJW0JlV6nF7 d4OoqXVctQT43MS+DhhVtqcvD1JDy0IgOXg1ai60cftwNdGLgUvTfcreLBBWvAkYJ8/j Buu2vuLFMJ7aUeATU3uyu6L5SieFSaWR3p4AgmXHoIjoSVl/AeDRJiSpH+vmm0cM3fy5 /wAxj3rFVcglD3kkdNr5rkZuLLwNokD3NS2V6lXwsAuPst9KE4IeogeR1iKmlvoEqgC7 xpUY8h71v5Eor3QGmvG4YLb5rS+I6t3h9dzTvxuHLG2sEnKauUyuOSJ+5Qovt0lNPabI hCFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=zq8uYaKi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si7911754iog.32.2021.09.23.19.21.34; Thu, 23 Sep 2021 19:21:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=zq8uYaKi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243813AbhIXCVP (ORCPT + 99 others); Thu, 23 Sep 2021 22:21:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:47402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232911AbhIXCVO (ORCPT ); Thu, 23 Sep 2021 22:21:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C38B61039; Fri, 24 Sep 2021 02:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1632449982; bh=uRvz0xZK8S9AbE7fs1BoHqNalCLn2tKgUWAEoMpjGnw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zq8uYaKimnFsF1TU3JWW3twnMkGg4r3zJ/aFIjZ4zJWO4yDS4laTM8qle3tmC37e9 MEIxkyAq5uKfeU0LsuUXFh+B67oAgh79Vc6yMJYJpZ8Pk5gRq1O1vwwiZ63PrVC7Tk G/gIWDiGdFz1Zz/FeCYIehoqFNqHYynJpjcEzpY4= Date: Thu, 23 Sep 2021 19:19:41 -0700 From: Andrew Morton To: Peter Xu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrea Arcangeli , Axel Rasmussen , Nadav Amit , Li Wang Subject: Re: [PATCH] mm/userfaultfd: selftests: Fix memory corruption with thp enabled Message-Id: <20210923191941.da28da4400c11a3241a07acf@linux-foundation.org> In-Reply-To: <20210923232512.210092-1-peterx@redhat.com> References: <20210923232512.210092-1-peterx@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Sep 2021 19:25:12 -0400 Peter Xu wrote: > In RHEL's gating selftests we've encountered memory corruption in the uffd > event test even with upstream kernel: > > ... > > > We can mark the Fixes tag upon 0db282ba2c12 as it's reported to only happen > there, however the real "Fixes" IMHO should be 8ba6e8640844, as before that > commit we'll always do explicit release_pages() before registration of uffd, > and 8ba6e8640844 changed that logic by adding extra unmap/map and we didn't > release the pages at the right place. Meanwhile I don't have a solid glue > anyway on whether posix_memalign() could always avoid triggering this bug, > hence it's safer to attach this fix to commit 8ba6e8640844. > Thanks. I added a cc:stable to this. I don't think we want selftests in older kernels to be falsely reporting kernel bugs?