From: Brajesh Gupta <brajesh.gupta@imgtec.com>
To: Alessio Belle <alessio.belle@imgtec.com>,
Luigi Santivetti <luigi.santivetti@imgtec.com>,
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>,
Frank Binns <frank.binns@imgtec.com>,
"Matt Coster" <opensource@mtcoster.net>
Cc: <imagination@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>,
Brajesh Gupta <brajesh.gupta@imgtec.com>
Subject: [PATCH] drm/imagination: Add padding field check for GPU info query
Date: Wed, 2 Dec 2026 11:42:51 +0530 [thread overview]
Message-ID: <20261202-dev_query_ioctl_fix-v1-1-853cc03874b7@imgtec.com> (raw)
Update pvr_dev_query_gpu_info_get to check and handle the non zero
padding field.
Fixes: f99f5f3ea7ef ("drm/imagination: Add GPU ID parsing and firmware loading")
Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
---
drivers/gpu/drm/imagination/pvr_drv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagination/pvr_drv.c
index 2d522a8e46ad..566d5d373862 100644
--- a/drivers/gpu/drm/imagination/pvr_drv.c
+++ b/drivers/gpu/drm/imagination/pvr_drv.c
@@ -365,6 +365,12 @@ pvr_dev_query_gpu_info_get(struct pvr_device *pvr_dev,
return 0;
}
+ err = PVR_UOBJ_GET(gpu_info, args->size, args->pointer);
+ if (err < 0)
+ return err;
+ if (gpu_info._padding_c)
+ return -EINVAL;
+
gpu_info.gpu_id =
pvr_gpu_id_to_packed_bvnc(&pvr_dev->gpu_id);
gpu_info.num_phantoms = rogue_get_num_phantoms(pvr_dev);
---
base-commit: c88084027d0e922dd925b96e5a0d184ba04a8f43
change-id: 20261202-dev_query_ioctl_fix-08c929a51644
Best regards,
--
Brajesh Gupta <brajesh.gupta@imgtec.com>
reply other threads:[~2026-12-02 6:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261202-dev_query_ioctl_fix-v1-1-853cc03874b7@imgtec.com \
--to=brajesh.gupta@imgtec.com \
--cc=airlied@gmail.com \
--cc=alessio.belle@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.com \
--cc=imagination@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luigi.santivetti@imgtec.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=opensource@mtcoster.net \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--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®