Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp521771lqc; Fri, 8 Mar 2024 04:50:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXiLi8WTfsoF76DeQ04gkDUr8RIq/hlVgj5DGXRCCH373wj+3YyOA/avlsXF6Z469Zbaj9DBdf7SomHsmgZB8kVlA95DalupePt/Bb1Fg== X-Google-Smtp-Source: AGHT+IGCEe1VLSsZp0A7ToIcIAditcdFKExxZ0L3rCcGCYL2q9dKsyAlv+kBkaNUcm3wWON2U00y X-Received: by 2002:a50:d514:0:b0:564:5c90:f521 with SMTP id u20-20020a50d514000000b005645c90f521mr2159361edi.14.1709902244741; Fri, 08 Mar 2024 04:50:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709902244; cv=pass; d=google.com; s=arc-20160816; b=bLrrQMO3PvipEHAEX3uyK6u0xVwlzldU0VWZ3QAszlct98g5Efz/D+KICLEnhXl4nN TjYOIMV2zWAD9cBXIjOqs34a9UeyDLoz+OxyPUT3uqbr5yOxwpCUSaUIEnYBayWkj361 xk95ilnnDhgOHNdVYLehHfYHRE0B85SHwqk0FKXdI4rCPgwxbgEEy8rbes8vXXkxnVvA XlXFCLvW9WF0WaIx9MOYnOGJ7qN/y5WmYV7hB5D5SjOhVemdv+ZaiVRQ6RXrVH0pw88R ylab0Kimpg5v75AERaDEEPaMfzQUjOpQ/86azERNIaxezavSXmNJ0Cx6afEi05roI3zJ c15w== 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:dkim-signature; bh=Qt3Lk6ghcLdCV0nzg8fVJQXKNWubDuUtSSj7mwILKNs=; fh=iQv7Eesctlcuakat91WcHBrSP/e4KDBwvEdWtMulub4=; b=Yo7JdFaWcuZ10Ll2N1y9QD6OfA5StfBjB+o6oZPN9ae9bClGAWlbeNrF1fxoJ6JS1D 8DuPAD1Qf6I6CotWB3tdt1eEZsSiwQqbManI7c59EUAHWvaL5Aslsz+sPZdR56HplvUx lOk1p4vVFRsYq0b4q3ZuZTW6yUwAwI29v29AWk36C+EjTSB7flDbGqpxGeMFDRVzwS0v DAkK+TfQHclzx3TIewMVUQ1o2QJkyj6yEFIp5Lw3NSk/Ox1DRD8A+WkNi/XoZPBdVXvP 2v4AcpySP5vFplQcZdfAYC7ezWT7yU1jemTwNdl80Qn6VKLltgggRsJCky3jsT7qTOLJ d3MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fDFSmilU; dkim=pass header.i=@suse.com header.s=susede1 header.b=fDFSmilU; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-97026-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z39-20020a509e2a000000b0056479742905si8043013ede.599.2024.03.08.04.50.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 04:50:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97026-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=@suse.com header.s=susede1 header.b=fDFSmilU; dkim=pass header.i=@suse.com header.s=susede1 header.b=fDFSmilU; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-97026-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 3E1F61F22C51 for ; Fri, 8 Mar 2024 12:50:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43BB318049; Fri, 8 Mar 2024 12:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="fDFSmilU"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="fDFSmilU" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B912B1D52B for ; Fri, 8 Mar 2024 12:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709902236; cv=none; b=it588ONJMMkxy0Z3rIZl3KK8WSNGwY6WGTPuIt+sYyaqvAB1Wywf4cBJM2MEpn7g5n9Q1eBGs0vcRgK364OicZqbp89Yo2fquEG8XbTv7D38lYgxdr9+uFIPkOHwEvc0TWk6uakkWLxwLFVNk9ZRvXb8rb+djD8KFR8Pxlafs2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709902236; c=relaxed/simple; bh=X8r0myWAP+ZNabX9jq2ofWmOakXvjG5XDtC/EIB+ZPQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F6ap6qiQz7/1neyEbXHyBtRbWm9NLzMwlsWcxlh0NE/7L82JwtX1I48Lxw/knXK3ZfmPIdq29kIqqA5jT3O9Yn6IWYwKSaOa0/GCkdmSmnv7EW/7JQnVZRbYs323NB/cRfZ6TRXaKGi1HNNTT0hf9x1Orv1viqWrACD+OoQ+H0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=fDFSmilU; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=fDFSmilU; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0FF813FAB3; Fri, 8 Mar 2024 09:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1709891964; h=from:from:reply-to: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=Qt3Lk6ghcLdCV0nzg8fVJQXKNWubDuUtSSj7mwILKNs=; b=fDFSmilUwzvR1zEqdhGdTp+tvd+Mu8agF2UbCQIBJPOWJXIztx1BgBaOClbbLIALaaeXQQ w5gC+DQM6Fk5qBfWBsKlIIFyHjTRZNEHEf8zQe3RFUi4a9gUE8pbVrsH0EJNZL2D8nAt3Q MsJavlBCeBjQgMAqywvozHu/nBxak7A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1709891964; h=from:from:reply-to: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=Qt3Lk6ghcLdCV0nzg8fVJQXKNWubDuUtSSj7mwILKNs=; b=fDFSmilUwzvR1zEqdhGdTp+tvd+Mu8agF2UbCQIBJPOWJXIztx1BgBaOClbbLIALaaeXQQ w5gC+DQM6Fk5qBfWBsKlIIFyHjTRZNEHEf8zQe3RFUi4a9gUE8pbVrsH0EJNZL2D8nAt3Q MsJavlBCeBjQgMAqywvozHu/nBxak7A= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id EAC9913310; Fri, 8 Mar 2024 09:59:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id rETxNnvh6mU+ZwAAD6G6ig (envelope-from ); Fri, 08 Mar 2024 09:59:23 +0000 Date: Fri, 8 Mar 2024 10:59:23 +0100 From: Michal Hocko To: cve@kernel.org, linux-kernel@vger.kernel.org Cc: 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> 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: <2024030649-CVE-2024-26628-f6ce@gregkh> Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -1.40 X-Spamd-Result: default: False [-1.40 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.60)[81.72%] X-Spam-Flag: NO 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)? -- Michal Hocko SUSE Labs