Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3474943pxu; Sun, 11 Oct 2020 11:00:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykGOumjqJsPkLNjUyLS64LS/l8jJxmF7+PvEVoP11W6QwZ2gvr7yetgx4mGRpyaByaC3aa X-Received: by 2002:a17:906:915:: with SMTP id i21mr23571175ejd.113.1602439256506; Sun, 11 Oct 2020 11:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602439256; cv=none; d=google.com; s=arc-20160816; b=iKKpsm+UwsiTficmkISntwKfzGboOEKjiWRVyoNo5LeL5OlVxx2L1zjzRyzc9fCRx9 Wi1PJRaqrRmny8j06JB5RpQWPeh4oM5a+O+Wvre5SFxgGZudKLHw2JT49XA6sRqnJjVn uU1zPYGt6s3YSNAIRcdkrcweR2mVSq40w8r365PyHBPud8fsWnq+KaE6Ygc+Qa9YDOoB /iaalrWTiIJhdEFc8SCe8qtNYWqgcwhzcXWAsN+A9Q283GxJ9MbYGSGANB8Vw+F10PnA lm7E2LrRvXAsMVB51GueURCarqzfNs3VbDnrjCPld+I7M9iTCe2keXh4bRxhucUXH4BM CrDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=A5tgZcgIX7ugZHjoPdGmsvkiRJia7Ir6XUhEOOwaBwQ=; b=AbbAW/GR8w4YNLzVqt54kGcqrhNMLgFVLq9PXCW3y/yg52tZoCZ0RGtYDJup/O82cl dlUlDq5UxZwHHEIXXjOh0EgOk9Mre4u5MHG/71W+lA/JyrACipAapvnD33wi60jqgEUH UYhMTukqb2faCTtC7LjzFk0d3PfSrElhy6RUSa5K6en8iGN/S7LaDQtFjNKY7pqzP8G0 aMNKd2aIhYPBm1IJEK1oedJFsFsUVQORzR6fLoHbWgJVs/gVXIhIc0t0vaHMXWZF3tgn JaL64sBGkNxqgaEXzHi+rQQe2qSj1ebGO/tl7ZopuJ+oCbATfCaAFcslFsj1yhoqpNuZ KGOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gtB49X5+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fy1si10972270ejb.649.2020.10.11.11.00.33; Sun, 11 Oct 2020 11:00:56 -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=@kernel.org header.s=default header.b=gtB49X5+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727742AbgJKG1t (ORCPT + 99 others); Sun, 11 Oct 2020 02:27:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:49048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbgJKG1t (ORCPT ); Sun, 11 Oct 2020 02:27:49 -0400 Received: from coco.lan (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (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 70D4020795; Sun, 11 Oct 2020 06:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602397669; bh=tLwirr0BbVJkwRy4pXH9jkVKcUQIWYnty1vsXbo4I7E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gtB49X5+yRzhY33+NnJemfNod8lA4EL1Bqf7vnxS+zQy5xIyntEJPhyD+Zkw5nmnp hOC6+lfj7NYWVVXkGO3liFxjebMkF5+P4r0kPw+axWc2cWV3GRAHNiyZ1mAgRt4Vya asb/PYhs/guNq8+Ak1psm0EqVQbOy4RYr8En3mf8= Date: Sun, 11 Oct 2020 08:27:41 +0200 From: Mauro Carvalho Chehab To: Daniel Vetter Cc: Laurent Pinchart , Tomasz Figa , linux-s390 , linux-samsung-soc , Jan Kara , Kees Cook , KVM list , Linux MM , John Hubbard , LKML , DRI Development , Jason Gunthorpe , =?UTF-8?B?SsOpcsO0bWU=?= Glisse , Daniel Vetter , Dan Williams , Linus Torvalds , Andrew Morton , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" , Hans Verkuil , "Lad, Prabhakar" Subject: Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn Message-ID: <20201011082741.6bed4d71@coco.lan> In-Reply-To: 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> <20201010213554.GD3939@pendragon.ideasonboard.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, 10 Oct 2020 23:50:27 +0200 Daniel Vetter escreveu: > On Sat, Oct 10, 2020 at 11:36 PM Laurent Pinchart > wrote: > > > > > We probably still have a few legacy drivers using videobuf (non-2), > > > but IMHO those should be safe to put behind some disabled-by-default > > > Kconfig symbol or even completely drop, as the legacy framework has > > > been deprecated for many years already. > > > > There's 8 drivers left, and they support a very large number of devices. > > I expect unhappy users distros stop shipping them. On the other hand, > > videobuf has been deprecated for a loooooooong time, so there has been > > plenty of time to convert the remaining drivers to videobuf2. If nobody > > can do it, then we'll have to drop support for these devices given the > > security issues. > > Again, the issue here is _only_ with follow_pfn. For videobuf1 this > means videbuf-dma-contig.c userptr support is broken. Unlike videobuf2 > it means it's broken for all usage (not just zero-copy userptr), > because videbuf-dma-contig.c lacks the pin_user_pages path. Well, follow_pfn() is used only by videbuf-dma-contig.c. If this is the only part of VB1 that will have userptr broken, then there's just one driver that might be affected: davinci. Yet, taking a deeper look: $ git grep include drivers/media/platform/davinci/|grep -i videobuf drivers/media/platform/davinci/vpif_capture.h:#include drivers/media/platform/davinci/vpif_display.h:#include It sounds to me that it was already converted to VB2, but some VB1 symbols were not converted at its Kconfig. It sounds to me that there are other drivers with some VB1 left overs at Kconfig, as those are the only ones using VB1 those days: $ for i in $(git grep media/videobuf drivers |grep -v videobuf2 |grep -v v4l2-core|cut -d: -f1); do dirname $i; done|sort|uniq drivers/media/pci/bt8xx drivers/media/pci/cx18 drivers/media/platform drivers/media/usb/tm6000 drivers/media/usb/zr364xx drivers/staging/media/atomisp/pci > But that > would be easy to add if this poses a problem I think - we just need > to carry over the pin_user_pages_fast logic from videbuf2, no driver > changes required. But of course I don't think we should do that before > someone reports the regression, since videobuf1 userptr is doubly > deprecated :-) I think otherwise. Keeping a broken component at the Kernel is a bad idea. Yet, from my quick search above, it sounds to me that it is time for us to retire the VB1 DMA contig support as a hole, as there's no client for it anymore. I'll work on some patches cleaning up the VB1 left overs at Kconfig and removing videbuf-dma-contig.c for good, if there's no hidden dependency on it. Thanks, Mauro