Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix additional sysfs node access CFI violations
@ 2025-10-17 19:46 Ryan Neph
  2025-10-17 19:46 ` [PATCH 1/2] drm/xe/sysfs: " Ryan Neph
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Ryan Neph @ 2025-10-17 19:46 UTC (permalink / raw)
  To: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter
  Cc: intel-xe, dri-devel, linux-kernel, Ryan Neph

There was a patch earlier to fix CFI violations upon sysfs file access,
stemming from Xe's invalid usage of device pointers instead of kobject
pointers in those sysfs file access handlers.

When CFI was disabled, it made no functional difference, because the
`struct device *` decays to a `struct kobject *` (its first member).

However, with CFI enabled this is detected and the kernel is
intentionally crashed.

The earlier patch missed a few instances of this invalid use of `struct
device *` pointers, and a few more have been added to Xe since.

This series cleans up all remaining instances, and fixes an unrelated
compiler warning issued by clang, noticed while testing.

Signed-off-by: Ryan Neph <ryanneph@google.com>
---
Ryan Neph (2):
      drm/xe/sysfs: Fix additional sysfs node access CFI violations
      drm/xe/configfs: fix clang warnings for missing parameter name

 drivers/gpu/drm/xe/xe_configfs.h           | 10 ++++++----
 drivers/gpu/drm/xe/xe_gt_ccs_mode.c        | 24 ++++++++++++------------
 drivers/gpu/drm/xe/xe_survivability_mode.c | 15 ++++++++-------
 drivers/gpu/drm/xe/xe_vram_freq.c          | 20 ++++++++++----------
 4 files changed, 36 insertions(+), 33 deletions(-)
---
base-commit: ee74634683e4b3e526a4b014b0358796e97c7ce3
change-id: 20251003-rn-cfi-ab15e1aad8cf

Best regards,
-- 
Ryan Neph <ryanneph@google.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-10-23 12:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 19:46 [PATCH 0/2] Fix additional sysfs node access CFI violations Ryan Neph
2025-10-17 19:46 ` [PATCH 1/2] drm/xe/sysfs: " Ryan Neph
2025-10-17 19:46 ` [PATCH 2/2] drm/xe/configfs: fix clang warnings for missing parameter name Ryan Neph
2025-10-20 10:05   ` David Laight
2025-10-21  6:39     ` Nathan Chancellor
2025-10-21 16:47       ` Ryan Neph
2025-10-22 16:38       ` David Laight
2025-10-17 19:53 ` ✗ CI.checkpatch: warning for Fix additional sysfs node access CFI violations Patchwork
2025-10-17 19:54 ` ✓ CI.KUnit: success " Patchwork
2025-10-17 20:33 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-18 19:05 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox