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: <20200929084425.24052-1-sherry.sun@nxp.com>
Date:   Tue, 29 Sep 2020 16:44:21 +0800
From:   Sherry Sun <sherry.sun@....com>
To:     hch@...radead.org, sudeep.dutt@...el.com, ashutosh.dixit@...el.com,
        arnd@...db.de, gregkh@...uxfoundation.org, kishon@...com,
        lorenzo.pieralisi@....com
Cc:     linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-imx@....com
Subject: [PATCH V2 0/4] Change vring space from nomal memory to dma coherent memory

Changes in V2:
1. Remove dev_is_dma_coherent check as Christoph suggested in the patchset. 
2. Remove used_address_updated flags in Patch2.
3. Remove WARN_ON in Patch3 and return error code instead directly return -1.
4. Remove Patch4 as it is a separate patch now.
5. Add more detailed explanations in the commit of patches.

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 (4):
  misc: vop: change the way of allocating vring
  misc: vop: do not allocate and reassign the used ring
  misc: vop: simply return the saved dma address instead of virt_to_phys
  misc: vop: mapping kernel memory to user space as noncached

 drivers/misc/mic/bus/vop_bus.h     |  2 +
 drivers/misc/mic/host/mic_boot.c   |  8 +++
 drivers/misc/mic/vop/vop_debugfs.c |  2 -
 drivers/misc/mic/vop/vop_main.c    | 48 +++--------------
 drivers/misc/mic/vop/vop_vringh.c  | 83 +++++++-----------------------
 include/uapi/linux/mic_common.h    |  3 --
 6 files changed, 35 insertions(+), 111 deletions(-)

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ