Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp300345rdb; Thu, 2 Nov 2023 04:21:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtICZR5FNDHmpaUntzOKxRG64JHmxsgaRBMv9bG/rSOHp78Guj+xw0RHCrAvd9eFLT7N5E X-Received: by 2002:a17:907:a45:b0:9a6:1446:852c with SMTP id be5-20020a1709070a4500b009a61446852cmr4228888ejc.27.1698924063771; Thu, 02 Nov 2023 04:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698924063; cv=none; d=google.com; s=arc-20160816; b=y/8pq2FgciEi4YxnBmlbeOHSvH5rT8lM6yTcAEYbu9snsMe8La7NW1fl0PsgtYlSmr jmR/VUnUtsKFo2hazWgndCQp14rq05iZYyeabL2BjVfhWQj0JwkO9bw28I/aMH9PzyaH vZsT95BR3opWQzMkLcUr6oqMab/oDjPbMcyyRNLDSMaqfEtxJzwgOnD8hV5C9UGnznE+ N19fdj1eOcsZhmd4wjBpGtpqfujdrL1q9uviIzRrwRBLkhw0W5/g9JZy36N0zhe5g0Yk HwNejAfhk5MdcNqmhfvkZ9u43h+bZlYBx9z5DSw6mifGrR2Fzi4+QGbfQG94fDL0zXXX oMUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=rCYHBO2k4sHbBtP9iRW3Pu/WmO8oTy/AuMX5Yt52Vjs=; fh=ohXIHMCLYzf3bgsLzMTxLu0ccQV23ytmK7k6R96bBwc=; b=yz8pEbXF5VzkuetR7J0nmA9LbW5Dqi0evnb5P7h/avE92m5RrdL/DiidjkQT8tChuu XC8edx/FuNgqnvWiyygEWbHvGwwVuehVai+f7AdDerYreTb9is5+RqoiurOyrc4QZs0r nNvi92bcPfLAl2WrkWvawSaqn+VzP3gaA/XTJeOTE/3FeaoXiqOl3fCI6wcdB5u/TGcV DxX1Q9CVzrt84PQeCnPHPrfw1hEW9GMIDyYXSc371g2CETgJ1AFDC0MkzOLNPyQc41rQ u3cJo8HSklxpR+qv0GSL2HaTR1dtc3mFCFzBuV3um8ln6wiz1FWtdM/f1s5lAwwuANu3 n+cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id wt2-20020a170906ee8200b0099325564b77si814277ejb.548.2023.11.02.04.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 140AF807E8AC; Thu, 2 Nov 2023 04:20:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347250AbjKBLUD convert rfc822-to-8bit (ORCPT + 99 others); Thu, 2 Nov 2023 07:20:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjKBLUC (ORCPT ); Thu, 2 Nov 2023 07:20:02 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E20B123 for ; Thu, 2 Nov 2023 04:19:59 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qyVji-0004ID-84; Thu, 02 Nov 2023 12:19:42 +0100 Message-ID: <18a77f80e2dfed630d22b9d6246c7d2122629a5a.camel@pengutronix.de> Subject: Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name From: Lucas Stach To: Christian =?ISO-8859-1?Q?K=F6nig?= , Daniel Vetter , Dave Airlie Cc: asahi@lists.linux.dev, Asahi Lina , Luben Tuikov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, alyssa@rosenzweig.io, Sumit Semwal , Faith Ekstrand , linux-media@vger.kernel.org Date: Thu, 02 Nov 2023 12:19:40 +0100 In-Reply-To: <5438c132-e127-4456-9551-42c76fb521dd@amd.com> References: <9c0cff84-45b1-268f-bdad-38c16316dbc3@amd.com> <20230714-drm-sched-fixes-v1-0-c567249709f7@asahilina.net> <20230714-drm-sched-fixes-v1-2-c567249709f7@asahilina.net> <236422117088ca854a6717114de73d99b2b9ba2f@rosenzweig.io> <7b564e55-a9b7-0585-3cf1-d1f132f9a918@asahilina.net> <200e9d74-7191-b1ed-e5f3-775827550853@amd.com> <5438c132-e127-4456-9551-42c76fb521dd@amd.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:20:20 -0700 (PDT) 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. Regards, Lucas