Re: [PATCH v2 1/4] android: binder: Don't get mm from task

2017-10-24 Thread Arve Hjønnevåg
On Tue, Oct 24, 2017 at 12:28 AM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Mon, Oct 23, 2017 at 11:18:52AM -0700, Arve Hjønnevåg wrote: >> On Sat, Oct 21, 2017 at 1:15 AM, Greg Kroah-Hartman >> <gre...@linuxfoundation.org> wrote: >> > On F

Re: [PATCH v2 1/4] android: binder: Don't get mm from task

2017-10-23 Thread Arve Hjønnevåg
avoid a potential deadlock between lru lock, task lock and >> dentry lock, since a thread can be holding the task lock >> and the dentry lock while trying to acquire the lru lock. >> >> Acked-by: Arve Hjønnevåg <a...@android.com> >> Signed-off-by: Sherry Yang <s

Re: [PATCH v3 3/6] android: binder: Move buffer out of area shared with user space

2017-08-30 Thread Arve Hjønnevåg
to > kernel space? > The buffer headers have never been used by user-space. They are readable by user-space because the content after the header has to be readable from user-space (and only whole pages can be mapped). It was simpler to have the header in the same shared region as wel

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-13 Thread Arve Hjønnevåg
On Tue, Sep 13, 2016 at 12:32 AM, Peter Zijlstra <pet...@infradead.org> wrote: > On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: > >> A previous attempt to fix this problem, changed the lock to use >> rt_mutex instead of mutex, but this apparen

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-13 Thread Arve Hjønnevåg
On Mon, Sep 12, 2016 at 11:42 PM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: >> On Sat, Sep 10, 2016 at 10:28 AM, Greg Kroah-Hartman >> <gre...@linuxfoundation.org> wrote: >> > On S

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-12 Thread Arve Hjønnevåg
trigger this problem, but there are processes that receive work from both high and low priority threads and could still end up in the same situation. A previous attempt to fix this problem, changed the lock to use rt_mutex instead of mutex, but this apparently did not work as well as this patch. I believe the added overhead was noticeable, and it did not work when the preempted thread was in a different cgroup (I don't know if this is still the case). It would be useful to generic solution to this problem. > So don't worry, I'm not taking this change :) > > thanks, > > greg k-h -- Arve Hjønnevåg ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: android: lowmemorykiller.c: Fix checkpatch warning

2016-09-01 Thread Arve Hjønnevåg
total_swapcache_pages(); >> > + unsigned long nr_free = global_page_state(NR_FREE_PAGES); >> > + unsigned long nr_file = global_node_page_state(NR_FILE_PAGES); >> > + unsigned long nr_shmem = global_node_page_state(NR_SHMEM); >> > + int other_free = nr_free - totalreserve_pages; >> > + int other_file = nr_file - nr_shmem - total_swapcache_pages(); >> > >> > if (lowmem_adj_size < array_size) >> > array_size = lowmem_adj_size; >> I like it, much easier to follow. Care to resend it in a patch form I >> can apply it in? > > I think the android folk should figure out what the right thing > to do with the int/unsigned long calculation is first. > > Arve? Riley? > I think the end result is the same if you store it in an int. If you store the result in a long it will work better, but I don't know of anyone using lowmemorykilller on a system with more than 8TB of memory. -- Arve Hjønnevåg ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-01 Thread Arve Hjønnevåg
out loads of > testing having happened... > > thanks, > > greg k-h There is no alignment requirement on this area unless cache_is_vipt_aliasing returns true. In that case the area needs to be aligned with vma->vm_start which is done manually in the code right after

Re: [PATCH v2] android: binder: fix dangling pointer comparison

2016-08-31 Thread Arve Hjønnevåg
On Wed, Aug 31, 2016 at 6:22 AM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Thu, Aug 18, 2016 at 08:00:59PM -0700, Arve Hjønnevåg wrote: >> On Thu, Aug 18, 2016 at 7:30 PM, ZhaoJunmin Zhao(Junmin) >> <zhaojun...@huawei.com> wrote: >> > >

Re: [PATCH v2] android: binder: fix dangling pointer comparison

2016-08-18 Thread Arve Hjønnevåg
On Thu, Aug 18, 2016 at 7:30 PM, ZhaoJunmin Zhao(Junmin) <zhaojun...@huawei.com> wrote: > > > 在 2016/8/18 23:23, Greg Kroah-Hartman 写道: >> >> On Tue, Aug 16, 2016 at 07:44:59PM -0700, Arve Hjønnevåg wrote: >>> >>> On Mon, Aug 15, 2016 at 7:58 AM, Greg

Re: [PATCH v2] android: binder: fix dangling pointer comparison

2016-08-16 Thread Arve Hjønnevåg
don't think change description here is accurate. If a process calls execve, the old vma should be closed (and vma_vm_mm cleared) before the mm_struct that it belongs too is freed. -- Arve Hjønnevåg ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] android: binder: fix dangling pointer comparison

2016-06-15 Thread Arve Hjønnevåg
> } > > + mmput(proc->vma_vm_mm); > put_task_struct(proc->tsk); > > binder_debug(BINDER_DEBUG_OPEN_CLOSE, > -- > 2.8.0.rc3.226.g39d4020 > Does this work? In the past, holding a reference to a task's mm while the

Re: [PATCH] staging: android: binder: move to the real part of the kernel

2014-10-20 Thread Arve Hjønnevåg
. Yes. regards, dan carpenter -- Arve Hjønnevåg ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: binder: fix usage of uninit scalar in binder_transaction()

2014-05-06 Thread Arve Hjønnevåg
; } ref = binder_get_ref_for_node(target_proc, node); -- 1.9.1 Acked-by: Arve Hjønnevåg a...@android.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v1 9/9] staging: android: binder: Add binder compat layer

2013-12-12 Thread Arve Hjønnevåg
On Thu, Dec 12, 2013 at 12:45 AM, Octavian Purdila octavian.purd...@intel.com wrote: On Thu, Dec 12, 2013 at 1:00 AM, Arve Hjønnevåg a...@android.com wrote: On Wed, Dec 11, 2013 at 10:10 AM, Octavian Purdila octavian.purd...@intel.com wrote: On Wed, Dec 11, 2013 at 5:21 AM, Arve Hjønnevåg

Re: [PATCH v1 9/9] staging: android: binder: Add binder compat layer

2013-12-11 Thread Arve Hjønnevåg
On Wed, Dec 11, 2013 at 10:10 AM, Octavian Purdila octavian.purd...@intel.com wrote: On Wed, Dec 11, 2013 at 5:21 AM, Arve Hjønnevåg a...@android.com wrote: Assuming you are talking about a kernel compat layer that translates the flat_binder_object structs as they pass between 32 bit and 64

Re: [PATCH v1 9/9] staging: android: binder: Add binder compat layer

2013-12-10 Thread Arve Hjønnevåg
On Mon, Dec 9, 2013 at 7:01 PM, Octavian Purdila tavi.purd...@gmail.com wrote: On Thu, Dec 5, 2013 at 4:02 AM, Arve Hjønnevåg a...@android.com wrote: On Wed, Dec 4, 2013 at 2:02 PM, Greg KH gre...@linuxfoundation.org wrote: On Wed, Dec 04, 2013 at 01:55:34PM -0800, Colin Cross wrote: On Wed

Re: [PATCH v1 9/9] staging: android: binder: Add binder compat layer

2013-12-04 Thread Arve Hjønnevåg
old 32 bit userspace framework code on a 64 bit system. I think it is more important to not prevent mixed mode systems. -- Arve Hjønnevåg ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev