From: sashiko-bot@kernel.org
To: "Badal Nilawar" <badal.nilawar@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm/xe/cri: Expose device UID through sysfs
Date: Thu, 10 Sep 2026 12:33:15 +0000 [thread overview]
Message-ID: <20260910123315.9CA311F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260910124151.3135801-6-badal.nilawar@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Exposing a globally unique GPU hardware identifier to unprivileged users creates a persistent privacy vulnerability. Unprivileged applications, sandboxes, and containers can read this 64-bit SOC ID to consistently fingerprint and track the machine, circumventing privacy boundaries.
--
commit bf81f8535df00cbd8d5f430123de0394ef920efc
Author: Badal Nilawar <badal.nilawar@intel.com>
drm/xe/cri: Expose device UID through sysfs
This commit introduces a sysfs attribute to expose the unique 64-bit hardware
identifier (SOC UID) of the GPU on supported Intel Xe platforms.
> diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-gpu b/Documentation/ABI/testing/sysfs-driver-intel-xe-gpu
> new file mode 100644
> index 0000000000000..36182bbb1b54d
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-gpu
> @@ -0,0 +1,10 @@
> +What: /sys/bus/pci/drivers/xe/.../device_uid
> +Date: September 2026
> +KernelVersion: 7.4
> +Contact: intel-xe@lists.freedesktop.org
> +Description:
> + RO. Unique 64-bit identifier of the GPU device, exposed as
> + hexadecimal value.
> +
> + This sysfs file is present only on Intel Xe platforms that
> + provide a device UID. It is available to all users.
[Severity: Medium]
Is it intentional to expose this globally unique hardware identifier to
unprivileged users? Typically, unique identifiers like DMI product UUIDs
or system serials are restricted to root access to prevent unauthorized
fingerprinting and tracking across unprivileged applications or containers.
[ ... ]
> diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c
> index a73e0e957cb0b..657742c22d90b 100644
> --- a/drivers/gpu/drm/xe/xe_device_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
[ ... ]
> +static ssize_t
> +device_uid_show(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> + struct pci_dev *pdev = to_pci_dev(dev);
> + struct xe_device *xe = pdev_to_xe_device(pdev);
> +
> + return sysfs_emit(buf, "%016llx\n", xe->device_uid);
> +}
> +static DEVICE_ATTR_RO(device_uid);
[Severity: Medium]
Could this use DEVICE_ATTR_ADMIN_RO instead of DEVICE_ATTR_RO? By using
DEVICE_ATTR_RO, the sysfs attribute is granted 0444 world-readable
permissions. This allows any unprivileged user to persistently fingerprint
the machine by reading the device_uid sysfs file via device_uid_show().
Restricting this to 0400 would align with standard kernel practices for
hardware serials.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910124151.3135801-4-badal.nilawar@intel.com?part=2
next prev parent reply other threads:[~2026-09-10 12:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 12:41 [PATCH v2 0/2] Expose device sysfs for AMC and GPU UUID Badal Nilawar
2026-09-10 12:41 ` [PATCH v2 1/2] drm/xe/i2c: Expose AMC Alert reason sysfs Badal Nilawar
2026-09-10 12:41 ` sashiko-bot
2026-09-10 14:41 ` Michal Wajdeczko
2026-09-10 12:41 ` [PATCH v2 2/2] drm/xe/cri: Expose device UID through sysfs Badal Nilawar
2026-09-10 12:33 ` sashiko-bot [this message]
2026-09-10 14:48 ` Michal Wajdeczko
2026-09-10 13:20 ` ✗ CI.checkpatch: warning for Expose device sysfs for AMC and GPU UUID (rev2) Patchwork
2026-09-10 13:22 ` ✓ CI.KUnit: success " Patchwork
2026-09-10 14:29 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-10 20:22 ` ✓ Xe.CI.FULL: " Patchwork
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=20260910123315.9CA311F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).