From mboxrd@z Thu Jan 1 00:00:00 1970 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 48F9F1FFC55 for ; Fri, 11 Jul 2025 18:06:19 +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=1752257180; cv=none; b=sOKsByZC28cFf3LJIKSAoweUnClVfWYzatt4aqlY0dR6K6NyO4DM1STTGGO7BOB+9FZXFQauhG+uLwe1P3ZbFdXoAzlS3LWRbafcgf89DQj0xtB4ZBUICAElWFbvO1zeOlAaG6jQ7SgIV1MOHt4lrGEoIdgzl6pQ4VgajFrsa4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752257180; c=relaxed/simple; bh=/9a4/phpDuawySJjaWTXurkeMeclgalXZ+d6x2nKduE=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=N/hhKlLkVie+chpwejKsaCf6im8uRQ1VYixGDHLfzCO5S5pUbpu/V8JgNf/J96icJsDrGVLCq75CpoLX6/iy5gtWsnciOZnXn46r1WDAZm5/gsbZOSOSVR1bEakXXQf6Y+ZFRJJ0tld2m0kTRa9k2way+V+q97+7Sjy3sfl1VCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bayH31tB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bayH31tB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 544B0C4CEED; Fri, 11 Jul 2025 18:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752257179; bh=/9a4/phpDuawySJjaWTXurkeMeclgalXZ+d6x2nKduE=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=bayH31tBJpB2xff+SviA/VIFbkWDbwD1toV8iU2SxFjLzeDuPi8In4FDK5MDz9FLd NvoRdcPXZd7wqDabLslCByJu1MNX1HbPLtuN1Lv1DWatOGxSriiwEeyCW5g7bO9zdV qMI2nR0VXxp3a5x5ko9hBCpRfU5lpXtp75kWvJUjNhoOEZUrKktyvnqUr7dHkwxcVP VAXeeohX0ku/COIy2ATQ6UrQvUnLrKTBQt7NvqgAvY5ydjGmtNcUzr84pheryyiu1O /vIs/a5Cazj0eKAIZBe/d7iJqCLBP+/LNLRr/QxCwbxqQ4jehnczVlOIn+M5T2kgN1 qhkl6Ne5lRH1w== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 11 Jul 2025 20:06:14 +0200 Message-Id: Subject: Re: [PATCH] drm/nouveau: check ioctl command codes better Cc: "Lyude Paul" , "David Airlie" , "Simona Vetter" , "Ben Skeggs" , "Arnd Bergmann" , "Ben Skeggs" , "Timur Tabi" , "Dave Airlie" , "Thomas Zimmermann" , , , To: "Arnd Bergmann" From: "Danilo Krummrich" References: <20250711072458.2665325-1-arnd@kernel.org> In-Reply-To: <20250711072458.2665325-1-arnd@kernel.org> On Fri Jul 11, 2025 at 9:24 AM CEST, Arnd Bergmann wrote: > From: Arnd Bergmann > > nouveau_drm_ioctl() only checks the _IOC_NR() bits in the DRM_NOUVEAU_NVI= F > command, but ignores the type and direction bits, so any command with > '7' in the low eight bits gets passed into nouveau_abi16_ioctl() instead > of drm_ioctl(). > > Check for all the bits except the size that is handled inside of the hand= ler. > > Fixes: 27111a23d01c ("drm/nouveau: expose the full object/event interface= s to userspace") > Signed-off-by: Arnd Bergmann Applied to drm-misc-fixes, thanks! [ Fix up two checkpatch warnings and a typo. - Danilo ]