All of lore.kernel.org
 help / color / mirror / Atom feed
* drm/i915/gvt: Rework fix out-of-bounds buffer write into opregion->signature
@ 2025-03-24  8:30 Nicolas Chauvet
  2025-03-24  8:30 ` [PATCH 1/3] Revert "drm/i915/gvt: Fix out-of-bounds buffer write into opregion->signature[]" Nicolas Chauvet
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nicolas Chauvet @ 2025-03-24  8:30 UTC (permalink / raw)
  To: Zhenyu Wang, Zhi Wang, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
	Tvrtko Ursulin
  Cc: intel-gvt-dev, intel-gfx, Nicolas Chauvet

With gcc-15, there is a new warning treated as error
    As shown with gcc-15:
    drivers/gpu/drm/i915/gvt/opregion.c: In function intel_vgpu_init_opregion:
    drivers/gpu/drm/i915/gvt/opregion.c:35:28: error: initializer-string for array of char is too long [-Werror=unterminated-string-initialization]
       35 | #define OPREGION_SIGNATURE "IntelGraphicsMem"
          |                            ^~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gvt/opregion.c:225:45: note: in expansion of macro OPREGION_SIGNATURE
      225 |         const char opregion_signature[16] = OPREGION_SIGNATURE;
          |                                             ^~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Rework the previous fix by reverting it, then two options:
- Enlarge the signature field
- Reduce the string size 

I would use the latter, but I don't know the runtime implication of it
(hence the RFC).

This issue was discovered by building longterm kernel-6.12 in newer
fedora, See also:
https://copr.fedorainfracloud.org/coprs/kwizart/kernel-longterm-6.12/

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>


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

end of thread, other threads:[~2025-03-24 12:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24  8:30 drm/i915/gvt: Rework fix out-of-bounds buffer write into opregion->signature Nicolas Chauvet
2025-03-24  8:30 ` [PATCH 1/3] Revert "drm/i915/gvt: Fix out-of-bounds buffer write into opregion->signature[]" Nicolas Chauvet
2025-03-24  9:38   ` Jani Nikula
2025-03-24  8:30 ` [PATCH 2/3] [RFC] drm/i915/gvt: Fix opregion_header->signature size Nicolas Chauvet
2025-03-24  9:27   ` Jani Nikula
2025-03-24  9:34     ` Jani Nikula
2025-03-24 10:47       ` Nicolas Chauvet
2025-03-24 12:56         ` Jani Nikula
2025-03-24  8:30 ` [PATCH 3/3] [RFC] drm/i915/gvt: change OPREGION_SIGNATURE name Nicolas Chauvet
2025-03-24  9:29   ` Jani Nikula

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.