mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lyude@redhat.com
To: Jim Cromie <jim.cromie@gmail.com>,
	Danilo Krummrich <dakr@kernel.org>,
	 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann	 <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>,
	Simona Vetter	 <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/nouveau: Fix NULL pointer dereferences in GETPARAM ioctl
Date: Thu, 17 Sep 2026 16:26:40 -0400	[thread overview]
Message-ID: <bd730e30c96bea38d8430460ee73f073e280374c.camel@redhat.com> (raw)
In-Reply-To: <20260815-null-fixes-v1-1-0df9dda951fb@gmail.com>

On Sat, 2026-08-15 at 11:30 -0600, Jim Cromie wrote:
> When hardware or firmware initialization fails, the graphics engine
> (gr) or device functions may remain NULL. Attempting to access these
> during the GETPARAM ioctl (e.g., NOUVEAU_GETPARAM_GRAPH_UNITS)
> results
> in a kernel NULL pointer dereference, causing a crash when userspace
> (GNOME/Mesa) attempts to probe the device.
> 
> Add safety checks for 'gr', 'gr->func', and 'nvkm_device->func' in
> the
> ioctl handler. Return -ENODEV to signal the missing hardware state to
> userspace, and use NV_ERROR_ONCE to provide diagnostic proof in the
> kernel log without risking a console flood.
> 
> RFC:
> 
> These crashes may not be repeatable, they happened while I was trying
> to build nouveau as a builtin module, with binary blobs in the kernel
> image, on a laptop with an encrypted disk.  Gemini tells me this
> won't
> work, so I punted.

"Gemini tells me this won't work, so I punted."

I'm sorry, what exactly do you mean here? And could you clarify what
LLMs were used for in writing this series? Code generation, analysis,
etc.?

> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>


  reply	other threads:[~2026-09-17 20:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-15 17:30 [PATCH 0/2] drm/nouveau: Fix NULL pointer dereferences in GETPARAM and GET_ZCULL_INFO ioctls Jim Cromie
2026-08-15 17:30 ` [PATCH 1/2] drm/nouveau: Fix NULL pointer dereferences in GETPARAM ioctl Jim Cromie
2026-09-17 20:26   ` lyude [this message]
2026-09-18  4:52     ` jim.cromie
2026-08-15 17:30 ` [PATCH 2/2] drm/nouveau: Fix NULL pointer dereference in GET_ZCULL_INFO ioctl Jim Cromie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd730e30c96bea38d8430460ee73f073e280374c.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jim.cromie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®