From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB25DCF649C for ; Sun, 29 Sep 2024 21:29:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8B9910E385; Sun, 29 Sep 2024 21:29:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="AEJCj3m8"; dkim-atps=neutral X-Greylist: delayed 302 seconds by postgrey-1.36 at gabe; Wed, 18 Sep 2024 15:46:27 UTC Received: from xvfrnhpk.outbound-mail.sendgrid.net (xvfrnhpk.outbound-mail.sendgrid.net [168.245.32.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A5CF10E288 for ; Wed, 18 Sep 2024 15:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=ziLSBkmD8N3wAECNVc4vP8+a8zEWGyAXVCNY3Vn7ff0=; b=AEJCj3m8vbHBBBETUWtOYUy0ZAlb8lLmCPHcnJU4CUoU+DjWbDuF1ZoRYHwdVEyARi6v 4cnoQPqWaDxyq+ild68etiFoHx+AC7uOgcZF26rtcp4u/ArJmFLnpo6rOeTi2WSFPWAtJ7 nT2Me7jpOytFpZ4czBR4uHEeNW+vA/LvT0hagctEGlFLFiq1Ox5GqIs/PDwC2b9wKNMpT3 tbUveqkhhE3bAzBLqs+KJAbBfbazoOXhD5lyA/76iPAcQ/Acq9RrT4Zs4lPWG4CgA/0kNf 29xt5mGPBAQoAN7SYUZupr/wBrvGzKHnBgXjt4y03wk6qxT4m1tBYGuw+VaM7RkQ== Received: by recvd-5767f9c879-sslgp with SMTP id recvd-5767f9c879-sslgp-1-66EAF4A4-5 2024-09-18 15:41:24.075238971 +0000 UTC m=+510254.006226547 Received: from mtl123.mtl.labs.mlnx (unknown) by geopod-ismtpd-4 (SG) with ESMTP id 3jtN1PSnQaSZa_p6kXiHqQ Wed, 18 Sep 2024 15:41:23.862 +0000 (UTC) Received: from adv-dev-804.mtl.labs.mlnx (adv-dev-804.mtl.labs.mlnx [10.237.43.220]) by mtl123.mtl.labs.mlnx (8.14.4/8.14.4) with ESMTP id 48IFfNqn012717; Wed, 18 Sep 2024 18:41:23 +0300 Received: from adv-dev-804.mtl.labs.mlnx (localhost [127.0.0.1]) by adv-dev-804.mtl.labs.mlnx (8.15.2/8.15.2/Debian-22ubuntu3) with ESMTP id 48IFfNW7299140; Wed, 18 Sep 2024 18:41:23 +0300 Received: (from ymaman@localhost) by adv-dev-804.mtl.labs.mlnx (8.15.2/8.15.2/Submit) id 48IFfMRA299139; Wed, 18 Sep 2024 18:41:22 +0300 From: Yonatan Maman Subject: [PATCH 0/2] *** BUG Fix for Nouveau Memory*** Date: Wed, 18 Sep 2024 15:41:24 +0000 (UTC) Message-Id: <20240918153932.299095-1-Ymaman@Nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?u001=2ELV3ZPuPfm6MEUzpJJKUmPK7bFUdOAxbw77JQHpHEsK=2FX2=2FUTlQRmqLgqk?= =?us-ascii?Q?5EHnkMyvO1KLlDiEzbuD8jfGZLnyF=2F6WDUL+0Vw?= =?us-ascii?Q?G9ijbm=2F7W5y9w5x0rq3X+Eb5DbDkom8Uwwt+YFu?= =?us-ascii?Q?zcPoJU+ymXHyXhkJpptGWNF5RKoaAXLVA3vOQYt?= =?us-ascii?Q?YgqhzcjVfkGuew+9BQrlMcc5Y+tPfiKebXozfeR?= =?us-ascii?Q?txElXOSRFA+IGB=2F8ZF2JGOlpcyn7JzppE2mF6yL?= =?us-ascii?Q?V+uE?= To: nouveau@lists.freedesktop.org Cc: Yonatan Maman X-Entity-ID: u001.9Nu+sJkq3f0LJ/tZbyfOWA== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Sun, 29 Sep 2024 21:29:23 +0000 X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" This patch series addresses two critical issues in the Nouveau driver related to device channels, error handling and memory leaking. - Memory Leak in migrate_to_ram - the migrate_to_ram function was identified as leaking memory when a copy push command fails. This results in the function returning a dirty HIGH_USER page, which can expose sensitive information and pose a security risk. To mitigate this vulnerability, the patch ensures that a zero page is allocated for the destination page, thereby preventing memory leaks and enhancing the security of the driver in case of failure. - Privileged Error in Copy Engine Channel - an error was observed when the nouveau_dmem_copy_one function is executed, leading to a Host Copy Engine Privileged error on channel 1. The patch addresses this by adjusting the Copy Engine channel configuration to permit privileged push commands, thus resolving the error. Yonatan Maman (2): nouveau/dmem: Fix privileged error in copy engine channel nouveau/dmem: Fix memory leak in `migrate_to_ram` upon copy error drivers/gpu/drm/nouveau/nouveau_dmem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.34.1