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=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 B60D8C07E96 for ; Thu, 8 Jul 2021 12:59:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9599460FDC for ; Thu, 8 Jul 2021 12:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230396AbhGHNCG (ORCPT ); Thu, 8 Jul 2021 09:02:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:54396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbhGHNCG (ORCPT ); Thu, 8 Jul 2021 09:02:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6F1DC61481; Thu, 8 Jul 2021 12:59:22 +0000 (UTC) Date: Thu, 8 Jul 2021 13:59:19 +0100 From: Catalin Marinas To: Peter Collingbourne Cc: Vincenzo Frascino , Dave Martin , Will Deacon , Andrew Morton , Andrea Arcangeli , Alistair Delva , Lokesh Gidra , William McVicker , Evgenii Stepanov , Mitch Phillips , Linux ARM , linux-mm@kvack.org, Andrey Konovalov , stable@vger.kernel.org Subject: Re: [PATCH v4 2/2] selftest: use mmap instead of posix_memalign to allocate memory Message-ID: <20210708125919.GB9966@arm.com> References: <20210707184313.3697385-1-pcc@google.com> <20210707184313.3697385-3-pcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210707184313.3697385-3-pcc@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Jul 07, 2021 at 11:43:13AM -0700, Peter Collingbourne wrote: > This test passes pointers obtained from anon_allocate_area to the > userfaultfd and mremap APIs. This causes a problem if the system > allocator returns tagged pointers because with the tagged address ABI > the kernel rejects tagged addresses passed to these APIs, which would > end up causing the test to fail. To make this test compatible with > such system allocators, stop using the system allocator to allocate > memory in anon_allocate_area, and instead just use mmap. > > Co-developed-by: Lokesh Gidra > Signed-off-by: Lokesh Gidra > Signed-off-by: Peter Collingbourne > Fixes: c47174fc362a ("userfaultfd: selftest") > Cc: # 5.4 > Link: https://linux-review.googlesource.com/id/Icac91064fcd923f77a83e8e133f8631c5b8fc241 Reviewed-by: Catalin Marinas