Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4354063imb; Wed, 6 Mar 2019 11:17:02 -0800 (PST) X-Google-Smtp-Source: APXvYqz4H7KzBgsa/GRC4DVduPgxoQIbpDLO2LpJINx+Fv7sit7WebjNgzPzglyZZIH3UuZ5EEtr X-Received: by 2002:aa7:9286:: with SMTP id j6mr8640102pfa.47.1551899821948; Wed, 06 Mar 2019 11:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551899821; cv=none; d=google.com; s=arc-20160816; b=k6RntLmTuVQuV1Rofb3LlwX+lR0t2F/BFLFw1YzkT+MmexFG43Y1sbwRppJZBJA7UI SDfLxy2N+PWTaIGgHOvjHLe6Ao2okJfWoWONnc2tp0aG7mrnIcBkJ2b6t3M64lgyNy70 b5B9Qsynk7u3tWn6UI1TKT6/PiBvakb8z/niKi1ogJ9/jcX+Bqrm5uTCvEmGU7xtDorP l74wlwtwV3olI+VIvi1CWXZRy0J3zUKo6RM1yFpgggW2drMbafnnRnVTLL82Knz5l2sH kKL2izkaX9+j+YaEPtiJyGgQc6EGhpNEjm8lm32zGCXgD2zFM+HKYxreXP28tBjbLV1c RPqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7Blkvnz+Gqia4b6LuRXmE1gWAtD7ntvEWDlxrsHxK3c=; b=fFPjgajHszK68wl4RwjgoTJOh2BY8ebz3Yq36Q7s51nL3XycH7WZzcTKflbl5U6DDa /vy/m02Zliiaxwsyr5/rgujz3nA13Uh2tSFBwP2fWYw40OVOfg/OlmwjdpOEFnyqLF3V nWlOGIiXSMlA6vmgxfKKL3NddxZda7l+tMxE8QCx4l6aVChBrK+aUezm6CkqDD9/N5rO HxUaNVu6B6eR3mF19DqayrJ051pvr0VdFueJ3pos+49SM3SuAs6pf5XAo275zBHoHJb+ oD7gZR6qglMVs25gYllaKJgWjurlYakoTm0S774kfgKFAEul9VnfpPdIQB0/Y+FmTjsm CQKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YJNDFgmf; 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 70si1775151pla.128.2019.03.06.11.16.46; Wed, 06 Mar 2019 11:17:01 -0800 (PST) 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=YJNDFgmf; 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 S1730113AbfCFQ54 (ORCPT + 99 others); Wed, 6 Mar 2019 11:57:56 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:36434 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbfCFQ54 (ORCPT ); Wed, 6 Mar 2019 11:57:56 -0500 Received: by mail-wr1-f67.google.com with SMTP id o17so14242355wrw.3 for ; Wed, 06 Mar 2019 08:57:55 -0800 (PST) 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:content-transfer-encoding; bh=7Blkvnz+Gqia4b6LuRXmE1gWAtD7ntvEWDlxrsHxK3c=; b=YJNDFgmf1xIbn1Ab7vHlvT0BzEaM9Zdtm81M4uGipmJAtRXlPlcllktkHvmEt+3FuZ CHbZ9wfubNKjTwrBNldZrGxz9wV0rPH+fxyKAVAw/IXhYIdMpsZPHNAAMDfEbKkRixxj tElYCxYdY6bAtJW/lozWSPk8c0mY+Hnk4/65AVszevyh00m3uczob6HNM/HlY2KS1DEf ClhxR+8TaPewFrITIQwN97brTa8Q83eRHGGDmWp+LKsXmYZD0eAf0vbKN5TKHwjL2diS S+THVVQhIQPlRtB0OJ50RvFBTN+Vr6AI3O7ExROvIEm+B4dbX0YhmOC59K61kz9FeWNV 8tGA== 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:content-transfer-encoding; bh=7Blkvnz+Gqia4b6LuRXmE1gWAtD7ntvEWDlxrsHxK3c=; b=mADVdsGk5qNXcKB/rTUgBp3Z9Kc0qPYCwKqqSlSk3tMJk1eY4AuRmGgUq/z8nNVlKm rcIr2AKkmZtulFNByeY/FCKWRklw/bywRTe3efhtHTyCpsEUdR+U+FWH9/34HCVavhyJ ZFbLrSy5pkQX23lfo7etOCclSjvDp/Q5U11N+JvtfMog5BsJO2GGXMfzX+PS7zEptAGU vB/YdQJmKKy/kykQZU8if0nFBy9UMnIVDH2M7xfdbrIEMjPFbLYerXjbNFPCVuTNKjHC WNTmLLuxZXrU42tsZ0g2i2z/PiTtlIZfXX4/xe94Aev6m0jSgIT4aLSZYPqp/UpUxB1z CJOA== X-Gm-Message-State: APjAAAVAtT+YmXa/1F4CqQpf6I+gM6rmkDdeM0sOjbkWqJ3xMXnG5UHD 5lllo7mFfKKwBHclKThuOmsAJ7q4AfE6XN/Sl0t3DA== X-Received: by 2002:adf:a2cc:: with SMTP id t12mr3703564wra.253.1551891474441; Wed, 06 Mar 2019 08:57:54 -0800 (PST) MIME-Version: 1.0 References: <1551819273-640-1-git-send-email-john.stultz@linaro.org> <1551819273-640-2-git-send-email-john.stultz@linaro.org> In-Reply-To: From: John Stultz Date: Wed, 6 Mar 2019 08:57:42 -0800 Message-ID: Subject: Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework To: Benjamin Gaignard Cc: lkml , "Andrew F. Davis" , Laura Abbott , Greg KH , Sumit Semwal , Liam Mark , Brian Starkey , Chenbo Feng , Alistair Strachan , ML dri-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 6, 2019 at 8:12 AM Benjamin Gaignard wrote: > Le mar. 5 mars 2019 =C3=A0 21:54, John Stultz a = =C3=A9crit : > > +/** > > + * DOC: DMABUF Heaps Userspace API > > + * > > + */ > > + > > +/* Currently no flags */ > > +#define DMA_HEAP_VALID_FLAGS (0) > > I think here you need to allow flags like O_RDWR or O_CLOEXEC else > mmap will fail. > Hm. So I meant for these to be just the bitmask of valid flags for the allocate IOCTL (used to make sure no one is passing junk flags accidentally), rather then valid flags for the heap open call. But this probably suggests I should call it something like DMA_HEAP_ALLOC_VALID_FLAGS instead? thanks -john