WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] Weird overflowing user_desc assignment

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Weird overflowing user_desc assignment
From: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Date: 2006年10月04日 18:17:37 +0100
Cc: Dave Jones <davej@xxxxxxxxxx>
Delivery-date: 2006年10月04日 10:18:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi all,
davej just noticed gcc spitting a complaint about this:
linux/arch/x86-64/kernel/process-xen.c ---
static inline void set_32bit_tls(struct task_struct *t, int tls, u32
addr)
{
 struct user_desc ud = { 
 .base_addr = addr,
 .limit = 0xfffff,
 .contents = (3 << 3), /* user */
 .seg_32bit = 1,
 .limit_in_pages = 1,
 .useable = 1,
 };
 struct n_desc_struct *desc = (void *)t->thread.tls_array;
 desc += tls;
 desc->a = LDT_entry_a(&ud); 
 desc->b = LDT_entry_b(&ud); 
}
where we get an overflow assigning "3 << 3" to ud.contents, which is a
2-bit bitfield defined in include/asm-x86_64/ldt.h:
struct user_desc {
...
 unsigned int contents:2;
...
};
Any idea what the intention was here?
--Stephen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] Re: xenconsoled CPU denial of service problem , Anthony Liguori
Next by Date: [Xen-devel] Re: xenconsoled CPU denial of service problem , Daniel P. Berrange
Previous by Thread: [Xen-devel] [BUGFIX][ACM][Resource Labels] This patch fixes problems with multiple representations of the same labeled resource , Reiner Sailer
Next by Thread: Re: [Xen-devel] Weird overflowing user_desc assignment , Chris Wright
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /