Re: [PATCH v3 2/2] dmabuf: Add dmabuf inode number to /proc/*/fdinfo

2021-02-05 Thread Kalesh Singh
On Fri, Feb 5, 2021 at 2:56 AM Christian König wrote: > > Am 05.02.21 um 03:23 schrieb Kalesh Singh: > > If a FD refers to a DMA buffer add the DMA buffer inode number to > > /proc//fdinfo/ and /proc//task//fdindo/. > > > > The dmabuf inode number allows userspace t

[PATCH v2 1/2] procfs: Allow reading fdinfo with PTRACE_MODE_READ

2021-02-05 Thread Kalesh Singh
info under PTRACE_MODE_READ_FSCRED. Suggested-by: Jann Horn Signed-off-by: Kalesh Singh --- Changes in v2: - Update patch desciption fs/proc/base.c | 4 ++-- fs/proc/fd.c | 15 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index b3

[PATCH v3 1/2] procfs: Allow reading fdinfo with PTRACE_MODE_READ

2021-02-05 Thread Kalesh Singh
info under PTRACE_MODE_READ_FSCRED. Suggested-by: Jann Horn Signed-off-by: Kalesh Singh --- Changes in v2: - Update patch description fs/proc/base.c | 4 ++-- fs/proc/fd.c | 15 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index b3

Re: [PATCH 0/2] Allow reading process DMA buf stats from fdinfo

2021-02-04 Thread Kalesh Singh
On Thu, Jan 28, 2021 at 1:24 PM Kalesh Singh wrote: > > Android captures per-process system memory state when certain low memory > events (e.g a foreground app kill) occur, to identify potential memory > hoggers. In order to measure how much memory a process actually consumes, >

[PATCH 0/2] Allow reading process DMA buf stats from fdinfo

2021-01-28 Thread Kalesh Singh
interface to debugging environments and is not suitable for production builds. Granting root privileges even to a system process increases the attack surface and is highly undesirable. This series proposes making the requirement to read fdinfo less strict with PTRACE_MODE_READ. Kalesh Singh (2)

[PATCH 2/2] dmabuf: Add dmabuf inode no to fdinfo

2021-01-28 Thread Kalesh Singh
The dmabuf inode number allows userspace to uniquely identify the buffer and avoids a dependency on /proc//fd/* when accounting per-process DMA buffer sizes. Signed-off-by: Kalesh Singh --- drivers/dma-buf/dma-buf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/dma-buf.c b

Re: [PATCH] procfs/dmabuf: Add /proc//task//dmabuf_fds

2021-01-28 Thread Kalesh Singh
On Wed, Jan 27, 2021 at 5:47 AM Jann Horn wrote: > > +jeffv from Android > > On Tue, Jan 26, 2021 at 11:51 PM Kalesh Singh wrote: > > In order to measure how much memory a process actually consumes, it is > > necessary to include the DMA buffer sizes for that process in t

[PATCH] procfs/dmabuf: Add /proc//task//dmabuf_fds

2021-01-27 Thread Kalesh Singh
Signed-off-by: Kalesh Singh --- Documentation/filesystems/proc.rst | 30 ++ drivers/dma-buf/dma-buf.c | 7 +- fs/proc/Makefile | 1 + fs/proc/base.c | 1 + fs/proc/dma_bufs.c | 159 + fs/proc/

Re: [PATCH 2/2] dmabuf/tracing: Add dma-buf trace events

2020-08-05 Thread Kalesh Singh
On Tue, Aug 04, 2020 at 02:09:13AM +0100, Al Viro wrote: > On Mon, Aug 03, 2020 at 11:28:31PM +0100, Al Viro wrote: > > > IOW, what the hell is that horror for? You do realize, for example, that > > there's > > such thing as dup(), right? And dup2() as well. And while we are at it, > > how >

Re: [PATCH 2/2] dmabuf/tracing: Add dma-buf trace events

2020-08-04 Thread Kalesh Singh
On Mon, Aug 03, 2020 at 11:32:39AM -0400, Steven Rostedt wrote: > On Mon, 3 Aug 2020 14:47:19 + > Kalesh Singh wrote: > > > +DECLARE_EVENT_CLASS(dma_buf_ref_template, > > + > > + TP_PROTO(struct task_struct *task, struct file *filp), > &

Re: [PATCH 1/2] fs: Add fd_install file operation

2020-08-04 Thread Kalesh Singh
On Mon, Aug 03, 2020 at 05:34:29PM +0100, Christoph Hellwig wrote: > On Mon, Aug 03, 2020 at 02:47:18PM +0000, Kalesh Singh wrote: > > Provides a per process hook for the acquisition of file descriptors, > > despite the method used to obtain the descriptor. > > > >