From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leon Romanovsky Subject: Re: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr() Date: Tue, 7 May 2019 09:33:37 +0300 Message-ID: <20190507063337.GP6938@mtr-leonro.mtl.com> References: <66d044ab9445dcf36a96205a109458ac23f38b73.1557160186.git.andreyknvl@google.com> <20190506195020.GD6201@ziepe.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190506195020.GD6201@ziepe.ca> Sender: linux-kernel-owner@vger.kernel.org To: Jason Gunthorpe Cc: Andrey Konovalov , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Catalin Marinas , Vincenzo Frascino , Will Deacon , Mark Rutland , Andrew Morton , Greg Kroah-Hartman , Kees Cook , Yishai Hadas , Felix Kuehling , Alexander Deucher , Christian Koenig List-Id: amd-gfx.lists.freedesktop.org On Mon, May 06, 2019 at 04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as syscall arguments. > > > > ib_uverbs_(re)reg_mr() use provided user pointers for vma lookups (through > > e.g. mlx4_get_umem_mr()), which can only by done with untagged pointers. > > > > Untag user pointers in these functions. > > > > Signed-off-by: Andrey Konovalov > > --- > > drivers/infiniband/core/uverbs_cmd.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > I think this is OK.. We should really get it tested though.. Leon? It can be done after v5.2-rc1. Thanks > > Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: leon at kernel.org (Leon Romanovsky) Date: Tue, 7 May 2019 09:33:37 +0300 Subject: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr() In-Reply-To: <20190506195020.GD6201@ziepe.ca> References: <66d044ab9445dcf36a96205a109458ac23f38b73.1557160186.git.andreyknvl@google.com> <20190506195020.GD6201@ziepe.ca> Message-ID: <20190507063337.GP6938@mtr-leonro.mtl.com> On Mon, May 06, 2019 at 04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as syscall arguments. > > > > ib_uverbs_(re)reg_mr() use provided user pointers for vma lookups (through > > e.g. mlx4_get_umem_mr()), which can only by done with untagged pointers. > > > > Untag user pointers in these functions. > > > > Signed-off-by: Andrey Konovalov > > --- > > drivers/infiniband/core/uverbs_cmd.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > I think this is OK.. We should really get it tested though.. Leon? It can be done after v5.2-rc1. Thanks > > Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: leon@kernel.org (Leon Romanovsky) Date: Tue, 7 May 2019 09:33:37 +0300 Subject: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr() In-Reply-To: <20190506195020.GD6201@ziepe.ca> References: <66d044ab9445dcf36a96205a109458ac23f38b73.1557160186.git.andreyknvl@google.com> <20190506195020.GD6201@ziepe.ca> Message-ID: <20190507063337.GP6938@mtr-leonro.mtl.com> Content-Type: text/plain; charset="UTF-8" Message-ID: <20190507063337.8RYww7fZIy9qc4cTA4NgGYKvRH8ho3bVG3VJd5MxA0A@z> On Mon, May 06, 2019@04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019@06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as syscall arguments. > > > > ib_uverbs_(re)reg_mr() use provided user pointers for vma lookups (through > > e.g. mlx4_get_umem_mr()), which can only by done with untagged pointers. > > > > Untag user pointers in these functions. > > > > Signed-off-by: Andrey Konovalov > > --- > > drivers/infiniband/core/uverbs_cmd.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > I think this is OK.. We should really get it tested though.. Leon? It can be done after v5.2-rc1. Thanks > > Jason 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.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_MUTT 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 CE360C004C9 for ; Tue, 7 May 2019 06:33:52 +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 9ED032087F for ; Tue, 7 May 2019 06:33:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ckH442xZ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="RyPsl6lm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9ED032087F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=61VsWLQtZrj+nCc0n0TNsdgxXTRBvlOTpTOo3CtgGM0=; b=ckH442xZtGhiG0 rEJ+5QWVuoYaHXNF0B5+3f40zKiwh9ZANqAuFg5s/RpVPtWstpIl25ntLYpZzFGs1OZB6yaZaJbi5 UChgAlJNT3daMU3vjWJxVIbuh8UufDLWOKgC4noLQY3mmBJorNkPi8asYaDo6uoXwXMv/vmsOn92O 6lE2yFo1am+/DVvl7sRW2SDCA2x6Dp1rQ4jTzi/49DPRXk1Vln9ndPremklFdAF2zHHtzXOOszSX8 LaE/BfKzuhuU58Q/SYJ6MuvQx8lLeU2Kf1vtTk4FlZMK8Wb52JPDjhaZ9NiT405CftTKsgd1boPqx A+xEx236CclKSYPHaixw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hNtfe-0007Px-3j; Tue, 07 May 2019 06:33:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hNtfb-0007Pc-ED for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2019 06:33:44 +0000 Received: from localhost (unknown [37.142.3.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6C092087F; Tue, 7 May 2019 06:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557210822; bh=oBFyk7fpihJdB0jCxegQVyX+6vGmLC1DK9IvU35itFk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RyPsl6lmqvcCnKl41VkY/GHW2+ETy7nDPo8Tpqc6bp7gDCBLdqWePFxG5B2Wa9vwT R3/WlBSqCc8Bj3KtWz9uGTPPZS6ordaRPlQ/fveMibMSWfgfc4tq1AglaAlmwW4kMa oMxOIvxG2cStHRR+RV/gLi/uVrPbQ27CrKcpR2aA= Date: Tue, 7 May 2019 09:33:37 +0300 From: Leon Romanovsky To: Jason Gunthorpe Subject: Re: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr() Message-ID: <20190507063337.GP6938@mtr-leonro.mtl.com> References: <66d044ab9445dcf36a96205a109458ac23f38b73.1557160186.git.andreyknvl@google.com> <20190506195020.GD6201@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190506195020.GD6201@ziepe.ca> User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190506_233343_492371_D040C343 X-CRM114-Status: GOOD ( 14.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , kvm@vger.kernel.org, Szabolcs Nagy , Catalin Marinas , Will Deacon , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Felix Kuehling , Vincenzo Frascino , Jacob Bramley , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Dmitry Vyukov , Dave Martin , Evgeniy Stepanov , linux-media@vger.kernel.org, Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Andrey Konovalov , Ramana Radhakrishnan , Alex Williamson , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Kostya Serebryany , Greg Kroah-Hartman , Yishai Hadas , linux-kernel@vger.kernel.org, Jens Wiklander , Lee Smith , Alexander Deucher , Andrew Morton , Robin Murphy , Christian Koenig , Luc Van Oostenryck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 06, 2019 at 04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as syscall arguments. > > > > ib_uverbs_(re)reg_mr() use provided user pointers for vma lookups (through > > e.g. mlx4_get_umem_mr()), which can only by done with untagged pointers. > > > > Untag user pointers in these functions. > > > > Signed-off-by: Andrey Konovalov > > --- > > drivers/infiniband/core/uverbs_cmd.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > I think this is OK.. We should really get it tested though.. Leon? It can be done after v5.2-rc1. Thanks > > Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,T_DKIMWL_WL_HIGH, USER_AGENT_MUTT autolearn=unavailable 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 21119C04AAD for ; Tue, 7 May 2019 06:33:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E63662087F for ; Tue, 7 May 2019 06:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557210829; bh=oBFyk7fpihJdB0jCxegQVyX+6vGmLC1DK9IvU35itFk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=eERSi/+TGoyjYKVw+spArg3oQlVsqK218fBxyse0NuH+/8XfhAQntwzvcRSRWo23k 6dUt2Yqmwa9MHGoMguiP2R1IgIpUrjObFHDRRcaVEUzwoIhKGQGhSxfaOJcKqB+JjZ h2dyGZ+GumxPNQoPGDMKE8yiJFY7TG9oWA9lDvh8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbfEGGdn (ORCPT ); Tue, 7 May 2019 02:33:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:57196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbfEGGdn (ORCPT ); Tue, 7 May 2019 02:33:43 -0400 Received: from localhost (unknown [37.142.3.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6C092087F; Tue, 7 May 2019 06:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557210822; bh=oBFyk7fpihJdB0jCxegQVyX+6vGmLC1DK9IvU35itFk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RyPsl6lmqvcCnKl41VkY/GHW2+ETy7nDPo8Tpqc6bp7gDCBLdqWePFxG5B2Wa9vwT R3/WlBSqCc8Bj3KtWz9uGTPPZS6ordaRPlQ/fveMibMSWfgfc4tq1AglaAlmwW4kMa oMxOIvxG2cStHRR+RV/gLi/uVrPbQ27CrKcpR2aA= Date: Tue, 7 May 2019 09:33:37 +0300 From: Leon Romanovsky To: Jason Gunthorpe Cc: Andrey Konovalov , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Catalin Marinas , Vincenzo Frascino , Will Deacon , Mark Rutland , Andrew Morton , Greg Kroah-Hartman , Kees Cook , Yishai Hadas , Felix Kuehling , Alexander Deucher , Christian Koenig , Mauro Carvalho Chehab , Jens Wiklander , Alex Williamson , Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Robin Murphy , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy Subject: Re: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr() Message-ID: <20190507063337.GP6938@mtr-leonro.mtl.com> References: <66d044ab9445dcf36a96205a109458ac23f38b73.1557160186.git.andreyknvl@google.com> <20190506195020.GD6201@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190506195020.GD6201@ziepe.ca> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, May 06, 2019 at 04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as syscall arguments. > > > > ib_uverbs_(re)reg_mr() use provided user pointers for vma lookups (through > > e.g. mlx4_get_umem_mr()), which can only by done with untagged pointers. > > > > Untag user pointers in these functions. > > > > Signed-off-by: Andrey Konovalov > > --- > > drivers/infiniband/core/uverbs_cmd.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > I think this is OK.. We should really get it tested though.. Leon? It can be done after v5.2-rc1. Thanks > > Jason