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 B7843C433F5 for ; Fri, 24 Sep 2021 02:19:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2E2A4610A4 for ; Fri, 24 Sep 2021 02:19:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2E2A4610A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4E748900002; Thu, 23 Sep 2021 22:19:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 497006B0071; Thu, 23 Sep 2021 22:19:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33767900002; Thu, 23 Sep 2021 22:19:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0193.hostedemail.com [216.40.44.193]) by kanga.kvack.org (Postfix) with ESMTP id 2069C6B006C for ; Thu, 23 Sep 2021 22:19:44 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CA25F29227 for ; Fri, 24 Sep 2021 02:19:43 +0000 (UTC) X-FDA: 78620861046.22.BE19F3E Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf22.hostedemail.com (Postfix) with ESMTP id 83F9D1903 for ; Fri, 24 Sep 2021 02:19:43 +0000 (UTC) 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 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 83F9D1903 X-Stat-Signature: c5a17rs7ghifxpg4c4st9aim3zitqx6p Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=zq8uYaKi; spf=pass (imf22.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1632449983-237371 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?