Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2703892ybh; Fri, 24 Jul 2020 22:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzte0w5fajmfHncRpdxkwxny0KrX+kMo5kC+AwsfcmWRC5E4Nb6PWLIuiIAf/+BSu/djrw X-Received: by 2002:a17:906:950c:: with SMTP id u12mr11869080ejx.37.1595653811520; Fri, 24 Jul 2020 22:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595653811; cv=none; d=google.com; s=arc-20160816; b=QSN3TakOVe6zlu0jk2eW9+ItPHqd91zOKza6NJAWZHkHbmuUj7oVH6+z4ivjK9tC8H Pj9wM7Hb8WCoxMuBWDHfvirhj+bep+fjmQnKVVknc9SiWrBRhbw66+YLtFqwtvLwDj+l snZsVxExvE73kD0SEfEHez0wTS6HIwd1ErqiQBRu14iQa9J4UNOP24KdsSVCX5SbWvBN gohwwNDkDtYSp27xadnQZ0DgT8p153XZI8e43Aj//ypkk1GkyqwdAUNWUsSTRxc9cKhC JZoY9EWze5fe5P4ploFYM31y5u42qEb69PbvbIdRACM2TMtKf9uQcqrOM+wJyga/Ce0v uRUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=iFSEpaLiKi60kvVwYl52iXVSZUdZQzlmSCkDAkMiIuE=; b=XGuNcliZsmSKQ9Kpldnp7ch+JbK+vf2hU9GIrpMgXvG0Q8pFKQoCcsPzmZxOqdhadT DQtR2yi5YzymjpUzn8jthz1X6/nF55HG5BrcziUujHnSQe1Iv/dhn2UL9UFhafm/fvto BTXj4wKpMsNyI6+cmw5s9yywG7njfpY1CfmXTrk8IRN776m+zCv9yoGjt6mEA4KM7N+w T/3uvX+TaimihHnq8v+/xRC8AdTm1y7kAuTPBO/DI5R/xGQSKL5bYDnUcT4Lc/BV/MSI Aer/RTSIgfc8EWSw1C0ykxU6z9jPS9RormPLVZeCtH0q5e+W9LYuPj9u6Duud/p4zJlT h6Mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cox.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ef10si1809711ejb.519.2020.07.24.22.09.47; Fri, 24 Jul 2020 22:10:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cox.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726651AbgGYFGi (ORCPT + 99 others); Sat, 25 Jul 2020 01:06:38 -0400 Received: from omta015.useast.a.cloudfilter.net ([34.195.253.206]:33642 "EHLO omta015.useast.a.cloudfilter.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbgGYFGh (ORCPT ); Sat, 25 Jul 2020 01:06:37 -0400 X-Greylist: delayed 427 seconds by postgrey-1.27 at vger.kernel.org; Sat, 25 Jul 2020 01:06:37 EDT Received: from cxr.smtp.a.cloudfilter.net ([10.0.17.148]) by cmsmtp with ESMTP id zCAvj635BxItlzCHRj4ffd; Sat, 25 Jul 2020 04:59:29 +0000 Received: from ws ([68.106.48.162]) by cmsmtp with ESMTPSA id zCHCjSjHrxMRGzCHEjMZC8; Sat, 25 Jul 2020 04:59:29 +0000 Authentication-Results: cox.net; auth=pass (LOGIN) smtp.auth=1i5t5.duncan@cox.net X-Authority-Analysis: v=2.4 cv=CvABzl0D c=1 sm=1 tr=0 ts=5f1bbc31 a=fEuF7Lzz1MGHEe1xFtqdOg==:117 a=fEuF7Lzz1MGHEe1xFtqdOg==:17 a=kj9zAlcOel0A:10 a=sfOm8-O8AAAA:8 a=VwQbUJbxAAAA:8 a=9Cd_nbZdC8ucnf_FNXIA:9 a=CjuIK1q_8ugA:10 a=TvTJqdcANYtsRzA46cdi:22 a=AjGcO6oz07-iQ99wixmX:22 Date: Fri, 24 Jul 2020 21:59:14 -0700 From: Duncan <1i5t5.duncan@cox.net> To: Mazin Rezk Cc: Paul Menzel , Kees Cook , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Andrew Morton , Christian =?UTF-8?B?S8O2bmln?= , Harry Wentland , Nicholas Kazlauskas , sunpeng.li@amd.com, Alexander Deucher , mphantomx@yahoo.com.br, regressions@leemhuis.info, anthony.ruhier@gmail.com Subject: Re: [PATCH] amdgpu_dm: fix nonblocking atomic commit use-after-free Message-ID: <20200724215914.6297cc7e@ws> In-Reply-To: <_vGVoFJcOuoIAvGYtkyemUvqEFeZ-AdO4Jk8wsyVv3MwO-6NEVtULxnZzuBJNeHNkCsQ5Kxn5TPQ_VJ6qyj9wXXXX8v-hc3HptnCAu0UYsk=@protonmail.com> References: <202007231524.A24720C@keescook> <202007241016.922B094AAA@keescook> <3c92db94-3b62-a70b-8ace-f5e34e8f268f@molgen.mpg.de> <_vGVoFJcOuoIAvGYtkyemUvqEFeZ-AdO4Jk8wsyVv3MwO-6NEVtULxnZzuBJNeHNkCsQ5Kxn5TPQ_VJ6qyj9wXXXX8v-hc3HptnCAu0UYsk=@protonmail.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfMOyWF+lgqFhfod06LAwUnkRPRHDXxXCpYb5boN5EhzZB7C7s44DLE44/O5KjX7Jrld57OdZsMN5bIRCnIXZjnwbaT4/ieJNTKG7VLmU8it+Hst31XoT hZ9bzjc0FIHbORAf+Ch0ibr55N6DFIWQ9/fET++K3Xse8DwqrzeOFjIilHM9aSTr8Dnd6PjzZBhkcNpDhcy7zjrqf9iy2wfp1aKzagNUtSJafY5dPEaCiTPi ahBHqR2wiOkrrOWh8FmzosjjXtR+HlEk1h7nJpMBiJUieGLjgxy7AoIiy2Fly7H2a2SCv4Gp6z9+2MQGidm3uSV+FMgPHOdQr1gyYw9EmY5Pc+oM3lEbWOSv MMsr2KKH1udWcb+RWyetv+xtYn930s6dGHeLj/+6l9qgU9lNqKegJYnOlFgaXSkieomKhJbGxmzOqrVGDWDN50dKYpLjMvhk73fvqlerFd0oOzEUsxKBXrov LFRLmK3pWdIv2jWHWBYQb3eIwGiAPZw///TwAcGhoArrQ+fQZlcPNgvCnpeh/3GiWv81ngAKBbfZ6lUyXvr4JLBO7bQeJsc6MRIZ/lOHbJp/hJj3+MTgGPAq NBVfUnmq216vL5rvNmR/U03gjp8erofgyVAOqW3yYEklX4DfPqROhBmP6EAfXCR/BZHEMxxxBkYqDzVifke0beKTNZe0rjICCuYnqsTrPyzZ2w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 25 Jul 2020 03:03:52 +0000 Mazin Rezk wrote: > > Am 24.07.20 um 19:33 schrieb Kees Cook: > > > > > There was a fix to disable the async path for this driver that > > > worked around the bug too, yes? That seems like a safer and more > > > focused change that doesn't revert the SLUB defense for all > > > users, and would actually provide a complete, I think, workaround > > That said, I haven't seen the async disabling patch. If you could > link to it, I'd be glad to test it out and perhaps we can use that > instead. I'm confused. Not to put words in Kees' mouth; /I/ am confused (which admittedly could well be just because I make no claims to be a coder and am simply reading the bug and thread, but I'd appreciate some "unconfusing" anyway). My interpretation of the "async disabling" reference was that it was to comment #30 on the bug: https://bugzilla.kernel.org/show_bug.cgi?id=207383#c30 ... which (if I'm not confused on this point too) appears to be yours. There it was stated... >>>> I've also found that this bug exclusively occurs when commit_work is on the workqueue. After forcing drm_atomic_helper_commit to run all of the commits without adding to the workqueue and running the OS, the issue seems to have disappeared. <<<< Would not forcing all commits to run directly, without placing them on the workqueue, be "async disabling"? That's what I /thought/ he was referencing. OTOH your base/context swap idea sounds like a possibly "less disturbance" workaround, if it works, and given the point in the commit cycle... (But if it's out Sunday it's likely too late to test and get it in now anyway; if it's another week, tho...) -- Duncan - No HTML messages please; they are filtered as spam. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman