Re: [PATCH 3/4] binder: Add flags to relinquish ownership of fds

2023-01-20 Thread T.J. Mercier
On Fri, Jan 20, 2023 at 1:25 PM Carlos Llamas wrote: > > On Mon, Jan 09, 2023 at 09:38:06PM +, T.J. Mercier wrote: > > From: Hridya Valsaraju > > > > This patch introduces flags BINDER_FD_FLAG_XFER_CHARGE, and > > BINDER_FD_FLAG_XFER_CHARGE that a process sending an individual fd or > > I bel

Re: [PATCH 3/4] binder: Add flags to relinquish ownership of fds

2023-01-20 Thread Carlos Llamas
On Mon, Jan 09, 2023 at 09:38:06PM +, T.J. Mercier wrote: > From: Hridya Valsaraju > > This patch introduces flags BINDER_FD_FLAG_XFER_CHARGE, and > BINDER_FD_FLAG_XFER_CHARGE that a process sending an individual fd or I believe the second one was meant to be BINDER_FDA_FLAG_XFER_CHARGE. How

Re: [PATCH 3/4] binder: Add flags to relinquish ownership of fds

2023-01-10 Thread T.J. Mercier
On Mon, Jan 9, 2023 at 6:07 PM Hillf Danton wrote: > > On 9 Jan 2023 21:38:06 + T.J. Mercier > > > > @@ -2275,6 +2276,26 @@ static int binder_translate_fd(u32 fd, binder_size_t > > fd_offset, > > goto err_security; > > } > > > > + if (IS_ENABLED(CONFIG_MEMCG) && (flag

Re: [PATCH 3/4] binder: Add flags to relinquish ownership of fds

2023-01-09 Thread Hillf Danton
On 9 Jan 2023 21:38:06 + T.J. Mercier > > @@ -2275,6 +2276,26 @@ static int binder_translate_fd(u32 fd, binder_size_t > fd_offset, > goto err_security; > } > > + if (IS_ENABLED(CONFIG_MEMCG) && (flags & BINDER_FD_FLAG_XFER_CHARGE)) { > + struct dma_buf

[PATCH 3/4] binder: Add flags to relinquish ownership of fds

2023-01-09 Thread T.J. Mercier
From: Hridya Valsaraju This patch introduces flags BINDER_FD_FLAG_XFER_CHARGE, and BINDER_FD_FLAG_XFER_CHARGE that a process sending an individual fd or fd array to another process over binder IPC can set to relinquish ownership of the fd(s) being sent for memory accounting purposes. If the flag