Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2295906pxu; Fri, 9 Oct 2020 12:57:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaqrwOvj3DH0/bhiqbAZCgS04KOto0Q9OKAo8SulwYSRMphc7PLC+HzgQCLPOQkSOrPzjV X-Received: by 2002:a17:906:368c:: with SMTP id a12mr16454895ejc.423.1602273436567; Fri, 09 Oct 2020 12:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602273436; cv=none; d=google.com; s=arc-20160816; b=EgojdFfYaKa3wwX0Z8HtpDZnVc5yqpdzIRXaVYrZktiHslonP6c+OKdTf1gPjn34X2 l6lnOi1EqLitgrNvEFZmRblotIjDlk+/CVGLCYU3qIIcj28FF1VBca7c5XClOqSt6OjZ 5qyhsBC3s04gQJtEfrdOtH43Yz+l+Z5sOlhSVNf18xu1WS1/as5/+/th7iup86p+VdsH G39PresTCGrGlg7FZYO6IhkyHdodGab1Xa71jf9ULnVJDeC4TXly0+CGVyo5iVZtXO9t wTBgVmHtbfuFeMC2awdunlfNvf9q2fLREjpFcLPHrDt4Ss8aDXaU8kwyXfKGh6YTlKvE aYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JtTniNbWimQFTlPWxNfhtRJTUnIfWE2pIrRn0nLquTU=; b=CbDezSXJukjHtDM88SamZOQxFmNVMqeUoSBn+M9WgMkU2Wa8LE45gUu74pR7edNsP9 V566HGKr5Lrpj08oZpaBAWq4PA+ew87NROTcIPRJ4U1Fxwr2rd0P+jxI+TPhOKGXkapK pXKH9gpsvGMGLATvARqdSQO1FV/mZMBcmGpbfV+g95sx9AdvUVkWM+A09KEkgTUcQdob +EYrkKqQeSX8ocyG15MH59XNmtHiRx0sHMwSC0n9LD8TBpuMFmfu14TZV7KCXuFLtlQ/ ecuvDbraNbqL+pFXvX3FiTi4MqbgJCHuO1o7Xs1THgIVA32210dMAQI+oOnooHaKKHG7 Z0dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="f/szaRC+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce22si6648646ejb.193.2020.10.09.12.56.53; Fri, 09 Oct 2020 12:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="f/szaRC+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390375AbgJISDt (ORCPT + 99 others); Fri, 9 Oct 2020 14:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390339AbgJISBs (ORCPT ); Fri, 9 Oct 2020 14:01:48 -0400 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84818C0613D8 for ; Fri, 9 Oct 2020 11:01:48 -0700 (PDT) Received: by mail-qv1-xf41.google.com with SMTP id ev17so5179639qvb.3 for ; Fri, 09 Oct 2020 11:01:48 -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; bh=JtTniNbWimQFTlPWxNfhtRJTUnIfWE2pIrRn0nLquTU=; b=f/szaRC+vLdnDgqFvq8AOddrp6VSsc5+VOKHgdN1Blfz+Kdocq0LgJzoYOwFNRhbsb R58LfaQQ3n9+kujlpK+dXsyPtLR7PpkdHaoMjpLP5dFUu9uKpYtIgwUv2SzANG3wJ4HI uZ2jIrHb3l+wKyafHdJPZ5UpeQcq4bXudJq3VH1qWYsmCJKZjK3dkCknvRMRvHtmwEaJ +C7ytvDBDqqX8xISydsOLSJIZQl1e2A9hJato/1mUA5uyCKy3VQWCdd1nWlOILZ9XItf xtRqWEAdtlSCbEhxBM5pVhNugecQkdco1xNKTq95myZ76QxSJibw5Xyqk8ww4uW9rkwK T0kw== 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; bh=JtTniNbWimQFTlPWxNfhtRJTUnIfWE2pIrRn0nLquTU=; b=g+5MHAKYebQXUGju7g2q+8pTOKLQEbUD4Lr1FAN6b0XgFQYEiZBTLmHP3wPA7RNEGL kQuascmCNQD+zcxgPegWAJH4LmFQFUTMTvSrGoZUO3N6bDHT6lV5fiJoM+8cblnAnVHs oEXPmA2whAvnZ5YMdVYn1yQQOFAvxPgSZK5UV/PdZzJDHtRIiHEvjQ/UVivz1o1uzdFd 2fVQU+qAz0Kzwry+OHR1r5pBGjAYkjoVBypjjmiEN+PxFy71FFp8zBtFpMiEHS80e8XP 8ivUdVTsXormrRH5dhoo/VcPfJIcvWgFonMCDfzUcn515r64oMjkZ21dtN3hSfvmVUOD oWsA== X-Gm-Message-State: AOAM532hNvPnt5hf93YAQHMp+Z784n584hPQGZGHhmUPx/MdmnbxvUG+ i8ZLrQgRmufX7eJxXI2yUxHCdQ== X-Received: by 2002:ad4:52c6:: with SMTP id p6mr12553168qvs.38.1602266507532; Fri, 09 Oct 2020 11:01:47 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id 68sm6690974qkg.108.2020.10.09.11.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 11:01:46 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kQwi9-002b28-P5; Fri, 09 Oct 2020 15:01:45 -0300 Date: Fri, 9 Oct 2020 15:01:45 -0300 From: Jason Gunthorpe To: Daniel Vetter Cc: Mauro Carvalho Chehab , DRI Development , LKML , KVM list , Linux MM , Linux ARM , linux-samsung-soc , "open list:DMA BUFFER SHARING FRAMEWORK" , linux-s390 , Daniel Vetter , Kees Cook , Dan Williams , Andrew Morton , John Hubbard , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Jan Kara , Linus Torvalds Subject: Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn Message-ID: <20201009180145.GB5177@ziepe.ca> References: <20201009075934.3509076-1-daniel.vetter@ffwll.ch> <20201009075934.3509076-10-daniel.vetter@ffwll.ch> <20201009123421.67a80d72@coco.lan> <20201009122111.GN5177@ziepe.ca> <20201009143723.45609bfb@coco.lan> <20201009124850.GP5177@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 07:52:05PM +0200, Daniel Vetter wrote: > > > If this is the case, the proper fix seems to have a GFP_NOT_MOVABLE > > > flag that it would be denying the core mm code to set __GFP_MOVABLE. > > > > We can't tell from the VMA these kinds of details.. > > > > It has to go the other direction, evey mmap that might be used as a > > userptr here has to be found and the VMA specially created to allow > > its use. At least that is a kernel only change, but will need people > > with the HW to do this work. > > I think the only reasonable way to keep this working is: > - add a struct dma_buf *vma_tryget_dma_buf(struct vm_area_struct *vma); > - add dma-buf export support to fbdev and v4l > - roll this out everywhere we still need it. It seems to me there is a technical way forward to restore user compat, so it is really no different than RDMA/DRM pain we both suffered before. Thus no justification to NAK it. If media wants things to keep working they have to do the technical path like you outline above. > Realistically this just isn't going to happen. If your series goes ahead it will get solved. Someone will take on the huge project to either add DMA buf to the drivers people still care about, or do the work above to transparently handle in kernel. If we allow things to keep working without consequence then nobody will do it. The only reason we did the 4 years of work in RDMA was because Linus went in and broke the uABI for a security fix. It was hundreds of patches to fix it, so I don't have much sympathy for "it is too hard" here. Jason