Re: [PATCHv2 2/4] staging: android: ion: Pull out ion ioctls to a separate file

2016-09-02 Thread Laura Abbott
On 09/02/2016 05:44 AM, Greg Kroah-Hartman wrote: On Thu, Sep 01, 2016 at 03:40:42PM -0700, Laura Abbott wrote: The number of Ion ioctls may continue to grow along with necessary validation. Pull it out into a separate file for easier management and review. Signed-off-by: Laura Abbott

Re: [PATCHv2 3/4] staging: android: ion: Add an ioctl for ABI checking

2016-09-02 Thread Laura Abbott
On 09/01/2016 11:10 PM, Greg Kroah-Hartman wrote: On Thu, Sep 01, 2016 at 03:40:43PM -0700, Laura Abbott wrote: The current Ion ioctls lack a good way to tell what ioctls are available. Introduce an ioctl to give an ABI version. This way when the ABI inevitably gets screwed up userspace will

Re: [Linaro-mm-sig] [PATCHv2 3/4] staging: android: ion: Add an ioctl for ABI checking

2016-09-02 Thread Laura Abbott
On 09/02/2016 02:02 AM, Arnd Bergmann wrote: On Thursday, September 1, 2016 3:40:43 PM CEST Laura Abbott wrote: --- a/drivers/staging/android/ion/ion-ioctl.c +++ b/drivers/staging/android/ion/ion-ioctl.c @@ -22,6 +22,29 @@ #include "ion_priv.h" #include "compat_ion.h"

Re: [PATCHv2 4/4] staging: android: ion: Add ioctl to query available heaps

2016-09-02 Thread Laura Abbott
On 09/01/2016 11:14 PM, Greg Kroah-Hartman wrote: On Thu, Sep 01, 2016 at 03:40:44PM -0700, Laura Abbott wrote: Ion clients currently lack a good method to determine what heaps are available and what ids they map to. This leads to tight coupling between user and kernel space and headaches. Add

Re: [PATCHv2 4/4] staging: android: ion: Add ioctl to query available heaps

2016-09-02 Thread Laura Abbott
git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information] url: https://github.com/0day-ci/linux/commits/Laura-Abbott/staging-android-

Re: [Linaro-mm-sig] [PATCHv2 4/4] staging: android: ion: Add ioctl to query available heaps

2016-09-02 Thread Laura Abbott
On 09/02/2016 02:37 PM, Arnd Bergmann wrote: On Friday, September 2, 2016 2:27:21 PM CEST Laura Abbott wrote: All warnings (new ones prefixed by >>): drivers/staging/android/ion/ion.c: In function 'ion_query_heaps': drivers/staging/android/ion/ion.c:1181:3: warning: cast

Re: [Linaro-mm-sig] [PATCHv2 3/4] staging: android: ion: Add an ioctl for ABI checking

2016-09-02 Thread Laura Abbott
On 09/02/2016 02:33 PM, Arnd Bergmann wrote: On Friday, September 2, 2016 1:33:44 PM CEST Laura Abbott wrote: On 09/02/2016 02:02 AM, Arnd Bergmann wrote: On Thursday, September 1, 2016 3:40:43 PM CEST Laura Abbott wrote: --- a/drivers/staging/android/ion/ion-ioctl.c +++ b/drivers/staging

Re: [PATCHv2 1/4] staging: android: ion: Drop heap type masks

2016-09-06 Thread Laura Abbott
On 09/05/2016 04:20 AM, Brian Starkey wrote: Hi, On Fri, Sep 02, 2016 at 12:36:25PM -0700, Laura Abbott wrote: On 09/02/2016 06:41 AM, Brian Starkey wrote: Hi Laura, On Thu, Sep 01, 2016 at 03:40:41PM -0700, Laura Abbott wrote: There is no advantage to having heap types be a mask. The ion

[PATCHv3 1/2] staging: android: ion: Pull out ion ioctls to a separate file

2016-09-07 Thread Laura Abbott
The number of Ion ioctls may continue to grow along with necessary validation. Pull it out into a separate file for easier management and review. Signed-off-by: Laura Abbott --- v3: Rebase to staging-next --- drivers/staging/android/ion/Makefile| 3 +- drivers/staging/android/ion/ion

[PATCHv3 0/2] New Ion query ioctl

2016-09-07 Thread Laura Abbott
about ion_dummy cleanup but I've decided to have that be a separate patch. Laura Abbott (2): staging: android: ion: Pull out ion ioctls to a separate file staging: android: ion: Add ioctl to query available heaps drivers/staging/android/ion/Makefile| 3 +- drivers/staging/android/io

[PATCHv3 2/2] staging: android: ion: Add ioctl to query available heaps

2016-09-07 Thread Laura Abbott
Ion clients currently lack a good method to determine what heaps are available and what ids they map to. This leads to tight coupling between user and kernel space and headaches. Add a query ioctl to let userspace know the availability of heaps. Signed-off-by: Laura Abbott --- v3: Include some

Re: [Linaro-mm-sig] [PATCHv3 2/2] staging: android: ion: Add ioctl to query available heaps

2016-09-07 Thread Laura Abbott
On 09/07/2016 12:37 PM, Arnd Bergmann wrote: On Wednesday, September 7, 2016 11:49:59 AM CEST Laura Abbott wrote: - if (dir & _IOC_WRITE) - if (copy_from_user(&data, (void __user *)arg, _IOC_SIZE(cmd))) - return -EFAULT; + /* +

[RFCv3][PATCH 2/5] arm: Impelment ARCH_HAS_FORCE_CACHE

2016-09-12 Thread Laura Abbott
arm64 may need to guarantee the caches are synced. Implement versions of the kernel_force_cache API for v7. Other versions are stubbed out and can be added as appropriate. Signed-off-by: Laura Abbott --- v3: Switch to force implementations per CPU instead of relying on dma_map/dma_unmap. v7 is

[RFCv3][PATCH 3/5] arm64: Implement ARCH_HAS_FORCE_CACHE

2016-09-12 Thread Laura Abbott
arm64 may need to guarantee the caches are synced. Implement versions of the kernel_force_cache API to allow this. Signed-off-by: Laura Abbott --- v3: Switch to calling cache operations directly instead of relying on DMA mapping. --- arch/arm64/include/asm/cacheflush.h | 8 arch

[RFCv3][PATCH 1/5] Documentation: Introduce kernel_force_cache_* APIs

2016-09-12 Thread Laura Abbott
Some frameworks (e.g. Ion) may need to do explicit cache management to meet performance/correctness requirements. Rather than piggy-back on another API and hope the semantics don't change, introduce a set of APIs to force a page to be cleaned/invalidated in the cache. Signed-off-by: Laura A

[RFCv3][PATCH 5/5] staging: ion: Add support for syncing with DMA_BUF_IOCTL_SYNC

2016-09-12 Thread Laura Abbott
dma_buf added support for a userspace syncing ioctl. It is implemented by calling dma_buf_begin_cpu_access and dma_buf_end_cpu_access. Ion currently lacks cache operations on this code path. Add them for compatibility with the dma_buf ioctl. Signed-off-by: Laura Abbott --- drivers/staging

[RFCv3][PATCH 4/5] staging: android: ion: Convert to the kernel_force_cache APIs

2016-09-12 Thread Laura Abbott
Now that there exists a proper set of cache sync APIs, move away from the dma_sync and do less bad things. Signed-off-by: Laura Abbott --- v3: Rebased to latest-next --- drivers/staging/android/ion/ion.c | 22 -- drivers/staging/android/ion/ion_carveout_heap.c

[RFCv3][PATCH 0/5] Cleanup Ion mapping/caching

2016-09-12 Thread Laura Abbott
pen' to do the right thing but they aren't guaranteed. I'm hoping at v3 there are no objections to the general concept but if they exist please express them. Thanks, Laura [1]http://www.mail-archive.com/driverdev-devel@linuxdriverproject.org/msg49406.html Laura Abbott (5):

Re: [RFCv3][PATCH 3/5] arm64: Implement ARCH_HAS_FORCE_CACHE

2016-09-13 Thread Laura Abbott
On 09/13/2016 02:19 AM, Will Deacon wrote: Hi Laura, On Mon, Sep 12, 2016 at 02:32:56PM -0700, Laura Abbott wrote: arm64 may need to guarantee the caches are synced. Implement versions of the kernel_force_cache API to allow this. Signed-off-by: Laura Abbott --- v3: Switch to calling cache

Re: [RFCv3][PATCH 3/5] arm64: Implement ARCH_HAS_FORCE_CACHE

2016-09-13 Thread Laura Abbott
On 09/13/2016 08:14 AM, Will Deacon wrote: On Tue, Sep 13, 2016 at 08:02:20AM -0700, Laura Abbott wrote: On 09/13/2016 02:19 AM, Will Deacon wrote: On Mon, Sep 12, 2016 at 02:32:56PM -0700, Laura Abbott wrote: arm64 may need to guarantee the caches are synced. Implement versions of the

[PATCH] staging: android: ion: Make ION_OF depend on OF_ADDRESS

2016-09-14 Thread Laura Abbott
ce to `of_platform_device_create' Add a dependency on OF_ADDRESS Reported-by: Guenter Roeck Signed-off-by: Laura Abbott --- Based on next-20160914 --- drivers/staging/android/ion/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/Kconfig b/drive

Re: [PATCH] staging: android ion/hisi: fix dependencies

2016-09-15 Thread Laura Abbott
_data' This selects the symbol when needed. Acked-by: Laura Abbott Signed-off-by: Arnd Bergmann Fixes: 2b40182a19bc ("staging: android: ion: Add ion driver for Hi6220 SoC platform") --- drivers/staging/android/ion/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/dri

Re: [PATCH -next] staging: android: ion: Fix return value check in hi6220_ion_probe()

2016-09-15 Thread Laura Abbott
On 09/14/2016 07:20 PM, Wei Yongjun wrote: From: Wei Yongjun In case of error, the function ion_device_create() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Acked-by: Laura Abbott Signed-off-by: Wei Yongjun

Re: [PATCH v3 1/2] staging: ion: Fix a coding style issue

2016-09-22 Thread Laura Abbott
); The patch looks fine though so assuming nothing else has changed Acked-by: Laura Abbott ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 2/2] staging: ion: Fix a coding style issue

2016-09-22 Thread Laura Abbott
On 09/22/2016 08:59 AM, Antti Keränen wrote: Correctly align an unaligned block comment Signed-off-by: Antti Keränen --- drivers/staging/android/uapi/ion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion

Re: [PATCH] staging: android: ion: mark symbols static where possible

2016-09-23 Thread Laura Abbott
pe for 'ion_setup_heap_common' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Acked-by: Laura Abbott Sign

Re: [PATCH v4] staging: ion: Fix a coding style issue

2016-09-23 Thread Laura Abbott
On 09/23/2016 11:03 AM, Antti Keränen wrote: This patch fixes the alignment of an allocation flag block comment and moves the comments before each #define. Acked-by: Laura Abbott Signed-off-by: Antti Keränen --- In addition to fixing the alignment issue, this version of the patch moves

Re: [PATCH] staging: ion: Align cases with switch

2016-09-23 Thread Laura Abbott
On 09/23/2016 01:40 PM, Christopher Pezley wrote: The preferred indentation for cases and switches has the cases at the same level as the switch. Please remember to tag your patches with v2 when sending the next version to tell them apart (e.g. [PATCHv2]) Acked-by: Laura Abbott Signed-off

Re: [patch] staging: ion: use two separate locks for heaps and clients in ion_device

2016-10-04 Thread Laura Abbott
On 09/30/2016 01:18 AM, Xu YiPing wrote: ion_alloc may get into slow path to get free page, the call stack: __alloc_pages_slowpath ion_page_pool_alloc_pages alloc_buffer_page ion_system_heap_allocate ion_buffer_create <-- hold ion_device->lock ion_alloc after that, kernel invokes low-memory ki

Re: [patch] staging: android/ion: testing the wrong variable

2016-10-12 Thread Laura Abbott
tree') Signed-off-by: Dan Carpenter Acked-by: Laura Abbott diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c index 15bac92..46b2bb9 100644 --- a/drivers/staging/android/ion/ion_of.c +++ b/drivers/staging/android/ion/ion_of.c @@ -107,7 +107,7 @@ struc

Re: [PATCH] staging: android: ion: Make ion_free asynchronous more actively.

2016-10-12 Thread Laura Abbott
On 10/10/2016 07:31 PM, ming.ling wrote: From: Ming Ling So far some ion heaps such as carveout_heap, chunk_heap, system_heap have freed buffers asynchrounously. Freed buffers are placed on a free list and freed from a low priority background thread. If allocations from a particular heap fail,

Re: [patch] staging: android: ion: Fix error handling in ion_query_heaps()

2016-10-12 Thread Laura Abbott
On 10/12/2016 05:49 AM, Dan Carpenter wrote: copy_to_user() returns the number of bytes remaining to be copied. We want to return -EFAULT here instead. Also there seems like no point in continuing the loop if copy_to_user() fails. Fixes: 02b23803c6af ('staging: android: ion: Add ioctl to query

Follow up on Ion from LPC

2016-11-18 Thread Laura Abbott
Hi, At LPC, I proposed a moratorium on new Ion features because of issues preventing Ion ever moving out of staging. Among other problems, the Ion caching model hasn't made much progress to a solution that is widely accepted and there are still problems with devicetree support. There were no stron

Re: [Linaro-mm-sig] Follow up on Ion from LPC

2016-11-29 Thread Laura Abbott
Device Allocator to take care of the constraint solving problem and the Ion/kernel portion to focus primarily on enumeration. Thanks, Laura > > Regards, > Benjamin > > 2016-11-18 22:07 GMT+01:00 Laura Abbott : >> Hi, >> >> At LPC, I proposed a moratorium on new

Re: [PATCH] Staging: Android: fix code style in ion_cma_heap.c

2017-08-24 Thread Laura Abbott
On 08/24/2017 08:40 AM, Abishek V Ashok wrote: > This is a patch to the ion_cma_heap.c file in > /drivers/staging/andrioid/ion that fixes a blank line and > kmalloc size warning found by the checkpatch.pl tool. > You've done two things in this patch, please stick to a single change per patch. >

Re: [PATCH 1/1] staging: ion: Fix error handling in ion_buffer_create

2015-09-30 Thread Laura Abbott
On 09/29/2015 10:37 PM, Rohit kumar wrote: This patch fixes error handling case when buffer->pages allocation fails. Also, it removes unreachable code of checking ret variable although it is not updated. Reviewed-by: Laura Abbott Signed-off-by: Rohit kumar --- drivers/staging/andr

[RFC][PATCH 2/2] staging: ion: Add files for parsing the devicetree (WIP)

2015-10-06 Thread Laura Abbott
From: Laura Abbott Devicetree is the preferred mechanism for platform definition these days. Add a set of files for supporting Ion with devicetree. This includes a set of bindings for heaps common across all devices and parsing methods. Clients may use the standard bindings or they can call the

[RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-06 Thread Laura Abbott
From: Laura Abbott This adds a base set of devicetree bindings for the Ion memory manager. This supports setting up the generic set of heaps and their properties. Signed-off-by: Laura Abbott Signed-off-by: Andrew Andrianov --- drivers/staging/android/ion/devicetree.txt | 53

[RFC][PATCH 0/2] Devicetree bindings for Ion

2015-10-06 Thread Laura Abbott
From: Laura Abbott Hi, At the last Plumbers and Linaro Connect, there was some discussion related to Ion. One of the items that came up towards eventually getting Ion out of staging was some concept of stable devicetree bindings. This is a proof of concept for bindings. Most of this is based

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-06 Thread Laura Abbott
On 10/6/15 3:35 PM, Rob Herring wrote: On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott wrote: From: Laura Abbott This adds a base set of devicetree bindings for the Ion memory manager. This supports setting up the generic set of heaps and their properties. Signed-off-by: Laura Abbott Signed

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-07 Thread Laura Abbott
On 10/7/15 11:36 AM, Rob Herring wrote: On Wed, Oct 7, 2015 at 5:36 AM, Andrew wrote: On 2015-10-07 02:01, Laura Abbott wrote: On 10/6/15 3:35 PM, Rob Herring wrote: On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott wrote: From: Laura Abbott This adds a base set of devicetree bindings for

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-22 Thread Laura Abbott
at 3:47 PM, Laura Abbott wrote: [...] +Example: + + ion { + compatbile = "linux,ion"; + #address-cells = <1>; + #size-cells = <0>; + + ion-system-heap { + linux,ion-heap-id = <0>; + linux,ion-heap-type = ; + linux,ion-heap-name = "system"; How does this va

Re: [PATCH] Staging: android: uapi: fixed comment block coding style error in ion.h

2015-10-26 Thread Laura Abbott
On 10/25/15 3:16 PM, Dzonatans Melgalvis wrote: Fixed checkpatch.pl warning about comment block coding style. The right aligned comments aren't great style. How about moving the comments (with the correct style) right above the macro they are describing. Signed-off-by: Dzonatans Melgalvis -

[RFC PATCHv3 05/11] staging: lustre: Use is_vmalloc_addr

2014-01-02 Thread Laura Abbott
Instead of manually checking the bounds of VMALLOC_START and VMALLOC_END, just use is_vmalloc_addr. That's what the function was designed for. Signed-off-by: Laura Abbott --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)

Re: [patch] Documentation/email-clients.txt: add a section about git

2014-05-07 Thread Laura Abbott
On 5/7/2014 4:17 AM, Dan Carpenter wrote: > These days most people don't use git to send patches so I have added a > section about that. > Do you mean most people *do* use git to send patches? Or most people don't use e-mail clients? Laura -- Qualcomm Innovation Center, Inc. is a member of Cod

Re: [PATCH 1/1] [ion]: system-heap use PAGE_ALLOC_COSTLY_ORDER for high order

2014-10-06 Thread Laura Abbott
On 10/6/2014 3:27 AM, Heesub Shin wrote: Hello Kumar, On 10/06/2014 05:31 PM, Pintu Kumar wrote: The Android ion_system_heap uses allocation fallback mechanism based on 8,4,0 order pages available in the system. It changes gfp flags based on higher order allocation request. This higher order va

Re: [RFCv2 1/3] staging: ion: shrink page-pool by page unit

2014-10-24 Thread Laura Abbott
Hi, On 10/23/2014 11:47 PM, Gioh Kim wrote: This patch shrink page-pool by page unit. Can you explain a bit more about what this patch is fixing? The description in the cover letter would be helpful here. Thanks, Laura -- Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is

Re: [RFCv2 2/3] staging: ion: debugfs to shrink pool

2014-10-24 Thread Laura Abbott
Hi, On 10/23/2014 11:47 PM, Gioh Kim wrote: This patch creates debugfs files, /sys/kernel/debug/ion/heaps/system_shrink, to shrink pool or get pool size. Reading the file returns pool size and writing occurs to shrink pool. Can you clarify here that you are updating the existing debugfs infra

Re: [RFCv2 3/3] staging: ion: limit pool size

2014-10-24 Thread Laura Abbott
Hi, On 10/23/2014 11:47 PM, Gioh Kim wrote: This patch limits pool size by page unit. This looks useful. Might be nice to add a debugfs option to change this at runtime as well. Signed-off-by: Gioh Kim --- drivers/staging/android/ion/Kconfig |4 drivers/staging/android/

Re: [RFC] stating: ion: use hot page first in pool

2014-10-29 Thread Laura Abbott
On 10/28/2014 9:57 PM, Gioh Kim wrote: > > Hello, > > I found that ion insert freed-page at the tail of list > and extract at the head. > > I think it is good for cache to use the most recently used page > but these pages in pool are not cached memory. > So I'm not sure using hot page is better

Re: [PATCH] ion: Handle the memory mapping correctly on x86

2015-08-07 Thread Laura Abbott
On 08/03/2015 05:21 PM, Radhakrishna, Pradeep wrote: From b4069e7fe1b2aa1660b3f944e246c13b4947db21 Mon Sep 17 00:00:00 2001 From: Zhebin Jin Date: Wed, 8 Jul 2015 10:35:06 +0800 Subject: [PATCH] ion: Handle the memory mapping correctly on x86 This patch modifies the ion page pool code to addre

Re: [PATCH] staging: ion: fix corruption of ion_import_dma_buf

2015-09-09 Thread Laura Abbott
(adding Colin and John) On 09/09/2015 12:41 AM, Shawn Lin wrote: we found this issue but still exit in lastest kernel. Simply keep ion_handle_create under mutex_lock to avoid this race. WARNING: CPU: 2 PID: 2648 at drivers/staging/android/ion/ion.c:512 ion_handle_add+0xb4/0xc0() ion_handle_add

Re: [PATCH] staging: ion: fix corruption of ion_import_dma_buf

2015-09-10 Thread Laura Abbott
On 09/09/2015 10:41 PM, Colin Cross wrote: On Wed, Sep 9, 2015 at 10:19 AM, Laura Abbott wrote: (adding Colin and John) On 09/09/2015 12:41 AM, Shawn Lin wrote: we found this issue but still exit in lastest kernel. Simply keep ion_handle_create under mutex_lock to avoid this race. WARNING

Re: [PATCH] drivers: android: fix watermark when cma enabled

2014-08-12 Thread Laura Abbott
On 8/10/2014 7:06 PM, Zengtao (B) wrote: > From: Zeng Tao > Date: Tue, 5 Aug 2014 17:58:10 +0800 > Subject: [PATCH] drivers: android: fix watermark when cma enabled > > when cma is enabled, the watermark caculation will include the cma pages, > while it can't use cma pages. > this will cause oom

Re: WARNING in __alloc_pages_slowpath

2018-01-04 Thread Laura Abbott
On 01/04/2018 06:10 AM, Vlastimil Babka wrote: On 01/04/2018 02:57 PM, syzbot wrote: Hello, syzkaller hit the following crash on 71ee203389f7cb1c1927eab22b95baa01405791c git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attache

Re: WARNING in ion_ioctl

2018-01-04 Thread Laura Abbott
On 01/04/2018 06:13 AM, Dmitry Vyukov wrote: On Thu, Jan 4, 2018 at 3:06 PM, Greg KH wrote: On Thu, Jan 04, 2018 at 05:57:01AM -0800, syzbot wrote: Hello, syzkaller hit the following crash on 71ee203389f7cb1c1927eab22b95baa01405791c git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux

[PATCH 2/2] staging: android: ion: Switch from WARN to pr_warn

2018-01-05 Thread Laura Abbott
: Laura Abbott --- drivers/staging/android/ion/ion-ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion-ioctl.c b/drivers/staging/android/ion/ion-ioctl.c index 6ed2cc15c8c0..a8d3cc412fb9 100644 --- a/drivers/staging/android/ion/ion-ioctl.c

[PATCH 1/2] staging: android: ion: Add __GFP_NOWARN for system contig heap

2018-01-05 Thread Laura Abbott
the kernel is free to deny its allocation), silence the allocation attempt with __GFP_NOWARN in case it fails. Reported-by: syzbot+76e7efc4748495855...@syzkaller.appspotmail.com Reported-by: syzbot Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed

Re: [PATCH 1/2] staging: android: ion: Add __GFP_NOWARN for system contig heap

2018-01-05 Thread Laura Abbott
On 01/05/2018 11:36 AM, Chris Wilson wrote: Quoting Laura Abbott (2018-01-05 19:14:08) syzbot reported a warning from Ion: WARNING: CPU: 1 PID: 3485 at mm/page_alloc.c:3926 ... __alloc_pages_nodemask+0x9fb/0xd80 mm/page_alloc.c:4252 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c

Re: WARNING in ion_buffer_destroy

2018-01-10 Thread Laura Abbott
On 01/09/2018 02:58 PM, syzbot wrote: Hello, syzkaller hit the following crash on 06d41862286aa7bc634a1dd9e6e7e96f925ef30a git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached. C reproducer

Re: suspicious RCU usage at drivers/staging/android/ion/ion-ioctl.c:LINE

2018-01-10 Thread Laura Abbott
On 01/10/2018 03:18 AM, syzbot wrote: Hello, syzkaller hit the following crash on 69eed2290e1d81b7a33774a24bbcb79f51958e57 git://git.cmpxchg.org/linux-mmots.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached. Unfortunately, I don't have any reproduce

Re: 答复: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting

2018-01-10 Thread Laura Abbott
On 01/09/2018 04:06 AM, Zengtao (B) wrote: -邮件原件- 发件人: Dan Carpenter [mailto:dan.carpen...@oracle.com] 发送时间: 2018年1月9日 17:14 收件人: Chenfeng (puck) 抄送: Zengtao (B) ; labb...@redhat.com; sumit.sem...@linaro.org; gre...@linuxfoundation.org; a...@android.com; tk...@android.com; m...@android.c

Re: 答复: 答复: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting

2018-01-11 Thread Laura Abbott
On 01/10/2018 06:06 PM, Zengtao (B) wrote: -邮件原件- 发件人: Laura Abbott [mailto:labb...@redhat.com] 发送时间: 2018年1月11日 8:01 收件人: Zengtao (B) ; Dan Carpenter ; Chenfeng (puck) 抄送: sumit.sem...@linaro.org; gre...@linuxfoundation.org; a...@android.com; tk...@android.com; m...@android.com; de

Re: [PATCH v2] staging: android: ion: Zero CMA allocated memory

2018-01-24 Thread Laura Abbott
On 01/22/2018 09:46 AM, Liam Mark wrote: Since commit 204f672255c2 ("staging: android: ion: Use CMA APIs directly") the CMA API is now used directly and therefore the allocated memory is no longer automatically zeroed. Explicitly zero CMA allocated memory to ensure that no data is exposed to use

Re: [Linaro-mm-sig] [PATCH v3] staging: android: ion: Zero CMA allocated memory

2018-01-26 Thread Laura Abbott
On 01/26/2018 06:04 PM, Chen Feng wrote: On 2018/1/27 1:48, Liam Mark wrote: Since commit 204f672255c2 ("staging: android: ion: Use CMA APIs directly") the CMA API is now used directly and therefore the allocated memory is no longer automatically zeroed. Explicitly zero CMA allocated memory t

Re: [PATCH v3] staging: android: ion: Zero CMA allocated memory

2018-02-06 Thread Laura Abbott
exposed to userspace. Acked-by: Laura Abbott Fixes: 204f672255c2 ("staging: android: ion: Use CMA APIs directly") Signed-off-by: Liam Mark --- Changes in v2: - Clean up the commit message. - Add 'Fixes:' Changes in v3: - Add support for highmem pages drivers/stag

Re: [PATCH] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-06 Thread Laura Abbott
On 01/30/2018 08:01 PM, Yisheng Xie wrote: ion_buffer_fault_user_mappings's definition has been removed and not be used anymore, just remove its useless declaration. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.h | 9 - 1 file chang

Re: [PATCH] staging: android: ion: minor cleanup for ion_page_pool

2018-02-06 Thread Laura Abbott
On 01/31/2018 01:50 AM, Yisheng Xie wrote: ion_page_pool.c now is used to apply pool APIs for system heap, which do not need do any initial at device_initcall. Meanwhile, this patch also remove some useless include files. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers

Re: [PATCH 1/2] staging: android: ion: Avoid NULL point in error path

2018-02-06 Thread Laura Abbott
, it call dentry_path to found the path of debug_root, then a NULL point will occur. Fix this by avoiding call dentry_path, but show the debug name only when failed to create debug file for shrinker. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c

Re: [PATCH 2/2] staging: android: ion: Remove lable debugfs_done

2018-02-06 Thread Laura Abbott
On 02/01/2018 04:34 AM, Yisheng Xie wrote: When failed to create debug_root, we will go on initail other part of ion, so we can just info this message to user and do not need a lable to jump. Acked-by: Laura Abbott Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5

Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-06 Thread Laura Abbott
On 02/04/2018 07:26 PM, Yisheng Xie wrote: ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Can you clean up ion_page_pool_add to be a void return as

Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-06 Thread Laura Abbott
On 02/06/2018 03:10 PM, Laura Abbott wrote: On 02/04/2018 07:26 PM, Yisheng Xie wrote: ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Ca

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-06 Thread Laura Abbott
On 01/28/2018 08:24 AM, Alexey Skidanov wrote: Hi, According to my understanding, the allocation fall back order completely depends on heap->id that is assigned during the heap creation: plist_for_each_entry(heap, &dev->heaps, node) { /* if the caller didn't specify this heap id */

Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-02-06 Thread Laura Abbott
On 01/31/2018 10:10 PM, Alexey Skidanov wrote: On 01/31/2018 03:00 PM, Greg KH wrote: On Wed, Jan 31, 2018 at 02:03:42PM +0200, Alexey Skidanov wrote: Any driver may access shared buffers, created by ion, using dma_buf_vmap and dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated b

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-07 Thread Laura Abbott
On 02/06/2018 11:05 PM, Alexey Skidanov wrote: Yup, you've hit upon a key problem. Having fallbacks be stable was always a problem and the recommendation these days is to not rely on them. You can specify a heap at a time and fallback manually if you want that behavior. If you have a proposal

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-07 Thread Laura Abbott
On 02/07/2018 07:10 AM, Alexey Skidanov wrote: On 02/07/2018 04:58 PM, Laura Abbott wrote: On 02/06/2018 11:05 PM, Alexey Skidanov wrote: Yup, you've hit upon a key problem. Having fallbacks be stable was always a problem and the recommendation these days is to not rely on them. Yo

Re: ion kernel mapping implementation

2018-02-12 Thread Laura Abbott
On 02/10/2018 01:43 AM, Alexey Skidanov wrote: Hi, Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32 bit platforms, vmap() might fail on large enough buffers due to the limited available vmalloc space. dma_buf_kmap

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Laura Abbott
On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't allow to specify the requested allocation alignment. CMA heap allocates buffers aligned on buffer size page order. Sometimes, the alignment requirement is less restrictive. In such cases, providing specif

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Laura Abbott
On 02/12/2018 11:11 AM, Alexey Skidanov wrote: On 02/12/2018 08:42 PM, Laura Abbott wrote: On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't allow to specify the requested allocation alignment. CMA heap allocates buffers aligned on buffer size

Re: ion kernel mapping implementation

2018-02-12 Thread Laura Abbott
On 02/12/2018 11:21 AM, Alexey Skidanov wrote: On 02/12/2018 08:30 PM, Laura Abbott wrote: On 02/10/2018 01:43 AM, Alexey Skidanov wrote: Hi, Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32 bit platforms

Re: [PATCH] staging: android: ion: Restrict cache maintenance to dma mapped memory

2018-02-12 Thread Laura Abbott
On 02/09/2018 10:21 PM, Liam Mark wrote: The ION begin_cpu_access and end_cpu_access functions use the dma_sync_sg_for_cpu and dma_sync_sg_for_device APIs to perform cache maintenance. Currently it is possible to apply cache maintenance, via the begin_cpu_access and end_cpu_access APIs, to ION b

Re: [PATCH] staging: android: ion: Restrict cache maintenance to dma mapped memory

2018-02-12 Thread Laura Abbott
On 02/09/2018 10:21 PM, Liam Mark wrote: The ION begin_cpu_access and end_cpu_access functions use the dma_sync_sg_for_cpu and dma_sync_sg_for_device APIs to perform cache maintenance. Currently it is possible to apply cache maintenance, via the begin_cpu_access and end_cpu_access APIs, to ION b

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Laura Abbott
On 02/12/2018 12:22 PM, Alexey Skidanov wrote: On 02/12/2018 09:52 PM, Laura Abbott wrote: On 02/12/2018 11:11 AM, Alexey Skidanov wrote: On 02/12/2018 08:42 PM, Laura Abbott wrote: On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't all

Re: staging: android: ion: potential coherency issue

2018-02-13 Thread Laura Abbott
On 02/12/2018 11:24 PM, Alexey Skidanov wrote: Hello, Correct me if I'm wrong, but there is no user space interface, similar to the dma_buf_start_cpu_access()/dma_buf_end_cpu_access() to handle IO coherency. That is, on the platforms, where the SW is responsible for IO coherency handling, the fo

Re: [PATCH] staging: android: ion: Initialize dma_address of new sg list

2018-02-15 Thread Laura Abbott
On 02/12/2018 01:25 PM, Liam Mark wrote: On Mon, 12 Feb 2018, Dan Carpenter wrote: On Fri, Feb 09, 2018 at 10:16:56PM -0800, Liam Mark wrote: Fix the dup_sg_table function to initialize the dma_address of the new sg list entries instead of the source dma_address entries. Fixes: 17fd283f3870

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-15 Thread Laura Abbott
On 02/12/2018 02:33 PM, Alexey Skidanov wrote: Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32-bit platforms, vmap() might fail on large enough buffers due to the limited available vmalloc space. dma_buf_kmap() sh

[PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-15 Thread Laura Abbott
Ion is designed to be a framework used by other clients who perform operations on the buffer. Use the DRM vgem client as a simple consumer. In conjunction with the dma-buf sync ioctls, this tests the full attach/map path for the system heap. Signed-off-by: Laura Abbott --- tools/testing

[PATCH 1/2] selftests: ion: Remove some prints

2018-02-15 Thread Laura Abbott
There's no need to print messages each time we alloc and free. Remove them. Signed-off-by: Laura Abbott --- tools/testing/selftests/android/ion/ionutils.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tools/testing/selftests/android/ion/ionutils.c b/tools/testing/selftests/an

[RFC PATCH 0/2] Ion unit test with VGEM

2018-02-15 Thread Laura Abbott
l comments. Thanks, Laura Laura Abbott (2): selftests: ion: Remove some prints selftests: ion: Add simple test with the vgem driver tools/testing/selftests/android/ion/Makefile | 3 +- tools/testing/selftests/android/ion/config| 1 + tools/testing/selftests/android/ion/ion

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Laura Abbott
On 02/16/2018 04:17 AM, Alexey Skidanov wrote: On 02/16/2018 01:48 AM, Laura Abbott wrote: On 02/12/2018 02:33 PM, Alexey Skidanov wrote: Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32-bit platforms, vmap

Re: [PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-19 Thread Laura Abbott
On 02/19/2018 07:31 AM, Daniel Vetter wrote: On Thu, Feb 15, 2018 at 05:24:45PM -0800, Laura Abbott wrote: Ion is designed to be a framework used by other clients who perform operations on the buffer. Use the DRM vgem client as a simple consumer. In conjunction with the dma-buf sync ioctls

[PATCHv2 0/2] Ion unit test with VGEM

2018-02-21 Thread Laura Abbott
er to actually make some of the dma_buf calls. The vgem DRM driver exists mostly for testing and works great for this case. Changes since v1: - Dropped RFC - Feedback/review from Daniel Vetter about DRM ioctls Thanks, Laura Laura Abbott (2): selftests: ion: Remove some prints selftests: ion

[PATCHv2 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-21 Thread Laura Abbott
Ion is designed to be a framework used by other clients who perform operations on the buffer. Use the DRM vgem client as a simple consumer. In conjunction with the dma-buf sync ioctls, this tests the full attach/map path for the system heap. Reviewed-by: Daniel Vetter Signed-off-by: Laura Abbott

[PATCHv2 1/2] selftests: ion: Remove some prints

2018-02-21 Thread Laura Abbott
There's no need to print messages each time we alloc and free. Remove them. Signed-off-by: Laura Abbott --- v2: No changes --- tools/testing/selftests/android/ion/ionutils.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tools/testing/selftests/android/ion/ionutils.c b/tools/te

Re: [PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-26 Thread Laura Abbott
On 02/26/2018 09:07 AM, Shuah Khan wrote: On 02/19/2018 11:33 AM, Daniel Vetter wrote: On Mon, Feb 19, 2018 at 10:18:21AM -0800, Laura Abbott wrote: On 02/19/2018 07:31 AM, Daniel Vetter wrote: On Thu, Feb 15, 2018 at 05:24:45PM -0800, Laura Abbott wrote: Ion is designed to be a framework

Re: [RFC] android: ion: How to properly clean caches for uncached allocations

2018-03-07 Thread Laura Abbott
On 02/28/2018 09:18 PM, Liam Mark wrote: The issue: Currently in ION if you allocate uncached memory it is possible that there are still dirty lines in the cache. And often these dirty lines in the cache are the zeros which were meant to clear out any sensitive kernel data. What this means is

Re: [RFC] android: ion: How to properly clean caches for uncached allocations

2018-03-08 Thread Laura Abbott
On 03/08/2018 04:45 PM, Liam Mark wrote: On Wed, 7 Mar 2018, Laura Abbott wrote: On 02/28/2018 09:18 PM, Liam Mark wrote: The issue: Currently in ION if you allocate uncached memory it is possible that there are still dirty lines in the cache. And often these dirty lines in the cache are

Re: [PATCH] staging: android: ion: Update wording in drivers/staging/android/ion/Kconfig

2018-03-16 Thread Laura Abbott
e that can be shared between drivers. If you're not using Android its probably safe to The formatting here looks a little funny, did you manually edit the patch to take out the diff-stat and index? The patch seem to apply okay, so I'm just curious. Eithe

Re: [PATCH] staging: ion: remove from the tree

2020-08-27 Thread Laura Abbott
, just drop the in-kernel copy of the ion code now, as it's not used, and is only causing problems for everyone involved. Cc: "Arve Hjønnevåg" Cc: "Christian König" Cc: Christian Brauner Cc: Christoph Hellwig Cc: Hridya Valsaraju Cc: Joel Fernandes Cc: John Stultz Cc:

<    1   2   3   4