Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Joel Fernandes
On Mon, Sep 28, 2020 at 01:34:31PM -0700, Kees Cook wrote: > On Sun, Sep 27, 2020 at 07:35:26PM -0400, Joel Fernandes wrote: > > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > > > This patch series is a result of discussion at the refcount_t BOF > > > th

Re: [PATCH 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic32

2020-09-27 Thread Joel Fernandes
version doesn't change the overflow wrap around behavior. > > Signed-off-by: Shuah Khan Reviewed-by: Joel Fernandes (Google) thanks, - Joel > --- > drivers/android/binder.c | 41 --- > drivers/android/binder_internal.h | 3 ++- >

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-27 Thread Joel Fernandes
On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > This patch series is a result of discussion at the refcount_t BOF > the Linux Plumbers Conference. In this discussion, we identified > a need for looking closely and investigating atomic_t usages in > the kernel when it is used strictly

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

2020-08-27 Thread Joel Fernandes
27;s not used, and is only causing problems > > > > for everyone involved. > > > > > > > > Cc: "Arve Hjønnevåg" > > > > Cc: "Christian König" > > > > Cc: Christian Brauner > > > > Cc: Ch

Re: [PATCH 1/1] staging: android: ashmem: Fix lockdep warning for write operation

2020-07-29 Thread Joel Fernandes
ed memory. Therefore the race > that lockdep is warning about is not valid. Resolve this by introducing a > separate lockdep class for the backing shmem inodes. > > [1]: https://lkml.kernel.org/lkml/0b5f9d059aa20...@google.com/ > > Signed-off-by: Suren Baghda

[RFC] ashmem: Fix ashmem shrinker nr_to_scan

2020-03-05 Thread Joel Fernandes (Google)
nr_to_scan is the number of pages to be freed however ashmem doesn't discount nr_to_scan correctly as it frees ranges. It should be discounting them by pages than by ranges. Correct the issue. Cc: sur...@google.com Signed-off-by: Joel Fernandes (Google) --- drivers/staging/android/ashmem.

Re: [PATCH] staging: android: Delete the 'vsoc' driver

2020-02-03 Thread Joel Fernandes
. > > Cc: Greg Kroah-Hartman > Cc: Joel Fernandes Reviewed-by: Joel Fernandes (Google) thanks, - Joel > Cc: Greg Hartman > Cc: kernel-t...@android.com > Cc: de...@driverdev.osuosl.org > Signed-off-by: Alistair Delva > --- > drivers/staging/android/Kcon

Re: [PATCH v2] staging: android: ashmem: Disallow ashmem memory from being remapped

2020-01-27 Thread Joel Fernandes
map is done on the ashmem > region, then the permission checks will be skipped. Fix that by disallowing > mapping operation on the backing shmem file. Reviewed-by: Joel Fernandes (Google) thanks! - Joel > > Reported-by: Jann Horn > Signed-off-by: Suren Baghdasaryan > Cc: stab

Re: [PATCH] binder: prevent UAF read in print_binder_transaction_log_entry()

2019-10-09 Thread Joel Fernandes
On Wed, Oct 09, 2019 at 05:10:45PM +0200, Christian Brauner wrote: > On Wed, Oct 09, 2019 at 10:55:58AM -0400, Joel Fernandes wrote: > > On Wed, Oct 09, 2019 at 04:29:11PM +0200, Christian Brauner wrote: > > > On Wed, Oct 09, 2019 at 10:21:29AM -0400, Joel Fernandes wrote: >

Re: [PATCH] binder: prevent UAF read in print_binder_transaction_log_entry()

2019-10-09 Thread Joel Fernandes
On Wed, Oct 09, 2019 at 04:29:11PM +0200, Christian Brauner wrote: > On Wed, Oct 09, 2019 at 10:21:29AM -0400, Joel Fernandes wrote: > > On Wed, Oct 09, 2019 at 12:40:12PM +0200, Christian Brauner wrote: > > > On Tue, Oct 08, 2019 at 02:05:16PM -0400, Joel Fernandes wrote: >

Re: [PATCH] binder: prevent UAF read in print_binder_transaction_log_entry()

2019-10-09 Thread Joel Fernandes
On Wed, Oct 09, 2019 at 12:40:12PM +0200, Christian Brauner wrote: > On Tue, Oct 08, 2019 at 02:05:16PM -0400, Joel Fernandes wrote: > > On Tue, Oct 08, 2019 at 03:01:59PM +0200, Christian Brauner wrote: > > > When a binder transaction is initiated on a binder device coming fro

Re: [PATCH] binder: prevent UAF read in print_binder_transaction_log_entry()

2019-10-08 Thread Joel Fernandes
copying > the name of the binder device instead of stashing a pointer to it. > > Reported-by: Jann Horn > Fixes: 03e2e07e3814 ("binder: Make transaction_log available in binderfs") > Link: > https://lore.kernel.org/r/cag48ez14q0-f8lqsvcnbyr2o6gpw8shxsm4u5jmd9mpstem...@mail

[PATCH] binder: Fix comment headers on binder_alloc_prepare_to_free()

2019-09-30 Thread Joel Fernandes (Google)
binder_alloc_buffer_lookup() doesn't exist and is named "binder_alloc_prepare_to_free()". Correct the code comments to reflect this. Signed-off-by: Joel Fernandes (Google) --- drivers/android/binder_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Joel Fernandes
On September 4, 2019 7:19:35 AM EDT, Christian Brauner wrote: >On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote: >> Currently, the only way to access binder state and >> statistics is through debugfs. We need a way to >> access the same even when debugfs is not mounted. >> These pa

Re: [PATCH] binder: Use kmem_cache for binder_thread

2019-08-29 Thread Joel Fernandes
On Thu, Aug 29, 2019 at 08:42:29AM +0200, Greg KH wrote: > On Thu, Aug 29, 2019 at 01:49:53PM +0800, Peikan Tsai wrote: [snip] > > The allocated size for each binder_thread is 512 bytes by kzalloc. > > Because the size of binder_thread is fixed and it's only 304 bytes. > > It will save 208 bytes p

Re: [PATCH] binder: Use kmem_cache for binder_thread

2019-08-29 Thread Joel Fernandes
kmem_cache > for the binder_thread. Awesome change and observation!!! Reviewed-by: Joel Fernandes (Google) (Another thought: how did you discover this? Are you using some tools to look into slab fragmentation?). thanks, - Joel > Signed-off-by: Peikan Tsai > --- > drivers/android/bin

Re: [PATCH v3 1/2] binder: Add default binder devices through binderfs when configured

2019-08-15 Thread Joel Fernandes
inderfs instance instead of global devices > being created by the binder driver. > > Co-developed-by: Christian Brauner > Signed-off-by: Christian Brauner > Signed-off-by: Hridya Valsaraju Reviewed-by: Joel Fernandes (Google) thanks, - Joel > --- > > Changes in v2: &

Re: [PATCH v3 1/2] binder: Add default binder devices through binderfs when configured

2019-08-15 Thread Joel Fernandes
inderfs instance instead of global devices > being created by the binder driver. > > Co-developed-by: Christian Brauner > Signed-off-by: Christian Brauner > Signed-off-by: Hridya Valsaraju > --- Reviewed-by: Joel Fernandes (Google) thanks, - Joel > > Changes in v2: &

Re: [PATCH v3 2/2] binder: Validate the default binderfs device names.

2019-08-15 Thread Joel Fernandes
nce. > > Co-developed-by: Christian Brauner > Signed-off-by: Christian Brauner > Signed-off-by: Hridya Valsaraju > --- Reviewed-by: Joel Fernandes (Google) thanks, - Joel > drivers/android/binderfs.c | 12 > 1 file changed, 12 insertions(+) > > diff --git

Re: Limits for ION Memory Allocator

2019-07-26 Thread Joel Fernandes
On Wed, Jul 24, 2019 at 4:24 PM John Stultz wrote: > > On Wed, Jul 24, 2019 at 1:18 PM John Stultz wrote: > > > > On Wed, Jul 24, 2019 at 12:36 PM Laura Abbott wrote: > > > > > > On 7/17/19 12:31 PM, Alexander Popov wrote: > > > > Hello! > > > > > > > > The syzkaller [1] has a trouble with fuzzi

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-05-07 Thread Joel Fernandes
L, Tim > Murray, Michal Hocko, Suren Baghdasaryan, linux-mm, Arve Hjønnevåg, > Ingo Molnar, Steven Rostedt, Oleg Nesterov, Joel Fernandes, Andy > Lutomirski, kernel-team > > > On Tue, May 07, 2019 at 01:12:36AM -0700, Sultan Alsawaf wrote: > > > On Tue, May 07, 2019 at

Re: pidfd design

2019-03-20 Thread Joel Fernandes
On Wed, Mar 20, 2019 at 07:51:57PM +0100, Christian Brauner wrote: [snip] > > > translate_pid() should just return you a pidfd. Having it return a pidfd > > > and a status fd feels like stuffing too much functionality in there. If > > > you're fine with it I'll finish prototyping what I had in mind

Re: pidfd design

2019-03-20 Thread Joel Fernandes
On Wed, Mar 20, 2019 at 07:26:50PM +0100, Christian Brauner wrote: > On Wed, Mar 20, 2019 at 07:33:51AM -0400, Joel Fernandes wrote: > > > > > > On March 20, 2019 3:02:32 AM EDT, Daniel Colascione > > wrote: > > >On Tue, Mar 19, 2019 at 8:59 PM Christian B

Re: pidfd design

2019-03-20 Thread Joel Fernandes
On March 20, 2019 3:02:32 AM EDT, Daniel Colascione wrote: >On Tue, Mar 19, 2019 at 8:59 PM Christian Brauner > wrote: >> >> On Tue, Mar 19, 2019 at 07:42:52PM -0700, Daniel Colascione wrote: >> > On Tue, Mar 19, 2019 at 6:52 PM Joel Fernandes > wrote: >> &

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-19 Thread Joel Fernandes
On Wed, Mar 20, 2019 at 12:10:23AM +0100, Christian Brauner wrote: > On Tue, Mar 19, 2019 at 03:48:32PM -0700, Daniel Colascione wrote: > > On Tue, Mar 19, 2019 at 3:14 PM Christian Brauner > > wrote: > > > So I dislike the idea of allocating new inodes from the procfs super > > > block. I would

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-19 Thread Joel Fernandes
On Tue, Mar 19, 2019 at 11:14:17PM +0100, Christian Brauner wrote: [snip] > > > > ---8<--- > > > > From: Joel Fernandes > > Subject: [PATCH] Partial skeleton prototype of pidfd_wait frontend > > > > Signed-off-by: Joel Fe

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-18 Thread Joel Fernandes
On Mon, Mar 18, 2019 at 01:29:51AM +0100, Christian Brauner wrote: > On Sun, Mar 17, 2019 at 08:40:19AM -0700, Daniel Colascione wrote: > > On Sun, Mar 17, 2019 at 4:42 AM Christian Brauner > > wrote: > > > > > > On Sat, Mar 16, 2019 at 09:53:06PM -0400, Joel Fer

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-16 Thread Joel Fernandes
> > wrote: > > > > > > > > On Fri, Mar 15, 2019 at 11:49 AM Joel Fernandes > > > > wrote: > > > > > > > > > > On Fri, Mar 15, 2019 at 07:24:28PM +0100, Christian Brauner wrote: > > > > > [..] > > >

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-15 Thread Joel Fernandes
On Fri, Mar 15, 2019 at 07:24:28PM +0100, Christian Brauner wrote: [..] > > why do we want to add a new syscall (pidfd_wait) though? Why not just use > > standard poll/epoll interface on the proc fd like Daniel was suggesting. > > AFAIK, once the proc file is opened, the struct pid is essentially p

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-15 Thread Joel Fernandes
On Fri, Mar 15, 2019 at 07:03:07PM +0100, Christian Brauner wrote: > On Thu, Mar 14, 2019 at 09:36:43PM -0700, Daniel Colascione wrote: > > On Thu, Mar 14, 2019 at 8:16 PM Steven Rostedt wrote: > > > > > > On Thu, 14 Mar 2019 13:49:11 -0700 > > > Sultan Alsawaf wrote: > > > > > > > Perhaps I'm mi

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-15 Thread Joel Fernandes
On Thu, Mar 14, 2019 at 09:36:43PM -0700, Daniel Colascione wrote: [snip] > > If you can solve this with an ebpf program, I > > strongly suggest you do that instead. > > Regarding process death notification: I will absolutely not support > putting aBPF and perf trace events on the critical path o

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-14 Thread Joel Fernandes
On Thu, Mar 14, 2019 at 01:49:11PM -0700, Sultan Alsawaf wrote: > On Thu, Mar 14, 2019 at 10:47:17AM -0700, Joel Fernandes wrote: > > About the 100ms latency, I wonder whether it is that high because of > > the way Android's lmkd is observing that a process has died. There

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-14 Thread Joel Fernandes
Hi Tim, Thanks for the detailed and excellent write-up. It will serve as a good future reference for low memory killer requirements. I made some comments below on the "how to kill" part. On Tue, Mar 12, 2019 at 10:17 AM Tim Murray wrote: > > On Tue, Mar 12, 2019 at 9:37 AM Sultan Alsawaf wrote:

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-11 Thread Joel Fernandes
On Mon, Mar 11, 2019 at 01:46:26PM -0700, Sultan Alsawaf wrote: > On Mon, Mar 11, 2019 at 01:10:36PM -0700, Suren Baghdasaryan wrote: > > The idea seems interesting although I need to think about this a bit > > more. Killing processes based on failed page allocation might backfire > > during transi

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-11 Thread Joel Fernandes
On Mon, Mar 11, 2019 at 12:32:33PM -0400, Joel Fernandes wrote: > On Sun, Mar 10, 2019 at 01:34:03PM -0700, Sultan Alsawaf wrote: > [...] > > > > /* Perform scheduler related setup. Assign this task to a CPU. */ > > retval = sched_fork(clone_flags, p); > >

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-11 Thread Joel Fernandes
On Sun, Mar 10, 2019 at 01:34:03PM -0700, Sultan Alsawaf wrote: [...] > > /* Perform scheduler related setup. Assign this task to a CPU. */ > retval = sched_fork(clone_flags, p); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 3eb01dedf..fd0d697c6 100644 > --- a/mm/page_alloc

Re: [PATCH] binder: fix race between munmap() and direct reclaim

2019-03-05 Thread Joel Fernandes
ult in > > > calling zap_page_range() with an invalid vma which manifests as a > > > use-after-free in zap_page_range(). > > > > > > The fix is to check alloc->vma after acquiring the mmap_sem (which we > > > were acquiring anyway) and skip zap_page_range

Re: [PATCH] staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held.

2019-02-25 Thread Joel Fernandes
Signed-off-by: Tetsuo Handa > Cc: sta...@vger.kernel.org Properly this time, Reviewed-by: Joel Fernandes thanks, - Joel > --- > drivers/staging/android/ashmem.c | 42 > +++- > 1 file changed, 24 insertions(+), 18 deletions(-) > > diff -

Re: [PATCH] staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held.

2019-02-25 Thread Joel Fernandes
On Mon, Feb 25, 2019 at 2:11 PM Tetsuo Handa wrote: > > On 2019/02/26 6:55, Joel Fernandes wrote: > >> @@ -763,6 +767,8 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, > >> unsigned long cmd, > >> > >> out_unlock: > >>

Re: [PATCH] staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held.

2019-02-25 Thread Joel Fernandes
t; Signed-off-by: Tetsuo Handa > Cc: sta...@vger.kernel.org Reviewed-by: Joel Fernandes (Google) thanks, - Joel > --- > drivers/staging/android/ashmem.c | 42 > +++- > 1 file changed, 24 insertions(+), 18 deletions(-) > > diff --gi

Re: [PATCH v3 1/7] binder: create userspace-to-binder-buffer copy function

2019-02-14 Thread Joel Fernandes
On Thu, Feb 14, 2019 at 01:55:19PM -0800, 'Todd Kjos' via kernel-team wrote: > On Thu, Feb 14, 2019 at 1:25 PM Joel Fernandes wrote: > > > > On Thu, Feb 14, 2019 at 03:53:54PM -0500, Joel Fernandes wrote: > > > On Thu, Feb 14, 2019 at 3:42 PM Todd Kjos wrote: &g

Re: [PATCH v3 1/7] binder: create userspace-to-binder-buffer copy function

2019-02-14 Thread Joel Fernandes
On Thu, Feb 14, 2019 at 03:53:54PM -0500, Joel Fernandes wrote: > On Thu, Feb 14, 2019 at 3:42 PM Todd Kjos wrote: > > > > On Thu, Feb 14, 2019 at 11:45 AM Joel Fernandes wrote: > [snip] > > > > + * check_buffer() - verify that buffer/offset is safe to access > &

Re: [PATCH v3 1/7] binder: create userspace-to-binder-buffer copy function

2019-02-14 Thread Joel Fernandes
On Thu, Feb 14, 2019 at 3:42 PM Todd Kjos wrote: > > On Thu, Feb 14, 2019 at 11:45 AM Joel Fernandes wrote: [snip] > > > + * check_buffer() - verify that buffer/offset is safe to access > > > + * @alloc: binder_alloc for this proc > > > + * @buffer: binder buffer

Re: [PATCH 2/2] staging: android: ashmem: Don't allow range_alloc() to fail.

2019-02-14 Thread Joel Fernandes
On Sat, Feb 09, 2019 at 11:24:03AM +0900, Tetsuo Handa wrote: > On 2019/02/08 23:45, Joel Fernandes wrote: > > On Wed, Feb 06, 2019 at 08:45:32AM +0900, Tetsuo Handa wrote: > >> Joel Fernandes wrote: > >>> On Tue, Feb 05, 2019 at 07:28:41PM +0900, Tetsuo Handa wrote:

Re: [PATCH 2/2] staging: android: ashmem: Don't allow range_alloc() to fail.

2019-02-08 Thread Joel Fernandes
On Wed, Feb 06, 2019 at 08:45:32AM +0900, Tetsuo Handa wrote: > Joel Fernandes wrote: > > On Tue, Feb 05, 2019 at 07:28:41PM +0900, Tetsuo Handa wrote: > > > ashmem_pin() is calling range_shrink() without checking whether > > > range_alloc() succeeded. Since memory alloc

Re: [PATCH 1/3] sched/wait: use freezable_schedule when possible

2019-02-07 Thread Joel Fernandes
On Thu, Feb 07, 2019 at 12:30:50AM +0100, Hugo Lefeuvre wrote: > Hi Joel, > > > I'm curious did you try the freezing process and see if pointless wakeups > > are > > reduced? That would be an added bonus if you did. > > I'm currently testing these changes. I hope to be able to come back with >

Re: [PATCH 2/3] sched/wait: introduce wait_event_freezable_hrtimeout

2019-02-05 Thread Joel Fernandes
off-by: Hugo Lefeuvre > --- Reviewed-by: Joel Fernandes (Google) thanks, - Joel > include/linux/wait.h | 25 + > 1 file changed, 21 insertions(+), 4 deletions(-) > > diff --git a/include/linux/wait.h b/include/linux/wait.h > index 5f3efabc36f4..c4

Re: [PATCH 1/3] sched/wait: use freezable_schedule when possible

2019-02-05 Thread Joel Fernandes
sleeping. > > The result is a potential performance gain during freeze, since less > tasks have to be awaken. Reviewed-by: Joel Fernandes (Google) thanks, - Joel > > Signed-off-by: Hugo Lefeuvre > --- > include/linux/wait.h | 6 +++--- > 1 file changed, 3 insertions(+),

Re: [PATCH 1/2] staging: android: ashmem: Don't call fallocate() with ashmem_mutex held.

2019-02-05 Thread Joel Fernandes
: syzbot > Signed-off-by: Tetsuo Handa > Cc: sta...@vger.kernel.org > --- Please in the future, include some information about what changed from previous patches, or atleast add a cover letter. And use patch revision numbers. It is hard to know what changed from previous review. Th

Re: [PATCH 2/2] staging: android: ashmem: Don't allow range_alloc() to fail.

2019-02-05 Thread Joel Fernandes
On Tue, Feb 05, 2019 at 07:28:41PM +0900, Tetsuo Handa wrote: > ashmem_pin() is calling range_shrink() without checking whether > range_alloc() succeeded. Since memory allocation fault injection might > force range_alloc() to fail while range_alloc() is called for only once > for one ioctl() reques

Re: [PATCH 3/3] staging/android: simplify handle_vsoc_cond_wait

2019-02-04 Thread Joel Fernandes
I think you sent to wrong address of Alistair on these and other patches. Corrected address. On Fri, Feb 01, 2019 at 06:39:03AM +0100, Hugo Lefeuvre wrote: > simplify handle_vsoc_cond_wait (drivers/staging/android/vsoc.c) using newly > added wait_event_freezable_hrtimeout helper and remove useles

Re: [PATCH 1/3] sched/wait: use freezable_schedule when possible

2019-02-02 Thread Joel Fernandes
On Fri, Feb 01, 2019 at 06:38:05AM +0100, Hugo Lefeuvre wrote: > Replace schedule(); try_to_freeze() by freezable_schedule(). > > Tasks calling freezable_schedule() set the PF_FREEZER_SKIP flag > before calling schedule(). Unlike tasks calling schedule(); > try_to_freeze() tasks calling freezable_

Re: [PATCH] sched/wait: introduce wait_event_freezable_hrtimeout

2019-01-22 Thread Joel Fernandes
On Sat, Jan 19, 2019 at 11:29:12AM +0100, Hugo Lefeuvre wrote: > > > as far as I understand this code, freezable_schedule() avoids blocking the > > > freezer during the schedule() call, but in the end try_to_freeze() is > > > still > > > called so the result is the same, right? > > > I wonder why

Re: [PATCH] sched/wait: introduce wait_event_freezable_hrtimeout

2019-01-18 Thread Joel Fernandes
On Fri, Jan 18, 2019 at 06:08:01PM +0100, Hugo Lefeuvre wrote: [...] > > > +/* > > > + * like wait_event_hrtimeout() -- except it uses TASK_INTERRUPTIBLE to > > > avoid > > > + * increasing load and is freezable. > > > + */ > > > +#define wait_event_freezable_hrtimeout(wq_head, condition, timeout

Re: [PATCH] sched/wait: introduce wait_event_freezable_hrtimeout

2019-01-18 Thread Joel Fernandes
Hi Hugo, On Thu, Jan 17, 2019 at 11:41:35PM +0100, Hugo Lefeuvre wrote: > introduce wait_event_freezable_hrtimeout, an interruptible and freezable > version of wait_event_hrtimeout. > > simplify handle_vsoc_cond_wait (drivers/staging/android/vsoc.c) using this > newly added helper and remove usel

Re: [PATCH v3] binder: create node flag to request sender's security context

2019-01-14 Thread Joel Fernandes
On Mon, Jan 14, 2019 at 10:50:24AM -0800, Todd Kjos wrote: > On Mon, Jan 14, 2019 at 10:33 AM Joel Fernandes wrote: > > > > On Mon, Jan 14, 2019 at 09:10:21AM -0800, Todd Kjos wrote: > > > To allow servers to verify client identity, allow a node > > > flag t

Re: [PATCH v3] binder: create node flag to request sender's security context

2019-01-14 Thread Joel Fernandes
On Mon, Jan 14, 2019 at 09:10:21AM -0800, Todd Kjos wrote: > To allow servers to verify client identity, allow a node > flag to be set that causes the sender's security context > to be delivered with the transaction. The BR_TRANSACTION > command is extended in BR_TRANSACTION_SEC_CTX to > contain a

Re: [PATCH] ANDROID: doc: Fix spelling

2018-12-06 Thread Joel Fernandes
On Thu, Dec 06, 2018 at 03:52:43PM +, Daniel Bovensiepen wrote: > Fixed spelling in comment section. > > Signed-off-by: Daniel Bovensiepen Acked-by: Joel Fernandes (Google) > --- > drivers/staging/android/ashmem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 dele

Re: [PATCH 03/21] media: davinci_vpfe: fix vpfe_ipipe_init() error handling

2018-10-11 Thread Joel Fernandes
On Mon, Oct 08, 2018 at 09:46:01PM -0700, Joel Fernandes wrote: > On Fri, Apr 06, 2018 at 10:23:04AM -0400, Mauro Carvalho Chehab wrote: > > As warned: > > drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1834 vpfe_ipipe_init() > > error: we previously assumed 're

Re: [PATCH 03/21] media: davinci_vpfe: fix vpfe_ipipe_init() error handling

2018-10-08 Thread Joel Fernandes
On Fri, Apr 06, 2018 at 10:23:04AM -0400, Mauro Carvalho Chehab wrote: > As warned: > drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1834 vpfe_ipipe_init() > error: we previously assumed 'res' could be null (see line 1797) > > There's something wrong at vpfe_ipipe_init(): > > 1) it cache

Re: [PATCH] staging: android: ashmem: Shrink directly through shmem_fallocate

2018-07-16 Thread Joel Fernandes
On Mon, Jul 16, 2018 at 11:48:51AM +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 06, 2018 at 02:44:16PM -0700, Joel Fernandes wrote: > > From: Tobias Lindskog > > > > When ashmem_shrink is called from direct reclaim on a user thread, a > > call to do_fallocate will ch

[PATCH] ashmem: Shrink directly through shmem_fallocate

2018-07-06 Thread Joel Fernandes
areas. Because we know that we have a shmem file underneath, call the shmem implementation of fallocate directly instead of going through the user-space interface for fallocate. Bug: 21951515 Signed-off-by: Tobias Lindskog Signed-off-by: Jeff Vander Stoep Signed-off-by: Joel Fernandes (G

Re: [PATCH 2/2 v2] staging: android: ashmem: Fix mmap size validation

2018-06-20 Thread Joel Fernandes
On Wed, Jun 20, 2018 at 02:21:57PM -0700, Daniel Colascione wrote: > On Tue, Jun 19, 2018 at 9:32 PM, Joel Fernandes > wrote: > > On Tue, Jun 19, 2018 at 05:57:35PM -0700, Alistair Strachan wrote: > > > The ashmem driver did not check that the size/offset of the vma pass

Re: [PATCH 1/2] staging: android: ashmem: Remove use of unlikely()

2018-06-19 Thread Joel Fernandes
x-ker...@vger.kernel.org > Cc: kernel-t...@android.com > Cc: Joel Fernandes > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Alistair Strachan Acked-by: Joel Fernandes (Google) thanks, - Joel ___ devel mailing li

Re: [PATCH 2/2 v2] staging: android: ashmem: Fix mmap size validation

2018-06-19 Thread Joel Fernandes
Hjønnevåg > Cc: Todd Kjos > Cc: Martijn Coenen > Cc: de...@driverdev.osuosl.org > Cc: linux-ker...@vger.kernel.org > Cc: kernel-t...@android.com > Cc: Joel Fernandes > Signed-off-by: Alistair Strachan > --- > v2: Removed unnecessary use of unlikely() macro > >

Re: [PATCH] staging: android: ashmem: Fix possible deadlock in ashmem_ioctl

2018-03-19 Thread Joel Fernandes (Google)
On Tue, Feb 27, 2018 at 10:59 PM, Yisheng Xie wrote: > ashmem_mutex may create a chain of dependencies like: > > CPU0CPU1 > mmap syscall ioctl syscall > -> mmap_sem (acquired) -> ashmem_ioctl > -> ashmem_mmap