* [PATCH 0/2] CMA: remove unsupported gfp mask parameter
[not found] <CGME20180709122018eucas1p277147b1e6385d552b5a8930d0a8ba91c@eucas1p2.samsung.com>
@ 2018-07-09 12:19 ` Marek Szyprowski
0 siblings, 0 replies; only message in thread
From: Marek Szyprowski @ 2018-07-09 12:19 UTC (permalink / raw)
To: linux-mm, linux-kernel, linux-arm-kernel, linuxppc-dev, iommu
Cc: Marek Szyprowski, Andrew Morton, Michal Nazarewicz, Joonsoo Kim,
Vlastimil Babka, Christoph Hellwig, Michal Hocko, Russell King,
Catalin Marinas, Will Deacon, Paul Mackerras,
Benjamin Herrenschmidt, Chris Zankel, Martin Schwidefsky,
Joerg Roedel, Sumit Semwal, Robin Murphy, Laura Abbott,
linaro-mm-sig
Dear All,
The CMA related functions cma_alloc() and dma_alloc_from_contiguous()
have gfp mask parameter, but sadly they only support __GFP_NOWARN flag.
This gave their users a misleading feeling that any standard memory
allocation flags are supported, what resulted in the security issue when
caller have set __GFP_ZERO flag and expected the buffer to be cleared.
This patchset changes gfp_mask parameter to a simple boolean no_warn
argument, which covers all the underlaying code supports.
This patchset is a result of the following discussion:
https://patchwork.kernel.org/patch/10461919/
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
Patch summary:
Marek Szyprowski (2):
mm/cma: remove unsupported gfp_mask parameter from cma_alloc()
dma: remove unsupported gfp_mask parameter from
dma_alloc_from_contiguous()
arch/arm/mm/dma-mapping.c | 5 +++--
arch/arm64/mm/dma-mapping.c | 4 ++--
arch/powerpc/kvm/book3s_hv_builtin.c | 2 +-
arch/xtensa/kernel/pci-dma.c | 2 +-
drivers/iommu/amd_iommu.c | 2 +-
drivers/iommu/intel-iommu.c | 3 ++-
drivers/s390/char/vmcp.c | 2 +-
drivers/staging/android/ion/ion_cma_heap.c | 2 +-
include/linux/cma.h | 2 +-
include/linux/dma-contiguous.h | 4 ++--
kernel/dma/contiguous.c | 6 +++---
kernel/dma/direct.c | 3 ++-
mm/cma.c | 8 ++++----
mm/cma_debug.c | 2 +-
14 files changed, 25 insertions(+), 22 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-07-09 12:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20180709122018eucas1p277147b1e6385d552b5a8930d0a8ba91c@eucas1p2.samsung.com>
2018-07-09 12:19 ` [PATCH 0/2] CMA: remove unsupported gfp mask parameter Marek Szyprowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox