Re: [PATCH 4/4][PoC][RFC] Allow to trace fd usage with rlimit-events

2017-10-19 Thread Krzysztof Opasiak
Hi, On 10/19/2017 01:05 AM, Al Viro wrote: On Wed, Oct 18, 2017 at 10:32:30PM +0200, Krzysztof Opasiak wrote: @@ -417,7 +417,7 @@ static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) rlim_cur = task_rlimit(proc->tsk, RLIMIT_NOFILE); unlock_task_sighand(proc

Re: [PATCH 4/4][PoC][RFC] Allow to trace fd usage with rlimit-events

2017-10-18 Thread Al Viro
On Wed, Oct 18, 2017 at 10:32:30PM +0200, Krzysztof Opasiak wrote: > @@ -417,7 +417,7 @@ static int task_get_unused_fd_flags(struct binder_proc > *proc, int flags) > rlim_cur = task_rlimit(proc->tsk, RLIMIT_NOFILE); > unlock_task_sighand(proc->tsk, &irqs); > > - return __alloc_f

[PATCH 4/4][PoC][RFC] Allow to trace fd usage with rlimit-events

2017-10-18 Thread Krzysztof Opasiak
Add rlimit-events calls to file descriptors management code to allow tracing of FD usage. This allows userspace process (monitor) to get notification when other process (subject) uses given amount of file descriptors. This can be used to for example asynchronously monitor number of open FD's in s