Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Use unsigned to avoid un...



details:   https://anonhg.NetBSD.org/src/rev/484a170a6392
branches:  trunk
changeset: 458646:484a170a6392
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Aug 05 13:28:31 2019 +0000

description:
Use unsigned to avoid undefined behavior in gen7_get_stolen_reserved().
Found by kUBSan.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_reg.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e7ecdf730637 -r 484a170a6392 sys/external/bsd/drm2/dist/drm/i915/i915_reg.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h    Mon Aug 05 12:44:01 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h    Mon Aug 05 13:28:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_reg.h,v 1.8 2019/08/05 10:14:19 msaitoh Exp $     */
+/*     $NetBSD: i915_reg.h,v 1.9 2019/08/05 13:28:31 msaitoh Exp $     */
 
 /* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
  * All Rights Reserved.
@@ -185,7 +185,7 @@
 
 #define GEN6_STOLEN_RESERVED           0x1082C0
 #define GEN6_STOLEN_RESERVED_ADDR_MASK (0xFFFUL << 20)
-#define GEN7_STOLEN_RESERVED_ADDR_MASK (0x3FFF << 18)
+#define GEN7_STOLEN_RESERVED_ADDR_MASK (0x3FFFUL << 18)
 #define GEN6_STOLEN_RESERVED_SIZE_MASK (3 << 4)
 #define GEN6_STOLEN_RESERVED_1M                (0 << 4)
 #define GEN6_STOLEN_RESERVED_512K      (1 << 4)



Home | Main Index | Thread Index | Old Index