[PATCH 3/3] dma-buf: nuke SW_SYNC debugfs files

Hridya Valsaraju hridya at google.com
Fri Jul 30 20:46:48 UTC 2021


On Thu, Jul 29, 2021 at 9:52 PM John Stultz <john.stultz at linaro.org> wrote:
>
> On Thu, Jul 29, 2021 at 12:24 AM Daniel Vetter <daniel at ffwll.ch> wrote:
> >
> > On Thu, Jul 29, 2021 at 09:03:30AM +0200, Christian König wrote:
> > > As we now knew controlling dma_fence synchronization from userspace is
> > > extremely dangerous and can not only deadlock drivers but trivially also the
> > > whole kernel memory management.
> > >
> > > Entirely remove this option. We now have in kernel unit tests to exercise the
> > > dma_fence framework and it's containers.
> > >
> > > Signed-off-by: Christian König <christian.koenig at amd.com>
> >
> > There's also igts for this, and Android heavily uses this. So I'm not sure
> > we can just nuke it.
>
> Eeeeh... I don't think that's actually the case anymore. As of
> android12-5.10 CONFIG_SW_SYNC is not turned on.
> Further, Android is disabling debugfs in their kernels as it exposes
> too much to userland.
>
> That said, there still are some references to it:
>   https://cs.android.com/android/platform/superproject/+/master:system/core/libsync/sync.c;l=416

Hello,

Like John mentioned, CONFIG_SW_SYNC is not turned on for the *-5.4 and
newer branches in the Android Common Kernel. The references in AOSP
are only in place to support devices with older kernels upgrading to
newer Android versions.

Regards,
Hridya

>
> But it looks like the actual users are only kselftest and igt?
>
> Adding Alistair, Hridya and Sandeep in case they have more context.
>
> thanks
> -john


More information about the dri-devel mailing list