Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2940131ybl; Mon, 19 Aug 2019 09:37:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqMpeTvCAE9QMMH2kessc3Q6KzqPz1VPcnDYEetRhFeHphebnjkv2jVmXJSOB3kDNCn4oi X-Received: by 2002:a62:76d5:: with SMTP id r204mr24569528pfc.252.1566232661560; Mon, 19 Aug 2019 09:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566232661; cv=none; d=google.com; s=arc-20160816; b=ynyJL12u70p9yv0mKWOAPua3Syi9JanXk3ESineUnlwGQS5LUeAcx7wWOJ5NDUx+mG 67Ww8FFJHyOBZPsxdYWqskD5mXAe3uY1+xbfMujKpZfftJYwyWrO2BVicP46ieG/IOy5 Zd0QRPui9dxv4EzVFhI6nm9+R2XqH7McDD08wcSQWvWEAln95nzAGBSLoE8P1o2IYoMH 523Cwoyx3XrPjN290/6385Oc+6TLGOL6dKUw0s52VcI/qn/jXSnXO0Hvo+S5J8eNRj1C Adh+Zy/XoHJk1L1IdHpF1UhfXoHyXOmJdTo3rsDFQ9pVFNFvFyoTMuS2kmVqaLKyaKVa 6/zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wWW+WA46mKEi0z1RGGxPVBr8fzCCdL8vAuG/5cMy1F4=; b=kUTQTFqTvDTL6yvHnjABSojKSNWboUItn8K6xOkedN7vPXfK6/No4eZAfUjvYe/GOT 45mC/+DD6HnSCD3S9jsX+aDvbUqBPN72QlWoysb6S4NvuCWH1KF+uvayldoZL2daH9eE rvZl5qw4H9eYEzVIvzJij8ORuu5V4QQrx9vbgNHXB6Tk+AGQyEhiv2gSAwAKSOF8SX5x 9SNi502M4TPYjtTvgB4pvz7y/557cefOtMDYwGOv6XBxd9HPatuf/KOz96kYDpuO5ekV 9iBsGPGqwkQCvR9c5kbeUScKsDx9PWuh5c5DMgI7itqY4nh0MnT3YEva1sH0pVwgLJcG RmDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=hiwyuvmS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si9296080pjn.50.2019.08.19.09.37.26; Mon, 19 Aug 2019 09:37:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=hiwyuvmS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727930AbfHSQfX (ORCPT + 99 others); Mon, 19 Aug 2019 12:35:23 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:33757 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727857AbfHSQfX (ORCPT ); Mon, 19 Aug 2019 12:35:23 -0400 Received: by mail-qk1-f193.google.com with SMTP id w18so1951245qki.0 for ; Mon, 19 Aug 2019 09:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wWW+WA46mKEi0z1RGGxPVBr8fzCCdL8vAuG/5cMy1F4=; b=hiwyuvmSJGL4axK+y4nb7wwhApXBrItaLKtFiHb+0wCYjsLtFYZuCEFAzyksTNfRXd aQgPbRUSU1Em9wYmdmpdvDR5iltt9Ue4rBVxAwXjtVgM8lWHP+vxut3ux1GMtw9nPXYk k9GtyqhNbDP3aZA5l9uUOkH12eWqTHGTrviM/6+RhcinX/7DcF96D0VsgGPvioSmqxoX hTsrLuObX/XO5/qaczj4qvU1EzbJyfzJL1phCIeYPnELZz3P/F77q1V+DyW5SI2y9fmg H3tV3DhL3EaYJfE488xGQcDNQHV7rsUnH+HSDA5UhYsXux7Qy8U8k9puCto8pcIlC9XF PqDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wWW+WA46mKEi0z1RGGxPVBr8fzCCdL8vAuG/5cMy1F4=; b=O1XDYi/oggAWpz842GJ1FD4+fagzM4KcO+16QdkxnDKRMdx5BoREEQxox/Huo6RH1F BS47+AfYQiYfiFNlGaKmh3/5gEzFuZReHZQ+zY3foiyB7uyYvbyQiZnDEJyVo6NArPj1 frx/2kxulSC1zy26U/HZ3M2/jcd2AiwO+x7bD+wmBQ+kM9h7ucr1evJDTSKbKxhdir/K hdSqvTGoVaam6lhNvM5CT0JlGFf/H85dFsW4YfBDZy5ICf9WrgkOMeow2QoXTg7DFxFJ k/Dit6YtNxBRyDihrwG3HkH0ySYR2GKj1bYfD3ZakEhJ72E+jr2utTQLnEOOeqyahDsG ufww== X-Gm-Message-State: APjAAAWAjJN0a1mbtugnYMZRbmv9fxYU9xXP5EWcMgMHb+O3keyJFD8s al/y6bBunl8d573xgu0I6VvI8w== X-Received: by 2002:ae9:f203:: with SMTP id m3mr21355477qkg.264.1566232522239; Mon, 19 Aug 2019 09:35:22 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id a21sm7296970qka.113.2019.08.19.09.35.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 09:35:21 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hzkcr-0007hN-Ej; Mon, 19 Aug 2019 13:35:21 -0300 Date: Mon, 19 Aug 2019 13:35:21 -0300 From: Jason Gunthorpe To: Bernard Metzler Cc: Geert Uytterhoeven , Doug Ledford , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Re: Re: Re: Re: [PATCH] RDMA/siw: Fix compiler warnings on 32-bit due to u64/pointer abuse Message-ID: <20190819163521.GK5058@ziepe.ca> References: <20190819150723.GH5058@ziepe.ca> <20190819141856.GG5058@ziepe.ca> <20190819135213.GF5058@ziepe.ca> <20190819122456.GB5058@ziepe.ca> <20190819100526.13788-1-geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 04:29:11PM +0000, Bernard Metzler wrote: > > >To: "Bernard Metzler" > >From: "Jason Gunthorpe" > >Date: 08/19/2019 06:05PM > >Cc: "Geert Uytterhoeven" , "Doug Ledford" > >, linux-rdma@vger.kernel.org, > >linux-kernel@vger.kernel.org > >Subject: [EXTERNAL] Re: Re: Re: Re: [PATCH] RDMA/siw: Fix compiler > >warnings on 32-bit due to u64/pointer abuse > > > >On Mon, Aug 19, 2019 at 03:54:56PM +0000, Bernard Metzler wrote: > > > >> Absolutely. But these addresses are conveyed through the > >> API as unsigned 64 during post_send(), and land in the siw > >> send queue as is. During send queue processing, these addresses > >> must be interpreted according to its context and transformed > >> (casted) back to the callers intention. I frankly do not > >> know what we can do differently... The representation of > >> all addresses as unsigned 64 is given. Sorry for the confusion. > > > >send work does not have pointers in it, so I'm confused what this is > >about. Does siw allow userspace to stick an ordinary pointer for the > >SG list? > > Right a user references a buffer by address and local key it > got during reservation of that buffer. The user can provide any > VA between start of that buffer and registered length. Oh gross, it overloads the IOVA in the WR with a kernel void * ?? > >The code paths here must be totally different, so there should be > >different types and functions for each case. > > Yes, there is a function to process application memory (siw_rx_umem), > to process a kernel PBL (siw_rx_pbl), and one to process kernel > addresses (siw_rx_kva). Before running that function, the API > representation of the current SGE gets translated into target > buffer representation. Why does siw_pbl_get_buffer not return a void *?? Still looks like two types have been crammed together. The kernel can't ever store anything into the user WQE buffer, so I would think it would copy the buffer to kernel space, transform it properly and then refer to it as a kernel buffer. Kernel sourced buffers just skip the transofmration. JAson