All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/i915: Annotate flexible array members with __counted_by() attribute
@ 2026-11-19 14:35 Krzysztof Karas
  2026-11-19 14:35 ` [PATCH 1/2] drm/i915: Annotate flexible array members that require minimal changes Krzysztof Karas
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Krzysztof Karas @ 2026-11-19 14:35 UTC (permalink / raw)
  To: intel-gfx
  Cc: Andi Shyti, Janusz Krzysztofik, Sebastian Brzezinka,
	Krzysztof Niemiec, Krzysztof Karas

Annotate i915 flexible array members with __counted_by() so
supported compilers can use their element counts for
CONFIG_FORTIFY_SOURCE and CONFIG_UBSAN_BOUNDS instrumentation.
Entries that could be modified with straightforward code changes
have been selected.

The first patch covers arrays whose counters can be maintained
with minimal changes. The second covers the UAPI query result
arrays: the query handlers now build the variable-length results
in kernel buffers. This provides bounds information for
kernel-side writes to the annotated arrays.

Krzysztof Karas (2):
  drm/i915: Annotate flexible array members that require minimal changes
  drm/i915/query: Use __counted_by() to annotate flexible arrays

 drivers/gpu/drm/i915/display/intel_bios.c     |   8 +-
 drivers/gpu/drm/i915/gem/i915_gem_context.c   |   6 +-
 .../gpu/drm/i915/gem/i915_gem_context_types.h |   2 +-
 .../gpu/drm/i915/gem/selftests/mock_dmabuf.h  |   2 +-
 .../drm/i915/gt/intel_execlists_submission.c  |   6 +-
 drivers/gpu/drm/i915/i915_query.c             | 101 +++++++++---------
 include/uapi/drm/i915_drm.h                   |   9 +-
 7 files changed, 76 insertions(+), 58 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-11-20 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 14:35 [PATCH 0/2] drm/i915: Annotate flexible array members with __counted_by() attribute Krzysztof Karas
2026-11-19 14:35 ` [PATCH 1/2] drm/i915: Annotate flexible array members that require minimal changes Krzysztof Karas
2026-11-19 14:44   ` Ville Syrjälä
2026-11-19 14:35 ` [PATCH 2/2] drm/i915/query: Use __counted_by() to annotate flexible arrays Krzysztof Karas
2026-11-19 14:42   ` sashiko-bot
2026-11-19 16:50 ` ✓ i915.CI.BAT: success for drm/i915: Annotate flexible array members with __counted_by() attribute Patchwork
2026-11-20 17:23 ` ✗ i915.CI.Full: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.