lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <09708B4D5B0.0000098Bstartww3@inbox.com>
Date:	Mon, 21 Dec 2009 20:55:16 -0800
From:	startww3@...ox.com
To:	linux-kernel@...r.kernel.org
Subject: PATCH: irqflags.h

The following diff -up patch was tested OK
on AMD K8 2.6.31.5-127 (Fedora 12 standard release)
for the file: include/linux/irqflags.h

Other platforms are untested.
===================================================================================

--- linux-2.6.31/include/linux/irqflags.h.orig  2009-12-21 21:24:55.000000000 -0500
+++ linux-2.6.31/include/linux/irqflags.h       2009-12-21 22:35:44.000000000 -0500
@@ -1,4 +1,22 @@
 /*
+
+ * PATCH Description -
+ *
+ * fixes defines for:
+ * local_irq_enable, local_irq_disable, local_irq_save, local_irq_restore,
+ * safe_halt, local_save_flags, irqs_disabled, irqs_disabled_flags
+ * when CONFIG_TRACE_IRQFLAGS_SUPPORT=n
+ * i.e. (arch/x86/Kconfig.debug contains:
+ *          config TRACE_IRQFLAGS_SUPPORT def_bool n)
+ *
+ * applies to kernel-2.6.31.5-127 (Fedora 12 standard release).
+ *
+ * This patch has tested ok on AMD K8 Fedora 12.
+ *
+ * Signed-off-by: RF <startww3@...ox.com>
+
+
+
  * include/linux/irqflags.h
  *
  * IRQ flags tracing: follow the state of the hardirq and softirq flags and
@@ -80,24 +98,29 @@
                }                                       \
        } while (0)
 #else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
-/*
- * The local_irq_*() APIs are equal to the raw_local_irq*()
- * if !TRACE_IRQFLAGS.
- */
-# define raw_local_irq_disable()       local_irq_disable()
-# define raw_local_irq_enable()                local_irq_enable()
-# define raw_local_irq_save(flags)                     \
-       do {                                            \
-               typecheck(unsigned long, flags);        \
-               local_irq_save(flags);                  \
-       } while (0)
-# define raw_local_irq_restore(flags)                  \
-       do {                                            \
-               typecheck(unsigned long, flags);        \
-               local_irq_restore(flags);               \
-       } while (0)
+
+#include <asm/irqflags.h>
+
+#define local_irq_enable()             raw_local_irq_enable()
+#define local_irq_disable()            raw_local_irq_disable()
+
+#define local_irq_save(flags)                                          \
+({                                                             \
+       typecheck(unsigned long, flags);                        \
+       raw_local_irq_save(flags);                              \
+})
+
+#define local_irq_restore(flags)                                       \
+({                                                             \
+       typecheck(unsigned long, flags);                        \
+       raw_local_irq_restore(flags);                           \
+})
+
 #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */

+
+
+
 #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
 #define safe_halt()                                            \
        do {                                                    \
@@ -105,25 +128,39 @@
                raw_safe_halt();                                \
        } while (0)

-#define local_save_flags(flags)                                \
-       do {                                            \
-               typecheck(unsigned long, flags);        \
-               raw_local_save_flags(flags);            \
+#define local_save_flags(flags)                                        \
+       do {                                                    \
+               typecheck(unsigned long, flags);                \
+               raw_local_save_flags(flags);                    \
        } while (0)

-#define irqs_disabled()                                                \
+
+#else
+
+#define safe_halt()                     raw_safe_halt()
+
+#define local_save_flags(flags)                                \
 ({                                                             \
-       unsigned long _flags;                                   \
-                                                               \
-       raw_local_save_flags(_flags);                           \
-       raw_irqs_disabled_flags(_flags);                        \
+       typecheck(unsigned long, flags);                        \
+       raw_local_save_flags(flags);                            \
+})
+
+
+#endif          /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
+
+
+
+
+#define irqs_disabled()                                         \
+({                                                              \
+       unsigned long _flags;                                   \
+       raw_irqs_disabled();                                    \
 })

-#define irqs_disabled_flags(flags)             \
-({                                             \
-       typecheck(unsigned long, flags);        \
-       raw_irqs_disabled_flags(flags);         \
+#define irqs_disabled_flags(flags)                             \
+({                                                             \
+       typecheck(unsigned long, flags);                        \
+       raw_irqs_disabled_flags(flags);                         \
 })
-#endif         /* CONFIG_X86 */

 #endif

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ