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]
Date:   Mon, 19 Nov 2018 19:02:22 +0300
From:   Olga Kitaina <okitain@...ees.com>
To:     linux-kernel@...r.kernel.org
Subject: using ioremap() memory in dma_map_sg()

Hi.
As part of our driver, we want to have some device memory to be 
available to other devices via the DMA-BUF subsystem. The device memory 
is managed by genpool, and mapped from the sram driver via ioremap_wc(). 
We initially used sg_set_buf() with the virtual address returned from 
gen_pool_dma_alloc(), but it seems like the wrong thing to do, since the 
virt_addr_valid() check fails. Attempting to use vmalloc_to_page() 
results in a failure down the line, such as:

Unable to handle kernel paging request at virtual address ba405000
Backtrace:
(dma_cache_maint_page) from (__dma_page_dev_to_cpu+0x88/0x108)
(__dma_page_dev_to_cpu) from (arm_dma_map_page+0x5c/0x60)
(arm_dma_unmap_page) from (arm_dma_map_sg+0x64/0x8c)
(arm_dma_unmap_sg) from(foo_dmabuf_map+0x60/0x8c [foo])

Is there an appropriate way to put an ioremapped buffer into an SG table?

Thanks,
Olga.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ