[PATCH v4 2/2] drm/xe: restore xe_mmio_ioctl as the ioctl handler of the mmio debugfs file

Michał Winiarski michal.winiarski at intel.com
Tue Jan 9 23:20:15 UTC 2024


On Wed, Jan 03, 2024 at 09:12:43AM +0200, Koby Elbaz wrote:
> The drm mmio ioctl handler (xe_mmio_ioctl) wasn't needed anymore,
> and therefore, recently removed.
> Nevertheless, it is now restored for debugging purposes to function
> as the ioctl handler of the 'mmio' debugfs file.
> Note, that the non-admin user's limited mmio access (aka, whitelist),
> was removed being irrelevant anymore, now that a user using debugfs
> must anyway have root permission to use it.

Note that having root permission is not enough to get raw access to PCI
MMIO/Cfg using sysfs exposed by PCI subsystem if the system is locked
down:
https://elixir.bootlin.com/linux/v6.7/source/drivers/pci/pci-sysfs.c#L1066

This debugfs can be used to partially circumvent the lockdown for Intel
graphics devices. I would expect the commit message to explain if this
is fine, and why.

Thanks,
-Michał

> 
> Signed-off-by: Koby Elbaz <kelbaz at habana.ai>
> ---
>  drivers/gpu/drm/xe/xe_debugfs.c      | 107 ++++++++++++++++++++++++++-
>  drivers/gpu/drm/xe/xe_debugfs_mmio.h |  43 +++++++++++
>  2 files changed, 149 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/xe/xe_debugfs_mmio.h


More information about the Intel-xe mailing list