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-next>] [day] [month] [year] [list]
Message-Id: <20201026085335.30048-1-sherry.sun@nxp.com>
Date:   Mon, 26 Oct 2020 16:53:33 +0800
From:   Sherry Sun <sherry.sun@....com>
To:     hch@...radead.org, gregkh@...uxfoundation.org,
        sudeep.dutt@...el.com, ashutosh.dixit@...el.com, arnd@...db.de,
        kishon@...com, lorenzo.pieralisi@....com
Cc:     linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-imx@....com, fugang.duan@....com
Subject: [PATCH V4 0/2] Change vring space from nomal memory to dma coherent memory

Changes in V4:
1. Change to use dma_mmap_coherent api for vop mmap callback. 
2. Add dp_mmap callback to map device page to userspace instead of get_dp_dma
callback.
3. Move all the dma related changes to patch 1.  
4. Kill the mic_dp_init/mic_dp_uninit and inline those into the callers as
Christoph suggested.
5. Keep the code following the 80-character line rule.
6. Add endian swap for vqconfig[i].address. 

The original vop driver only supports dma coherent device, as it allocates and
maps vring by _get_free_pages and dma_map_single, but not use 
dma_sync_single_for_cpu/device to sync the updates of device_page/vring between
EP and RC, which will cause memory synchronization problem for device don't
support hardware dma coherent.

And allocate vrings use dma_alloc_coherent is a common way in kernel, as the
memory interacted between two systems should use consistent memory to avoid
caching effects. So here add noncoherent platform support for vop driver.
Also add some related dma changes to make sure noncoherent platform works
well.

Sherry Sun (2):
  misc: vop: change the way of allocating vring and device page
  misc: vop: do not allocate and reassign the used ring

 drivers/misc/mic/bus/vop_bus.h     |   2 +
 drivers/misc/mic/host/mic_boot.c   |   9 +++
 drivers/misc/mic/host/mic_main.c   |  43 +++--------
 drivers/misc/mic/vop/vop_debugfs.c |   2 -
 drivers/misc/mic/vop/vop_main.c    |  51 +++----------
 drivers/misc/mic/vop/vop_vringh.c  | 110 +++++++++--------------------
 include/uapi/linux/mic_common.h    |   5 +-
 7 files changed, 66 insertions(+), 156 deletions(-)

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ