On Tue, May 7, 2024 at 7:04 AM Christian König wrote:
>
> Am 07.05.24 um 15:39 schrieb Daniel Vetter:
> > On Tue, May 07, 2024 at 12:10:07PM +0200, Christian König wrote:
> >> Am 06.05.24 um 21:04 schrieb T.J. Mercier:
> >>> On Mon, May 6, 2024 at 2:30 AM Charan T
On Mon, May 6, 2024 at 2:30 AM Charan Teja Kalla
wrote:
>
> Hi TJ,
>
> Seems I have got answers from [1], where it is agreed upon epoll() is
> the source of issue.
>
> Thanks a lot for the discussion.
>
> [1] https://lore.kernel.org/lkml/2d631f0615918...@google.com/
>
> Thanks
>
On Fri, May 3, 2024 at 6:40 AM Charan Teja Kalla
wrote:
>
> Thanks Christian/TJ for the inputs!!
>
> On 4/18/2024 12:16 PM, Christian König wrote:
> > As far as I can see the EPOLL holds a reference to the files it
> > contains. So it is perfectly valid to add the file descriptor to EPOLL
> > and
On Thu, Apr 11, 2024 at 1:21 AM Rong Qianfeng <11065...@vivo.com> wrote:
>
>
> 在 2024/4/10 0:37, T.J. Mercier 写道:
> > [You don't often get email from tjmerc...@google.com. Learn why this is
> > important at https://aka.ms/LearnAboutSenderIdentification ]
> >
&g
On Wed, Apr 10, 2024 at 7:22 AM Christian König
wrote:
>
> Am 09.04.24 um 18:37 schrieb T.J. Mercier:
> > On Tue, Apr 9, 2024 at 12:34 AM Rong Qianfeng <11065...@vivo.com> wrote:
> >>
> >> 在 2024/4/8 15:58, Christian König 写道:
> >>> Am 07.04
On Tue, Apr 9, 2024 at 12:34 AM Rong Qianfeng <11065...@vivo.com> wrote:
>
>
> 在 2024/4/8 15:58, Christian König 写道:
> > Am 07.04.24 um 09:50 schrieb Rong Qianfeng:
> >> [SNIP]
> >>> Am 13.11.21 um 07:22 schrieb Jianqun Xu:
> Add DMA_BUF_IOCTL_SYNC_PARTIAL support for user to sync dma-buf
On Tue, Apr 2, 2024 at 1:08 AM Christian König wrote:
>
> Am 02.04.24 um 08:49 schrieb zhiguojiang:
> >> As far as I can see that's not because of the DMA-buf code, but
> >> because you are somehow using this interface incorrectly.
> >>
> >> When dma_buf_poll() is called it is mandatory for the
On Tue, Mar 26, 2024 at 7:29 PM Zhiguo Jiang wrote:
>
> The issue is a UAF issue of dmabuf file fd. Throght debugging, we found
> that the dmabuf file fd is added to the epoll event listener list, and
> when it is released, it is not removed from the epoll list, which leads
> to the
kconfig guards and so save some text
> and maybe even a pointer per object at runtime when not enabled.
>
> Signed-off-by: Tvrtko Ursulin
Reviewed-by: T.J. Mercier
On Tue, Mar 5, 2024 at 10:02 AM Ricardo B. Marliere
wrote:
>
> On 5 Mar 09:07, T.J. Mercier wrote:
> >
> > Reviewed-by: T.J. Mercier
> >
> > Is this really a resend? I don't see anything on lore and I can't
> > recall seeing this patch in my inbox befo
t; + * .. code-block:: c
> *
> - * int dma_buf_mmap(struct dma_buf \*, struct vm_area_struct \*,
> - *unsigned long);
> + * int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned
> long);
> *
> * If the importing subsystem simply provi
; @@ -314,12 +317,11 @@ static int dma_heap_init(void)
> if (ret)
> return ret;
>
> - dma_heap_class = class_create(DEVNAME);
> - if (IS_ERR(dma_heap_class)) {
> + ret = class_register(_heap_class);
> + if (ret) {
>
On Thu, Jan 18, 2024 at 6:49 AM Daniel Vetter wrote:
>
> On Thu, Jan 18, 2024 at 11:02:22AM +0100, Christian König wrote:
> > Am 17.01.24 um 19:11 schrieb T.J. Mercier:
> > > DMA buffers allocated from the CMA dma-buf heap get counted under
> > > RssFile for proce
, which also sets
VM_PFNMAP on the VMA.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/mm/vmscan.c?id=fb46e22a9e3863e08aef8815df9f17d0f4b9aede
Fixes: b61614ec318a ("dma-buf: heaps: Add CMA heap to dmabuf heaps")
Signed-off-by: T.J. Mercier
---
drivers/dma
//github.com/KSPP/linux/issues/89 [2]
> Cc: Sumit Semwal
> Cc: "Christian König"
> Cc: Azeem Shaikh
> Cc: linux-me...@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Kees Cook
Reviewed-by: T.J. Mercier
On Wed, Nov 8, 2023 at 11:46 PM Simon Ser wrote:
>
> +int vc4_dma_heap_create(struct vc4_dev *vc4)
> +{
> + struct dma_heap_export_info exp_info;
> + struct dma_heap *heap;
> +
> + exp_info.name = "vc4"; /* TODO: allow multiple? */
> + exp_info.ops = _dma_heap_ops;
> +
On Tue, Oct 3, 2023 at 1:30 AM Dan Carpenter wrote:
>
> On Mon, Oct 02, 2023 at 10:16:24AM -0700, T.J. Mercier wrote:
> > On Mon, Oct 2, 2023 at 12:04 AM Dan Carpenter
> > wrote:
> > >
> > > The buffer->pages[] has "buffer->pagecount" e
On Mon, Oct 2, 2023 at 12:04 AM Dan Carpenter wrote:
>
> The buffer->pages[] has "buffer->pagecount" elements so this > comparison
> has to be changed to >= to avoid reading beyond the end of the array.
> The buffer->pages[] array is allocated in cma_heap_allocate().
>
> Fixes: a5d2d29e24be
loaded from modules, and we'll need to be
> > able to properly handle the references to the heaps
> >
> > Also moves minor tracking into the heap structure so
> > we can properly free things.
>
> This is completely unnecessary, see below.
>
> >
> > Signed-off-by: Jo
On Mon, Sep 11, 2023 at 2:36 AM Christian König
wrote:
>
> m 11.09.23 um 04:30 schrieb Yong Wu:
> > From: "T.J. Mercier"
> >
> > The docs for dma_heap_get_name were incorrect, and since they were
> > duplicated in the implementation file they were wron
On Thu, Jul 20, 2023 at 3:55 AM Tvrtko Ursulin
wrote:
>
>
> Hi,
>
> On 19/07/2023 21:31, T.J. Mercier wrote:
> > On Wed, Jul 12, 2023 at 4:47 AM Tvrtko Ursulin
> > wrote:
> >>
> >>drm.memory.stat
> >> A nested file conta
On Wed, Jul 12, 2023 at 4:47 AM Tvrtko Ursulin
wrote:
>
> drm.memory.stat
> A nested file containing cumulative memory statistics for the whole
> sub-hierarchy, broken down into separate GPUs and separate memory
> regions supported by the latter.
>
> For
; I do want to recognize Laura's long time contribution to this
> area and her previous ION maintainership, as this couldn't
> have gone upstream without her prior efforts. Many thanks!
>
> Cc: Laura Abbott
> Cc: T.J. Mercier
> Cc: Sumit Semwal
> Cc: Benjamin Gaignard
> C
On Wed, Jun 28, 2023 at 1:39 PM John Stultz wrote:
>
> On Wed, Jun 28, 2023 at 11:05 AM Jeffrey Hugo wrote:
> >
> > @codeaurora.org email addresses are no longer valid and will bounce.
> >
> > I reached out to Liam about updating his entry under DMA-BUF HEAPS
> > FRAMEWORK with an
On Wed, Jun 21, 2023 at 11:16 AM Dmitry Osipenko
wrote:
>
> Hi,
>
> On 6/21/23 20:21, T.J. Mercier wrote:
> > On Mon, May 29, 2023 at 3:46 PM Dmitry Osipenko
> > wrote:
> >>
> >> Don't assert held dma-buf reservation lock on memory mapping of exported
&g
On Mon, May 29, 2023 at 3:46 PM Dmitry Osipenko
wrote:
>
> Don't assert held dma-buf reservation lock on memory mapping of exported
> buffer.
>
> We're going to change dma-buf mmap() locking policy such that exporters
> will have to handle the lock. The previous locking policy caused deadlock
>
On Sat, Jan 21, 2023 at 7:03 AM Jason Gunthorpe wrote:
>
> I would like to have a session at LSF to talk about Matthew's
> physr discussion starter:
>
> https://lore.kernel.org/linux-mm/ydykweu0htv8m...@casper.infradead.org/
>
> I have become interested in this with some immediacy because of
>
On Wed, Feb 1, 2023 at 6:52 AM Tvrtko Ursulin
wrote:
>
>
> On 01/02/2023 14:23, Tvrtko Ursulin wrote:
> >
> > On 01/02/2023 01:49, T.J. Mercier wrote:
> >> On Tue, Jan 31, 2023 at 6:01 AM Tvrtko Ursulin
> >> wrote:
> >>>
> >>>
>
On Wed, Feb 1, 2023 at 6:23 AM Tvrtko Ursulin
wrote:
>
>
> On 01/02/2023 01:49, T.J. Mercier wrote:
> > On Tue, Jan 31, 2023 at 6:01 AM Tvrtko Ursulin
> > wrote:
> >>
> >>
> >> On 25/01/2023 20:04, T.J. Mercier wrote:
> >>>
On Tue, Jan 31, 2023 at 6:01 AM Tvrtko Ursulin
wrote:
>
>
> On 25/01/2023 20:04, T.J. Mercier wrote:
> > On Wed, Jan 25, 2023 at 9:31 AM Tvrtko Ursulin
> > wrote:
> >>
> >>
> >> Hi,
> >>
> >> On 25/01/2023 11:52, Mich
On Wed, Jan 25, 2023 at 4:05 AM Michal Hocko wrote:
>
> On Tue 24-01-23 10:55:21, T.J. Mercier wrote:
> > On Tue, Jan 24, 2023 at 7:00 AM Michal Hocko wrote:
> > >
> > > On Mon 23-01-23 19:17:23, T.J. Mercier wrote:
> > > > When a buffer is exp
On Wed, Jan 25, 2023 at 9:31 AM Tvrtko Ursulin
wrote:
>
>
> Hi,
>
> On 25/01/2023 11:52, Michal Hocko wrote:
> > On Tue 24-01-23 19:46:28, Shakeel Butt wrote:
> >> On Tue, Jan 24, 2023 at 03:59:58PM +0100, Michal Hocko wrote:
> >>> On Mon 23-01-23
ne ever sat down
> > and tried to express this in the mechanism Simon and I proposed in
> > 2020, but allowing the expression of something that complex was
> > certainly our goal. How to resolve it down to an allocation mechanism,
> > I believe, was further than we got, but we wer
On Tue, Jan 24, 2023 at 7:00 AM Michal Hocko wrote:
>
> On Mon 23-01-23 19:17:23, T.J. Mercier wrote:
> > When a buffer is exported to userspace, use memcg to attribute the
> > buffer to the allocating cgroup until all buffer references are
> > released.
>
> Is th
references to the allocated memory.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/dma-buf.c | 56 ++
include/linux/dma-buf.h| 1 +
include/linux/memcontrol.h | 5
3 files changed, 62 insertions(+)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers
.
Signed-off-by: T.J. Mercier
---
Documentation/admin-guide/cgroup-v2.rst | 4 +++
drivers/dma-buf/dma-buf.c | 13 +
include/linux/dma-buf.h | 3 ++
include/linux/memcontrol.h | 38 +
mm/memcontrol.c | 19
nton
Call dma_buf_stats_teardown in dma_buf_export error handling
Rebase onto v6.2-rc5
Hridya Valsaraju (1):
binder: Add flags to relinquish ownership of fds
T.J. Mercier (3):
memcg: Track exported dma-buffers
dmabuf: Add cgroup charge transfer function
security: binder: Add binder ob
On Fri, Jan 20, 2023 at 1:25 PM Carlos Llamas wrote:
>
> On Mon, Jan 09, 2023 at 09:38:06PM +0000, 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 sen
On Wed, Jan 11, 2023 at 2:56 PM Daniel Vetter wrote:
>
> On Mon, Jan 09, 2023 at 04:18:12PM -0800, Shakeel Butt wrote:
> > Hi T.J.,
> >
> > On Mon, Jan 9, 2023 at 1:38 PM T.J. Mercier wrote:
> > >
> > > Based on discussions at LPC, this series add
On Mon, Jan 9, 2023 at 6:07 PM Hillf Danton wrote:
>
> On 9 Jan 2023 21:38:06 +0000 T.J. Mercier
> >
> > @@ -2275,6 +2276,26 @@ static int binder_translate_fd(u32 fd, binder_size_t
> > fd_offset,
> > goto err_security;
> > }
>
On Tue, Jan 10, 2023 at 12:58 AM Michal Hocko wrote:
>
> On Mon 09-01-23 21:38:04, T.J. Mercier wrote:
> > When a buffer is exported to userspace, use memcg to attribute the
> > buffer to the allocating cgroup until all buffer references are
> > released.
> >
>
=feba3900cabb8e7c87368faa28e7a6936809ba22
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/uapi/linux/android/binder.h?id=5cdcf4c6a638591ec0e98c57404a19e7f9997567
Signed-off-by: Hridya Valsaraju
Signed-off-by: T.J. Mercier
---
Documentation/admin-guide/cgroup-v2.rst | 3 ++-
drivers
references to the allocated memory.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/dma-buf.c | 45 ++
include/linux/dma-buf.h| 1 +
include/linux/memcontrol.h | 6 +
3 files changed, 52 insertions(+)
diff --git a/drivers/dma-buf/dma-buf.c b
.
Signed-off-by: T.J. Mercier
---
Documentation/admin-guide/cgroup-v2.rst | 4
drivers/dma-buf/dma-buf.c | 5 +
include/linux/dma-buf.h | 3 +++
include/linux/memcontrol.h | 1 +
mm/memcontrol.c | 4
5 files changed, 17
cated from a central
process on Android. The fourth patch adds a SELinux hook to binder in
order to control who is allowed to transfer buffer charges.
[1] https://lore.kernel.org/all/20220617085702.4298-1-christian.koe...@amd.com/
Hridya Valsaraju (1):
binder: Add flags to relinquish ownership o
hen connected with the DMA-buf
> >object and publish it through debugfs.
> >
> >Also adds the missing dma_resv_fini() into the error handling.
> >
> >v2: add some missing changes to dma_bug_getfile() and a missing NULL
> >check in dma_buf_file_release()
>
On Tue, Dec 6, 2022 at 7:12 AM Christian König
wrote:
>
> The init order and resulting error handling in dma_buf_export
> was pretty messy.
>
> Subordinate objects like the file and the sysfs kernel objects
> were initializing and wiring itself up with the object in the
> wrong order resulting
On Thu, Nov 24, 2022 at 3:26 AM wrote:
>
> From: Xu Panda
>
> The implementation of strscpy() is more robust and safer.
> That's now the recommended way to copy NUL terminated strings.
>
> Signed-off-by: Xu Panda
> Signed-off-by: Yang Yang
> ---
> drivers/dma-buf/dma-buf.c | 2 +-
> 1 file
On Thu, Nov 24, 2022 at 1:43 AM Christian König
wrote:
>
> Am 24.11.22 um 10:05 schrieb Daniel Vetter:
> > On Thu, Nov 24, 2022 at 08:03:09AM +0100, Christian König wrote:
> >> Am 23.11.22 um 20:35 schrieb T.J. Mercier:
> >>> I've been collecting these typo fi
I've been collecting these typo fixes for a while and it feels like
time to send them in.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/dma-buf.c | 14 +++---
include/linux/dma-buf.h | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/dma-buf/dma
On Fri, Nov 18, 2022 at 12:27 AM Christian König
wrote:
> Am 18.11.22 um 03:36 schrieb T.J. Mercier:
> > On Thu, Nov 17, 2022 at 2:16 AM Christian König
> > wrote:
> >> Am 17.11.22 um 08:48 schrieb Charan Teja Kalla:
> >>> Sometime back Dan also reported th
On Thu, Nov 17, 2022 at 2:16 AM Christian König
wrote:
>
> Am 17.11.22 um 08:48 schrieb Charan Teja Kalla:
> > Sometime back Dan also reported the same issue[1] where I do mentioned
> > that fput()-->dma_buf_file_release() will remove it from the list.
> >
> > But it seems that I failed to notice
+ goto err3;
> + }
> + }
> +
> + /* Add heap to the list */
> list_add(>list, _list);
> mutex_unlock(_list_lock);
>
> return heap;
> -
> +err3:
> + device_destroy(dma_heap_class, heap->heap_devt);
> err2:
> cdev_del(>heap_cdev);
> err1:
> --
> 2.25.1
>
Reviewed-by: T.J. Mercier
Thanks!
On Mon, Oct 31, 2022 at 7:53 AM Dawei Li wrote:
>
> Racing conflict could be:
> task A task B
> list_for_each_entry
> strcmp(h->name))
>list_for_each_entry
>strcmp(h->name)
> kzallockzalloc
> ..
The docs explicitly say the drm_gem_object_release function already calls this,
and this does not appear to be a prerequisite for the call to
etnaviv_gem_ops.release.
Signed-off-by: T.J. Mercier
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers
On Wed, Jun 1, 2022 at 5:40 AM Daniel Vetter wrote:
>
> On Mon, May 30, 2022 at 08:12:16AM +0200, Christian König wrote:
> > Am 25.05.22 um 23:05 schrieb T.J. Mercier:
> > > On Wed, May 25, 2022 at 7:38 AM Daniel Vetter wrote:
> > > > On Tue, May 17, 2022 at 08:
On Wed, May 25, 2022 at 2:05 PM T.J. Mercier wrote:
>
> On Wed, May 25, 2022 at 7:38 AM Daniel Vetter wrote:
> >
> > On Tue, May 17, 2022 at 08:13:24AM +0200, Greg Kroah-Hartman wrote:
> > > On Mon, May 16, 2022 at 05:08:05PM -0700, T.J. Mercier wrote:
> > >
On Wed, May 25, 2022 at 7:38 AM Daniel Vetter wrote:
>
> On Tue, May 17, 2022 at 08:13:24AM +0200, Greg Kroah-Hartman wrote:
> > On Mon, May 16, 2022 at 05:08:05PM -0700, T.J. Mercier wrote:
> > > On Mon, May 16, 2022 at 12:21 PM Christian König
> > > wrote:
> &
58 matches
Mail list logo