lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+4mf6QHX27knoHTXA4vnsC3swuvAH7zK1DpyaV-p_qbw@mail.gmail.com>
Date:   Mon, 27 Apr 2020 10:17:37 -0500
From:   Rob Herring <robh+dt@...nel.org>
To:     "Andrew F. Davis" <afd@...com>
Cc:     Sumit Semwal <sumit.semwal@...aro.org>,
        John Stultz <john.stultz@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        linaro-mm-sig@...ts.linaro.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] misc: sram: Add dma-heap-export reserved SRAM area type

On Fri, Apr 24, 2020 at 5:27 PM Andrew F. Davis <afd@...com> wrote:
>
> This new export type exposes to userspace the SRAM area as a DMA-Heap,
> this allows for allocations as DMA-BUFs that can be consumed by various
> DMA-BUF supporting devices.
>
> Signed-off-by: Andrew F. Davis <afd@...com>
> ---
>  .../devicetree/bindings/sram/sram.yaml        |   8 +

Separate patch and needs to go to DT list...

>  drivers/misc/Kconfig                          |   7 +
>  drivers/misc/Makefile                         |   1 +
>  drivers/misc/sram-dma-heap.c                  | 243 ++++++++++++++++++
>  drivers/misc/sram.c                           |  20 +-
>  drivers/misc/sram.h                           |  17 ++
>  6 files changed, 292 insertions(+), 4 deletions(-)
>  create mode 100644 drivers/misc/sram-dma-heap.c
>
> diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
> index 7b83cc6c9bfa..b8e33c8d205d 100644
> --- a/Documentation/devicetree/bindings/sram/sram.yaml
> +++ b/Documentation/devicetree/bindings/sram/sram.yaml
> @@ -105,6 +105,14 @@ patternProperties:
>            manipulation of the page attributes.
>          type: boolean
>
> +      dma-heap-export:
> +        description:
> +          Similar to 'pool' and 'export' this region will be exported for use
> +          by drivers, devices, and userspace using the DMA-Heaps framework.
> +          NOTE: This region must be page aligned on start and end in order to
> +          properly allow manipulation of the page attributes.
> +        type: boolean

Though I'm not sure this should be in DT. You have to change your
firmware to enable a new kernel feature? We also already have 'export'
which sounds like the same function. Or 'pool' though reading the
description, I don't really understand it's use.

What combination of all 3 of these options would be valid?

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ