Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp21524lqs; Thu, 13 Jun 2024 02:32:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+tt4lklXOZIrm583alDt/E7GMqsIzInviFkK2zc9os4pLeBGDvO0V8tQDL3YOC5WfZ8QsY9mLjacw8dzINXCaHzfgacj0feoi5czlRQ== X-Google-Smtp-Source: AGHT+IEWgdumMSBgc1IDm9WGaUBR3+wMJbjkrt2wRc7xc2onaOGvWcGalFdSSOxbGupm1LX2QF4r X-Received: by 2002:a05:620a:19a8:b0:795:fc87:a3 with SMTP id af79cd13be357-797f6006403mr488480985a.17.1718271178135; Thu, 13 Jun 2024 02:32:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718271178; cv=pass; d=google.com; s=arc-20160816; b=bNiW/bPa9G585jUVghhzhlQAjSntULbl9CRPiExgEpQeQ4n/yveVqly2LpvdiEJB4Y iwIx25EYnoVUhdKMApboj00U292KISXrd/VkYObn8dj7ElfakCVP5Lm6tbg7QBpGphj1 pFmMC/KxsIv4whSVgzN8+WVJjQW+TWRIdavxOqHmBQApFdrqPc3FldWOqhHT1w6EyF7W UPXcgLPpZtS+WOluIoPRgo3iEWOtwNsPXhqpCwztYZUAKnC3lwVvgrUiG2pOLQiq/goc KVXaXE1UjWO+Y7IGvCveUWV+mMsityBZJIc0VawxLDtT3CdRTecOiei/aDR9VxB5+Bo7 QWDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oHev/tDi4ksrZ+3x6gweRbnBPsXj/+4uyOtcGRfRTXc=; fh=Y1RgoCyoRQB+vu6B/bCT4+tVmbKqeYq9mR1weiEtrvE=; b=So26HunQd965O73q+3l5QKykH6EPpI12MMw0HOl21XqZ6LBvTID46NXmcAT1d30Xey rmuJ6Nm8hEDgJ1PQNQfhUrR8sPoyU9kCTiJi1qHfaEsKNhB6u8liomJ2HkcAMJt83Eh7 N1i4V6AbpzJfMOLuWFg+curHDdMOdsekSt8iSNwALg/rh8ajl0agfMA1yPZhWy509rNQ weoZFoI/YXqcE7CVTzLHQxj8eNqaFcCgA2mBF0wOhCLFcII/MnRwpA1BAtvt1OrwSquQ iVq92eTf6OHpUpgfJ947Y4sDnnWkFXcR1sF60JN1JOhkZovMtslKkSpEHvNLFviyTd4h P6VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=lRDkYfM+; arc=pass (i=1 spf=pass spfdomain=ucw.cz dkim=pass dkdomain=ucw.cz dmarc=pass fromdomain=ucw.cz); spf=pass (google.com: domain of linux-kernel+bounces-212954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212954-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-798abe596b1si94934485a.577.2024.06.13.02.32.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 02:32:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=lRDkYfM+; arc=pass (i=1 spf=pass spfdomain=ucw.cz dkim=pass dkdomain=ucw.cz dmarc=pass fromdomain=ucw.cz); spf=pass (google.com: domain of linux-kernel+bounces-212954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212954-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D35F81C242B0 for ; Thu, 13 Jun 2024 09:32:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DB8B13E052; Thu, 13 Jun 2024 09:32:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ucw.cz header.i=@ucw.cz header.b="lRDkYfM+" Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A165B84D03 for ; Thu, 13 Jun 2024 09:32:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.255.230.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718271172; cv=none; b=FTgbPEWzMzFuhNh/abcgneKJetQusFCtZTDPzH1lDA7+mwstzBaZ0EysFis7tumayGcU4D1qJWJ5qVddwDNHdInEc+tJ6s9aI7Wn7XenpJqISWsnFspoE0ZtdDBR+10eqnD2h/8WVgQJF26AS3friRl8G+KVKS0UCOQnm9X3LyA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718271172; c=relaxed/simple; bh=B5Cd3cqeecn0eaJdHT1dMZ1sD5+PK9hGkwmcXGO58Dc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LYOj4XMnxQ7KgKT3uV6ed3sm+jwGz0m6/koeOmz9owUe4ooj9Eh1XBqJx9LJmc5Hrf4Y+xrmV3sJxJwTlpRfIuKIUiwKxWngOgdtl5ufuYebT7cgR9WCCTQP9hvVsAtd6Sb7znkkpETOd2jIPYsMz2ZOibQf7A85tA3BTZkHBIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ucw.cz; spf=pass smtp.mailfrom=ucw.cz; dkim=pass (1024-bit key) header.d=ucw.cz header.i=@ucw.cz header.b=lRDkYfM+; arc=none smtp.client-ip=46.255.230.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ucw.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ucw.cz Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id CE7971C0082; Thu, 13 Jun 2024 11:32:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1718271161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oHev/tDi4ksrZ+3x6gweRbnBPsXj/+4uyOtcGRfRTXc=; b=lRDkYfM+U019hPwcPPvOVfIt498rMdJnLWNyH1gpHZpfRbLTyV/Lctm11bExNjlPgTOOzr sbJxPMUopVJFzbmUlyoxkbGQ39GfiInsQBken8eiSjl6SvMmlmHv/vC5he6/5ZW32LEr/N WuPZ4OAhunwhTJOrtOtcU9uWIIx9Zqs= Date: Thu, 13 Jun 2024 11:32:41 +0200 From: Pavel Machek To: Lee Jones Cc: Michal Hocko , cve@kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Felix Kuehling Subject: Re: CVE-2024-26628: drm/amdkfd: Fix lock dependency warning Message-ID: References: <2024030649-CVE-2024-26628-f6ce@gregkh> <20240314110938.GM1522089@google.com> <20240320154734.GU1522089@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="210OJhfsyvcl1VHN" Content-Disposition: inline In-Reply-To: <20240320154734.GU1522089@google.com> --210OJhfsyvcl1VHN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2024-03-20 15:47:34, Lee Jones wrote: > On Wed, 20 Mar 2024, Michal Hocko wrote: >=20 > > On Thu 14-03-24 11:09:38, Lee Jones wrote: > > > On Fri, 08 Mar 2024, Michal Hocko wrote: > > >=20 > > > > On Wed 06-03-24 06:46:11, Greg KH wrote: > > > > [...] > > > > > Possible unsafe locking scenario: > > > > >=20 > > > > > CPU0 CPU1 > > > > > ---- ---- > > > > > lock(&svms->lock); > > > > > lock(&mm->mmap_lock); > > > > > lock(&svms->lock); > > > > > lock((work_completion)(&svm_bo->eviction_work)); > > > > >=20 > > > > > I believe this cannot really lead to a deadlock in practice, beca= use > > > > > svm_range_evict_svm_bo_worker only takes the mmap_read_lock if th= e BO > > > > > refcount is non-0. That means it's impossible that svm_range_bo_r= elease > > > > > is running concurrently. However, there is no good way to annotat= e this. > > > >=20 > > > > OK, so is this even a bug (not to mention a security/weakness)? > > >=20 > > > Looks like the patch fixes a warning which can crash some kernels. So > > > the CVE appears to be fixing that, rather than the impossible deadloc= k. > >=20 > > Are you talking about lockdep warning or anything else? >=20 > Anything that triggers a BUG() or a WARN() (as per the splat in the > commit message). Many in-field kernels are configured to panic on > BUG()s and WARN()s, thus triggering them are presently considered local > DoS and attract CVE status. So... because it is possible to configure machine to reboot on warning, now every warning is a security issue? Lockdep is for debugging, if someone uses it in production with panic on reboot, they are getting exactly what they are asking for. Not a security problem. Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --210OJhfsyvcl1VHN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCZmq8uQAKCRAw5/Bqldv6 8gdkAJwMHfejOxf/mcV1y4L8XZCmnaDjPQCgrsTdi2mc2irA3ssncwxpSA+R7KI= =6oKV -----END PGP SIGNATURE----- --210OJhfsyvcl1VHN--