asahi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Lucas Stach <l.stach@pengutronix.de>,
	Daniel Vetter <daniel@ffwll.ch>, Dave Airlie <airlied@gmail.com>
Cc: asahi@lists.linux.dev, Asahi Lina <lina@asahilina.net>,
	Luben Tuikov <ltuikov89@gmail.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	alyssa@rosenzweig.io, Sumit Semwal <sumit.semwal@linaro.org>,
	Faith Ekstrand <faith.ekstrand@collabora.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name
Date: Thu, 2 Nov 2023 13:39:35 +0100	[thread overview]
Message-ID: <9ae839f1-442c-4184-80a8-6f2b51a7b8de@amd.com> (raw)
In-Reply-To: <18a77f80e2dfed630d22b9d6246c7d2122629a5a.camel@pengutronix.de>

Am 02.11.23 um 12:19 schrieb Lucas Stach:
> Am Donnerstag, dem 02.11.2023 um 11:48 +0100 schrieb Christian König:
> [...]
>> I was considering to change the dma_fence semantics so that
>> dma_fence_signal() could only be called from the interrupt contexts of
>> devices and then put a big fat WARN_ON(!in_interrupt()) in there.
>>
>> It's a sledgehammer, but as far as I can see the only thing which might
>> help. Opinions?
> That's not going to fly. As soon as you are dealing with device drivers
> that use IRQ threads, either voluntarily or even involuntarily on RT
> kernels, the dma_fence_signal will be from process context.

Ah shit, yeah of course. We use IRQ threads in amdgpu for the second 
interrupt ring as well.

Ok, nail that coffin. Any other ideas how we could enforce this?

Thanks,
Christian.

>
> Regards,
> Lucas


  reply	other threads:[~2023-11-02 12:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  8:21 [PATCH 0/3] DRM scheduler documentation & bug fixes Asahi Lina
2023-07-14  8:21 ` [PATCH 1/3] drm/scheduler: Add more documentation Asahi Lina
2023-07-14  8:40   ` Christian König
2023-07-14  9:39     ` Asahi Lina
2023-07-14  9:47       ` Christian König
2023-07-14  9:51         ` Asahi Lina
2023-07-14  8:21 ` [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name Asahi Lina
2023-07-14  8:43   ` Christian König
2023-07-14  9:44     ` Asahi Lina
2023-07-14  9:51       ` Christian König
2023-07-14 10:07         ` Asahi Lina
2023-07-14 10:29           ` Christian König
2023-07-14  9:49     ` Asahi Lina
2023-07-14  9:57       ` Christian König
2023-07-14 10:06         ` Asahi Lina
2023-07-14 10:18           ` Christian König
2023-07-14 12:13             ` Asahi Lina
2023-07-15  4:03         ` Luben Tuikov
2023-07-15 14:14         ` alyssa
2023-07-17 15:55           ` Christian König
2023-07-18  2:35             ` Asahi Lina
2023-07-18  5:45               ` Luben Tuikov
2023-07-21 10:33                 ` Asahi Lina
2023-07-31  8:09                   ` Christian König
2023-11-01  6:59                     ` Dave Airlie
2023-11-01  8:13                       ` Daniel Vetter
2023-11-02 10:48                         ` Christian König
2023-11-02 11:19                           ` Lucas Stach
2023-11-02 12:39                             ` Christian König [this message]
2023-07-28  7:48               ` Christian König
2023-07-18  8:21             ` Pekka Paalanen
2023-07-14  8:21 ` [PATCH 3/3] drm/scheduler: Clean up jobs when the scheduler is torn down Asahi Lina
2023-07-15  7:14   ` Luben Tuikov
2023-07-16  7:51     ` Asahi Lina
2023-07-17 17:40       ` Luben Tuikov
2023-07-17 22:45         ` Asahi Lina
2023-07-18  5:14           ` Luben Tuikov
2023-07-19 18:16           ` Konstantin Ryabitsev
2023-07-19 18:58             ` Luben Tuikov
2023-08-02  4:06         ` Matthew Brost
2023-08-02 14:12           ` Luben Tuikov
2023-07-19  8:45       ` Christian König
2023-07-19 15:05         ` Luben Tuikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ae839f1-442c-4184-80a8-6f2b51a7b8de@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@gmail.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=faith.ekstrand@collabora.com \
    --cc=l.stach@pengutronix.de \
    --cc=lina@asahilina.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=ltuikov89@gmail.com \
    --cc=sumit.semwal@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).