Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Neph <ryanneph@google.com>
To: "Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	 linux-kernel@vger.kernel.org, Ryan Neph <ryanneph@google.com>
Subject: [PATCH 0/2] Fix additional sysfs node access CFI violations
Date: Fri, 17 Oct 2025 12:46:24 -0700	[thread overview]
Message-ID: <20251017-rn-cfi-v1-0-bf66e6ad4fcd@google.com> (raw)

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>


             reply	other threads:[~2025-10-17 19:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 19:46 Ryan Neph [this message]
2025-10-17 19:46 ` [PATCH 1/2] drm/xe/sysfs: Fix additional sysfs node access CFI violations 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

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=20251017-rn-cfi-v1-0-bf66e6ad4fcd@google.com \
    --to=ryanneph@google.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    /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