Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp41919lqs; Thu, 13 Jun 2024 03:17:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPK/Kzyie98t3eoUNrowPy8f1P7pDm7dcemZAF7wNLc3qfRfnUGbbihcgz/eLVfyw+U81rVZYyeoV83nIcO2lAzAr6R83MAhCqu63wWg== X-Google-Smtp-Source: AGHT+IG68v/QxwePO0lDDZgeXrzVRX+Ep496I66vLHItUYhQldad+iyVL/VwDjyIotngUg4wnp4+ X-Received: by 2002:a17:906:d147:b0:a6f:fbe:d3e8 with SMTP id a640c23a62f3a-a6f47d3bf13mr291736766b.54.1718273838833; Thu, 13 Jun 2024 03:17:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718273838; cv=pass; d=google.com; s=arc-20160816; b=IcbiWQjtm915+S+A77v6OJvq0/PED2+rMVW54DFkMqftC+LlmUH8Spg/XcilbW1GgA ufuXMsKEc4/r0zCVoceyAXVV1smVviYyxqfj4eDvXLyU6YpjrswDeYF2Nwgl6Q5bMaWL rc38M/YNAg5hkPdcSeMeXaV+bxuk4fRyVrLgsSP+N3rfnlfHa0LhJnl87qxBt+VZuDjr 70g+AAWB2p+VatuABAgf8XIZqhHhoDW+jbOm/n0Yug8Ths12XfXu2l7XsYCcUGdI0LI5 EzjiCopILBYjfp/H8O4jdkyg1RsAvY8Hkf59su33fRuzSpCTBL66nxyPVo+x/idNz5S5 Lo3g== 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=sglgR4BFstdGfgBQXhTvefQXqvnypOw2fwjKtuga5AQ=; fh=V2MrS5nBKO6NZyKkSAqWlntXbBhYGIBXHuVNjdGc+Bw=; b=RG0eYywC2m+0/eRe0th+6dQXaTWX90oO0unMxQ7n+UJwPbcitYmCTM+BzZWhfGpeY2 dIOtjWRwvZ1uqQvTewhpDfM8bhAeiowyZ495tsNJvBPkXIH+31aVVcv+bOylHCf50hX2 tsIMGqILfNJubF56x/OiRP12T7XGMUx+5204aPRGUDtRy/0WvNEVv36TbpRncsdjGExc YZgj1XUZIaHyauo2LWsnQIpi/mnBjKNTOzxqKflpZjOTolNl0ezxp34vGlOXM2qGv4/5 u+JVz5AhnRuTCPYl5LwUTJFPH2yky7M1H5J1cquCwDzvGYcP4IpfDJfYvdrYu4yqXxFZ k1xQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pUzr1jN7; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-213011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56df80c4si52479266b.509.2024.06.13.03.17.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 03:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pUzr1jN7; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-213011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8B7D51F26FD8 for ; Thu, 13 Jun 2024 10:17:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8ADFC1422D1; Thu, 13 Jun 2024 10:17:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pUzr1jN7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B60721422B7 for ; Thu, 13 Jun 2024 10:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718273831; cv=none; b=hk/i3UVXD8U3wYSsixNurQ/EDNZlX27Smd+vJWdwk/JrAhG61JTUvL3FTgR/BDttPOfI+EdezJxt7Z7Xc3huQ/Ts0+wZS7Pwa/j1CpwBsBAKh5VjlA2pCK4733Eu/XESobqUSnnjkUubkrRT8hU7eqGEin5Po6Anl2e+KdnEjtA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718273831; c=relaxed/simple; bh=/wheDLMlX0XENCAblFOAbpNGbkSATLpkAjgHm6mZvlw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oymSucE+lSWbHCmPUH8iNQCtbvNWW61tVQg3wO+Ak/MRx2vi06STk/KPbvTKeeUz+iPODe3Ak/T1neBAB9wRnSdCWxO5/6/wjaiftOKfe1ywBe95mp7jSbcBJs1nrMfdiKm/OGYgd+ChewLRWN3wIvL6OYSAC/iBjaEYrP78/1A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pUzr1jN7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AF12C2BBFC; Thu, 13 Jun 2024 10:17:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718273831; bh=/wheDLMlX0XENCAblFOAbpNGbkSATLpkAjgHm6mZvlw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pUzr1jN7GZPYuU13VQTxeENBnQRziC2NGxTdNl4BUakP26LxZ5Z2aj7pC6vVjhWUD aHAd5Y3G1MrTEeMm/nV3Oejs8V2FP2thBz3S/3AhspOGOGFaa2oHJHLTdtB2ROzKSH BB1rGV5ndEwwxe76WmkmLbKPePl96yaSoFcLuGEw= Date: Thu, 13 Jun 2024 12:16:50 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: Lee Jones , Michal Hocko , cve@kernel.org, linux-kernel@vger.kernel.org, Felix Kuehling Subject: Re: CVE-2024-26628: drm/amdkfd: Fix lock dependency warning Message-ID: <2024061335-wistful-brownnose-28ea@gregkh> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 13, 2024 at 11:32:41AM +0200, Pavel Machek wrote: > On Wed 2024-03-20 15:47:34, Lee Jones wrote: > > On Wed, 20 Mar 2024, Michal Hocko wrote: > > > > > On Thu 14-03-24 11:09:38, Lee Jones wrote: > > > > On Fri, 08 Mar 2024, Michal Hocko wrote: > > > > > > > > > On Wed 06-03-24 06:46:11, Greg KH wrote: > > > > > [...] > > > > > > Possible unsafe locking scenario: > > > > > > > > > > > > CPU0 CPU1 > > > > > > ---- ---- > > > > > > lock(&svms->lock); > > > > > > lock(&mm->mmap_lock); > > > > > > lock(&svms->lock); > > > > > > lock((work_completion)(&svm_bo->eviction_work)); > > > > > > > > > > > > I believe this cannot really lead to a deadlock in practice, because > > > > > > svm_range_evict_svm_bo_worker only takes the mmap_read_lock if the BO > > > > > > refcount is non-0. That means it's impossible that svm_range_bo_release > > > > > > is running concurrently. However, there is no good way to annotate this. > > > > > > > > > > OK, so is this even a bug (not to mention a security/weakness)? > > > > > > > > Looks like the patch fixes a warning which can crash some kernels. So > > > > the CVE appears to be fixing that, rather than the impossible deadlock. > > > > > > Are you talking about lockdep warning or anything else? > > > > 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. And we agree, I don't know what you are arguing about here, please stop. greg k-h