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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Oct 2008 20:15:27 -0700
From:	Joe Damato <ice799@...il.com>
To:	linux-x86_64@...r.kernel.org, linux-newbie@...r.kernel.org,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Joe Damato <ice799@...il.com>
Subject: [PATCH 07/12] x86: Add a static initializer for IDTs

Add static intializer for IDT entries.

Signed-off-by: Joe Damato <ice799@...il.com>
---
 include/asm-x86/desc_defs.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h
index d6a5310..a1c6516 100644
--- a/include/asm-x86/desc_defs.h
+++ b/include/asm-x86/desc_defs.h
@@ -82,6 +82,15 @@ typedef struct desc_struct tss_desc;
 #define ldttss_offset(d)	(((d).base2 << 24 ) | ((d).base1 << 16) |\
 				 ((d).base0 & 0x0000ffff))
 #define ldttss_limit(d)		((d).limit0)
+#define __IDT_INITIALIZER(lo,hi) \
+                { .base0 = lo & 0xffff \
+                , .seg_sel = (lo >> 16) & 0xffff \
+                , .reserved = 0 \
+                , .type = (hi >> 8) & 0xf \
+                , .zero = 0 \
+                , .dpl = (hi >> 13) & 3 \
+                , .p   = (hi >> 15) & 1 \
+                , .base1 = (hi >> 16) & 0xffff }
 #endif
 
 struct desc_ptr {
-- 
1.5.4.3

--
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