From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0C37C433FE for ; Fri, 24 Sep 2021 02:19:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA465610A4 for ; Fri, 24 Sep 2021 02:19:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243853AbhIXCVQ (ORCPT ); Thu, 23 Sep 2021 22:21:16 -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?