Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2012317pxb; Fri, 24 Sep 2021 17:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwi5KKpIWwGHoL9BOyE9ccEDcsZiXhLWJNFnV/aORTlGhUkOE3s0NyRHDmIRBRC1zK1tv/s X-Received: by 2002:a17:906:fc6:: with SMTP id c6mr14175974ejk.65.1632531387262; Fri, 24 Sep 2021 17:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632531387; cv=none; d=google.com; s=arc-20160816; b=Sk53YUVwIThMKfZYpcR9ZpOH7iAC0LCekkBqraDW89mT+uplAh0WTu73F/bc8lCh37 LEy9xVWfs8Aik+C8MIY86hGeFEWYtAaVZiW9tRzIzBuJxeKbS/fWrxk7aD2rWwHAYQfb KnDeNc6GGyBWE/etL3KKpqYKj6SaPPuxH/gnC8huFT2Mo75C5UGcGT45rCeWcCN7kNNz vCFb4OrGR8ePVciclaPjQxYzoG7N/2PX3hBTuCiIfsG4ArCEUV5EEIrYc+krEz/Q1UCi ATk+RvYLBDj72w1zCdr0sGzIHdLft+LST6njt5wrbYvOXUOdrGluE9/KoH0GKrhcOvtg 7vKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vURCDQqb490vrVUUKxyIgtPmCzQpFb9HmiIOhgqiCwU=; b=wOYti3mvHCiQ/x9+NKWBfSATO2nyW/2+evyRJB+nrjpoynnI09/eiEJ6Hg6CF1rwt+ RJfgs1QLHgR3rnVyvDaBF1zNebJKK/FZmg/jlXtrrpH3gVD1Pl2ak+Hq1DMYzok/eUBb N1f0STCgAheeB2+pYQPCnEQO7mdPDTFVOrOtKRAvoggC0VUHHzA/DMa62vTyrKKUq+HZ a6nrkMLGgXjY67gjqI2fs1GvuZflDFFl9Z1TLoaqcqona6n+PK5m501s89sGzEd9zxZr jpNeAe54yVnN+vznEj+xbNdd9xHXRTTfHwusrIHgPfRAgsamIp7+Lky5MNGyZPtbtmXC tG9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UYmyaoLg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si11487850ejj.689.2021.09.24.17.56.03; Fri, 24 Sep 2021 17:56:27 -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=@redhat.com header.s=mimecast20190719 header.b=UYmyaoLg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346672AbhIXOP7 (ORCPT + 99 others); Fri, 24 Sep 2021 10:15:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52023 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbhIXOP6 (ORCPT ); Fri, 24 Sep 2021 10:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632492865; 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=vURCDQqb490vrVUUKxyIgtPmCzQpFb9HmiIOhgqiCwU=; b=UYmyaoLgsmAzsp/Eb2U649hatWDPnLmfyVI/zMBHA2OMkVYWNbO2VJDxcr4J7zytk6z6o4 Sd4GfhtPQYBToBGNvZ+ojw+LNCwvfBUdkA2wtlCN8UWEHY1FNlBRNEj3rgUTHIOdzsSTL5 l/DGXS5JYO82VAYEh3Y9sVJFRgDdS4c= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-565-0yeAb8DMMuW31PVzB0l4Ng-1; Fri, 24 Sep 2021 10:14:24 -0400 X-MC-Unique: 0yeAb8DMMuW31PVzB0l4Ng-1 Received: by mail-qt1-f199.google.com with SMTP id 62-20020aed2044000000b002a6aa209efaso28603204qta.18 for ; Fri, 24 Sep 2021 07:14:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vURCDQqb490vrVUUKxyIgtPmCzQpFb9HmiIOhgqiCwU=; b=MO2UkrWuqs6MrmDVAipyGdzjjpBYDy9/igu4OJVwFcr08xC/vC6diaSsU/tvrP9fiU To9LvOyJiZCHei2xaGD+lGrFyoAUdlsQJrM+aOnkI18AnbhhGrMG4KHGIXwUIHaGoRWP GepnxG4nAsH7nzi89Vx1DnR4OIeHit0FezOjUv+5iR2PrKI5do2bMNIqL1MecDSE6Mff ABcc1kAedv4MBhRKiLuINPnR6ded8M+wsloYrvux6kAgwIKgULze25P5+RMmMPiBhivK XPx6ahOqmBNkTBskFuRbrGbqZEtoNmBXE+pZ9gGYSagq85ecr2nWD6OrOfbrPieOKm+A HxLg== X-Gm-Message-State: AOAM530IxvjeunPRnISsHvFj31KXhf2uwU6Duhw2f2RY/KJRnUP/aPwV QqDMCscdvkye6GsZf0coQmQw8mk30rLsVAj7Vxgrs5+xmAEPluul2OEPYkf6eKoO84r4ftTjIF4 p1K5iSXwLDypD8L3WLL2avK2J X-Received: by 2002:a37:6658:: with SMTP id a85mr10875028qkc.34.1632492863541; Fri, 24 Sep 2021 07:14:23 -0700 (PDT) X-Received: by 2002:a37:6658:: with SMTP id a85mr10874997qkc.34.1632492863209; Fri, 24 Sep 2021 07:14:23 -0700 (PDT) Received: from t490s ([2607:fea8:56a2:9100::d3ec]) by smtp.gmail.com with ESMTPSA id v8sm5214030qtk.49.2021.09.24.07.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 07:14:22 -0700 (PDT) Date: Fri, 24 Sep 2021 10:14:21 -0400 From: Peter Xu To: Andrew Morton 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: References: <20210923232512.210092-1-peterx@redhat.com> <20210923191941.da28da4400c11a3241a07acf@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210923191941.da28da4400c11a3241a07acf@linux-foundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 07:19:41PM -0700, Andrew Morton wrote: > 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? Not sure how we normally handle such case for selftests, but I agree. Btw, 8ba6e8640844 is merged in 5.14, so the only stable branch that will need it will be 5.14.y; it can be applied cleanly there. Thanks, -- Peter Xu