Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4609940ybg; Mon, 21 Oct 2019 11:33:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxFXd8euoLKO6Ha3i4QUJ3iDlPWGDtGjVs57dg/qJX+ok+zJCwJs2y8iDVUSSZUfU/JN+3 X-Received: by 2002:a17:906:6848:: with SMTP id a8mr8701669ejs.306.1571682800366; Mon, 21 Oct 2019 11:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571682800; cv=none; d=google.com; s=arc-20160816; b=aIOiKOMy+Y+TzGLf8jMKvaxGMYhSbkKBCycBcXlkuYNsVxyFKT7byzt/l57fSg3oVI VIKWEGMkI3R7XR9MI6TklhSOipmJN8gAK2znvZkGVsvyRpL6Ln7vExWe8/YeXlGfc/Ge CYkIjMHNAuY1M4Xmp9fB/a3UiG5LFuSdmUjMgIVGKQPM2MAv7EEgqp1wOUZnPrABR4Vk bAlybjkETTIW6Y6PiK3LqeqBNZ4za8/ezagZqudiHtifHkAOuimaU9IePngzR8AeArX/ rNBO2E2iw6NEdzrYF0lmWbvcCB57l4N3eyBiwWFDwztAx9X8Pe7sbHpG4pj1Q9PEzbx3 G9dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0e3LF7aKuz2iLw0mcj6oU7FpBQcB5Q8PDmzRJ1cFd9Q=; b=nlfiKAf3lj08LekX3mRj5ACqQEoCMYeZ2ZIsc5z1+5FeiCA2sO6iipSo4Ghs3jcXt3 dFhT5ha3ScoW1d0NwPAeSx35XIctBK4WDTGowOr4RaKTI8BFmILtes7vO94w/2nWFwT+ Tik32pZEa9XkZlFGH9+M31cKyMa0mHDzXBS3blepFe+bNoBju4oqCWy/QozKQC6ZH8dr cBzi3pSgEW779B1HvksOFMDiXR9XN/n5AO++YxCg6JLWGQRN94RQjXrWhLVYxEB2bwzv N9cdgzodLn5PyFZH0awU1BVUSYzv9hBoNSyI1vA22vTAu/gJI7MwH+8lLYuS9XV5/clo VkFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kpUBX0ru; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b53si4000782edb.419.2019.10.21.11.32.56; Mon, 21 Oct 2019 11:33:20 -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=@linaro.org header.s=google header.b=kpUBX0ru; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730097AbfJUSc3 (ORCPT + 99 others); Mon, 21 Oct 2019 14:32:29 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37258 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbfJUSc3 (ORCPT ); Mon, 21 Oct 2019 14:32:29 -0400 Received: by mail-ot1-f66.google.com with SMTP id 53so281710otv.4 for ; Mon, 21 Oct 2019 11:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0e3LF7aKuz2iLw0mcj6oU7FpBQcB5Q8PDmzRJ1cFd9Q=; b=kpUBX0ruClnhJmvKIIzHN1Q4dn2+sfqWY7IUWOaBG0kl0XXLWEY/UD5emw1x8pnoxA M0shj/WOB1CKY6RhwXF5fySgQtZPj4vgKAz1Bqk624KDQE47uoit9Udq2oLFfj/QWzIT 7LZJ6jtYaRTaYat8Dwota/2nNaJfbpfsxTcqt6cRmDliTzndexUk/M4Mr0kUPNiif7TK mES8A6X3XPgZErIxFsE2/I2/CZkNli5wHSJpqhIJqKmz8ZlmbHoOk0tW6J52FNwTCCQP p3HwyXvJlF0XaU9SKGbJDH/czU7lrMlKeSVBAeQ1rgr69q52knLyAXrJ2ikvXlcSrkOF dKOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0e3LF7aKuz2iLw0mcj6oU7FpBQcB5Q8PDmzRJ1cFd9Q=; b=YP5F04nH4qh0M/p1acfACwRFb956D3sbOB0ea6n+aeGuEWqvfdgEra9llFaySLlYNF 4ptFk0ILs3Jev9PA6o51P4a68cuOmYwALXzNq4FrVzF+7H6Ib4tPRz/MQFFsbHpRpgaJ x1cVJDc0u11FT25mfBOe0pB+V/z3Nf1LCLDRoxP5U5SBW7j3R3nQLMj7lVqVG5uEH6vi X6tjz8JqzuYtNNTpQ3aVzPHDkhzArW0OXtlpSaFHF17Dit0gM50okUaSOWV2fjtBRBW1 85ypo3I69JqEd+QYV2eD6/umu4cVCPmDrCQcPrlujHMKaSsXpS+2BBDo4l2guSqR5cR0 efIw== X-Gm-Message-State: APjAAAUafhNdXE6BcocvwCCUKpXUfKCCdRQr/vatLwR8KEn/CaNUCPGk vTRnmaVf/qcfqxOPhXXYZLRKSAze4Bzo5tpFbNWC2g== X-Received: by 2002:a9d:5a0b:: with SMTP id v11mr2801767oth.102.1571682747558; Mon, 21 Oct 2019 11:32:27 -0700 (PDT) MIME-Version: 1.0 References: <20191018052323.21659-1-john.stultz@linaro.org> <20191018052323.21659-2-john.stultz@linaro.org> <20191018111832.o7wx3x54jm3ic6cq@DESKTOP-E1NTVVP.localdomain> <20191021093546.m5hgpjadtpu7d4km@DESKTOP-E1NTVVP.localdomain> In-Reply-To: <20191021093546.m5hgpjadtpu7d4km@DESKTOP-E1NTVVP.localdomain> From: John Stultz Date: Mon, 21 Oct 2019 11:32:16 -0700 Message-ID: Subject: Re: [PATCH v12 1/5] dma-buf: Add dma-buf heaps framework To: Brian Starkey Cc: lkml , "Andrew F. Davis" , Laura Abbott , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Vincent Donnefort , Sudipto Paul , Christoph Hellwig , Chenbo Feng , Alistair Strachan , Hridya Valsaraju , Hillf Danton , "dri-devel@lists.freedesktop.org" , nd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 21, 2019 at 2:36 AM Brian Starkey wrote: > On Fri, Oct 18, 2019 at 11:26:52AM -0700, John Stultz wrote: > > On Fri, Oct 18, 2019 at 4:18 AM Brian Starkey wrote: > > > On Fri, Oct 18, 2019 at 05:23:19AM +0000, John Stultz wrote: > > > > > > As in v3: > > > > > > * Avoid EXPORT_SYMBOL until we finalize modules (suggested by > > > Brian) > > > > Heh. I guess it has been awhile. :) > > > > > Did something change in that regard? I still think letting modules > > > register heaps without a way to remove them is a recipe for issues. > > > > So yea, in recent months, work around Android with their GKI effort > > has made it necessary for ION heaps to be loadable from modules. I had > > some patches in WIP tree to enable this, and in the rework I did > > yesterday for the CMA module trivially collided with parts, and > > forgetting the discussion back in v3, I figured I'd just fold those > > bits in before I resubmitted for v12. > > Ah yes, I can see that would be needed. > > > > > If it's an issue, I can pull it out, but I'm going to be submitting > > module enablement for review as soon as the core bits are queued, as > > its going to be important to support for Android to switch to this > > from ION. > > > > I don't know how to decide if it's an issue. My understanding is that > if you rmmod something which has exported buffers, various Bad Things > might happen; I believe including data leaks, corruption or crashing > the kernel. There's probably plenty of scope for that with dma-buf > exporters already, so it's not exactly "new" but it is a bit > unfortunate. > > If "people" are OK with adding new code which has the same issue, then > I'm not going to make any more of a fuss, because perfection is the > enemy of progress. Perhaps an obvious comment pointing out the issue > would be prudent, though - as a reminder to people that add heaps from > their code (and wonder why there's no "dma_heap_remove" function). Eh. If I need to respin anyway, I'll just remove the exports for now. It's really just my fault for getting impatient and trying to squeeze some extra changes in. I'll then submit the module enablement patches separately. Thanks again for the review, I really appreciate your sharp eye! -john