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 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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 7241DC07E96 for ; Thu, 8 Jul 2021 13:01:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2BE9161481 for ; Thu, 8 Jul 2021 13:01:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BE9161481 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Ev+bbPyIEGuXHynAc/Is5L8ksdTQ3ha2XYxyMsLjA0=; b=mPiGpDf+6l86Rr hpgCDlrUs/RulU0cOHZbh5/zcSy0gqRHb4rtwSMKhpb/w9aMd82arGvEl/G032BZykO4jjUDlgCxu d2WCQVsrd/oCkj8sWklxaJyP2TmJG4iVZs5XG4oJVkYI3/a/kfsIcTW6smbyaz0LYFl/CIfU6GLWu FVeEdFe7US2fzYevofBJFpnTG3biMp//M1uRYtAp3fAItbFGqD9pKlZkmAcmz54wvB7I2eeguFD/5 4vrb+le08A3neiNW7ywZkm/SCnbrgjNK+Dl/uCpSjG8aNPy/5WdcrkBIm+L9col8AeOVjrHVQxJmt rlZ44ZS6nzXqRAvBBJ5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1Tcx-00Gzso-56; Thu, 08 Jul 2021 12:59:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1Tcj-00Gzmx-41 for linux-arm-kernel@lists.infradead.org; Thu, 08 Jul 2021 12:59:28 +0000 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-Disposition: inline In-Reply-To: <20210707184313.3697385-3-pcc@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210708_055925_241708_A1275781 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel