[PATCH] Revert "drm/nouveau: check ioctl command codes better"

Danilo Krummrich dakr at kernel.org
Tue Jul 22 12:53:52 UTC 2025


On Tue Jul 22, 2025 at 1:58 PM CEST, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd at arndb.de>
>
> My previous patch ended up causing a regression for the
> DRM_IOCTL_NOUVEAU_NVIF ioctl. The intention of my patch was to only
> pass ioctl commands that have the correct dir/type/nr bits into the
> nouveau_abi16_ioctl() function.
>
> This turned out to be too strict, as userspace does use at least
> write-only and write-read direction settings. Checking for both of these
> still did not fix the issue, so the best we can do for the 6.16 release
> is to revert back to what we've had since linux-3.16.
>
> This version is still fragile, but at least it is known to work with
> existing userspace. Fixing this properly requires a better understanding
> of what commands are being passed from userspace in practice, and how
> that relies on the undocumented (mis)behavior in nouveau_drm_ioctl().
>
> Fixes: e5478166dffb ("drm/nouveau: check ioctl command codes better")
> Link: https://lore.kernel.org/dri-devel/CAFrh3J85tsZRpOHQtKgNHUVnn=EG=QKBnZTRtWS8eWSc1K1xkA@mail.gmail.com/
> Reported-by: Satadru Pramanik <satadru at gmail.com>
> Reported-by: Chris Bainbridge <chris.bainbridge at gmail.com>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>

Applied to drm-misc-fixes, thanks!

  [ Add Closes: tags, fix minor typo in commit message. - Danilo ]


More information about the dri-devel mailing list