Please review:

Bugs:   https://www.illumos.org/issues/4809
        https://www.illumos.org/issues/4810
        https://www.illumos.org/issues/4811
Webrev: 
http://31bits.net/illumos/cr/4809-NANOSEC-should-be-long-long-to-avoid-integer-overflow-bugs/
Patch:  
http://repo.or.cz/w/illumos-gate/jeffpc.git/patch/17ce95e3fa8965c2278f7b9c89b1eac040239364

These changes can be pulled via:

$ git pull git://repo.or.cz/illumos-gate/jeffpc.git nanosec

The first bug (4809) has details about the wsdiff results.

As far as testing is concerned, I successfully booted every combination of:

  build = {debug, non-debug}
  bits = {32, 64}
  apic_timer_preferred_mode = {deadline, periodic, oneshot}
  apix_enable = {0, 1}


Thanks,

Jeff.

>From 17ce95e3fa8965c2278f7b9c89b1eac040239364 Mon Sep 17 00:00:00 2001
From: Josef 'Jeff' Sipek <[email protected]>
Date: Fri, 25 Apr 2014 18:09:31 -0400
Subject: [PATCH] 4809 NANOSEC should be 'long long' to avoid integer overflow 
bugs
 4810 spa_async_tasks_pending suffers from an integer overflow bug
 4811 in.mpathd: tv2ns suffers from an integer overflow bug

---
 usr/src/uts/common/sys/time.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/src/uts/common/sys/time.h b/usr/src/uts/common/sys/time.h
index 9fc4704..c1e5f6f 100644
--- a/usr/src/uts/common/sys/time.h
+++ b/usr/src/uts/common/sys/time.h
@@ -234,7 +234,7 @@ struct itimerval32 {
 #define        SEC             1
 #define        MILLISEC        1000
 #define        MICROSEC        1000000
-#define        NANOSEC         1000000000
+#define        NANOSEC         1000000000ll
 
 #define        MSEC2NSEC(m)    ((hrtime_t)(m) * (NANOSEC / MILLISEC))
 #define        NSEC2MSEC(n)    ((n) / (NANOSEC / MILLISEC))
-- 
1.7.3.2
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to