diff -NurpP --minimal linux-2.6.16-vs2.1.1-rc15.1/Makefile linux-2.6.16-vs2.1.1-rc15.2/Makefile --- linux-2.6.16-vs2.1.1-rc15.1/Makefile 2006-04-05 05:17:58 +0200 +++ linux-2.6.16-vs2.1.1-rc15.2/Makefile 2006-04-05 05:18:05 +0200 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 16 -EXTRAVERSION = -vs2.1.1-rc15.1 +EXTRAVERSION = -vs2.1.1-rc15.2 NAME=Sliding Snow Leopard # *DOCUMENTATION* diff -NurpP --minimal linux-2.6.16-vs2.1.1-rc15.1/arch/i386/kernel/traps.c linux-2.6.16-vs2.1.1-rc15.2/arch/i386/kernel/traps.c --- linux-2.6.16-vs2.1.1-rc15.1/arch/i386/kernel/traps.c 2006-04-05 04:34:22 +0200 +++ linux-2.6.16-vs2.1.1-rc15.2/arch/i386/kernel/traps.c 2006-04-05 04:34:50 +0200 @@ -54,6 +54,7 @@ #include #include +#include #include "mach_traps.h" diff -NurpP --minimal linux-2.6.16-vs2.1.1-rc15.1/include/linux/vs_context.h linux-2.6.16-vs2.1.1-rc15.2/include/linux/vs_context.h --- linux-2.6.16-vs2.1.1-rc15.1/include/linux/vs_context.h 2006-03-27 17:39:08 +0200 +++ linux-2.6.16-vs2.1.1-rc15.2/include/linux/vs_context.h 2006-04-05 04:26:50 +0200 @@ -3,6 +3,7 @@ #include #include "vserver/debug.h" +#include "vserver/history.h" #define get_vx_info(i) __get_vx_info(i,__FILE__,__LINE__,__HERE__) diff -NurpP --minimal linux-2.6.16-vs2.1.1-rc15.1/include/linux/vserver/debug.h linux-2.6.16-vs2.1.1-rc15.2/include/linux/vserver/debug.h --- linux-2.6.16-vs2.1.1-rc15.1/include/linux/vserver/debug.h 2006-03-24 04:44:16 +0100 +++ linux-2.6.16-vs2.1.1-rc15.2/include/linux/vserver/debug.h 2006-04-05 04:25:47 +0200 @@ -94,202 +94,6 @@ void dump_vx_info_inactive(int); #endif /* CONFIG_VSERVER_DEBUG */ -/* history stuff */ - -#ifdef CONFIG_VSERVER_HISTORY - - -extern unsigned volatile int vxh_active; - -struct _vxhe_vxi { - struct vx_info *ptr; - unsigned xid; - unsigned usecnt; - unsigned tasks; -}; - -struct _vxhe_set_clr { - void *data; -}; - -struct _vxhe_loc_lookup { - unsigned arg; -}; - -enum { - VXH_UNUSED=0, - VXH_THROW_OOPS=1, - - VXH_GET_VX_INFO, - VXH_PUT_VX_INFO, - VXH_INIT_VX_INFO, - VXH_SET_VX_INFO, - VXH_CLR_VX_INFO, - VXH_CLAIM_VX_INFO, - VXH_RELEASE_VX_INFO, - VXH_ALLOC_VX_INFO, - VXH_DEALLOC_VX_INFO, - VXH_HASH_VX_INFO, - VXH_UNHASH_VX_INFO, - VXH_LOC_VX_INFO, - VXH_LOOKUP_VX_INFO, - VXH_CREATE_VX_INFO, -}; - -struct _vx_hist_entry { - void *loc; - unsigned short seq; - unsigned short type; - struct _vxhe_vxi vxi; - union { - struct _vxhe_set_clr sc; - struct _vxhe_loc_lookup ll; - }; -}; - -struct _vx_hist_entry *vxh_advance(void *loc); - - -static inline -void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi) -{ - entry->vxi.ptr = vxi; - if (vxi) { - entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt); - entry->vxi.tasks = atomic_read(&vxi->vx_tasks); - entry->vxi.xid = vxi->vx_id; - } -} - - -#define __HERE__ current_text_addr() - -#define __VXH_BODY(__type, __data, __here) \ - struct _vx_hist_entry *entry; \ - \ - preempt_disable(); \ - entry = vxh_advance(__here); \ - __data; \ - entry->type = __type; \ - preempt_enable(); - - - /* pass vxi only */ - -#define __VXH_SMPL \ - __vxh_copy_vxi(entry, vxi) - -static inline -void __vxh_smpl(struct vx_info *vxi, int __type, void *__here) -{ - __VXH_BODY(__type, __VXH_SMPL, __here) -} - - /* pass vxi and data (void *) */ - -#define __VXH_DATA \ - __vxh_copy_vxi(entry, vxi); \ - entry->sc.data = data - -static inline -void __vxh_data(struct vx_info *vxi, void *data, - int __type, void *__here) -{ - __VXH_BODY(__type, __VXH_DATA, __here) -} - - /* pass vxi and arg (long) */ - -#define __VXH_LONG \ - __vxh_copy_vxi(entry, vxi); \ - entry->ll.arg = arg - -static inline -void __vxh_long(struct vx_info *vxi, long arg, - int __type, void *__here) -{ - __VXH_BODY(__type, __VXH_LONG, __here) -} - - -static inline -void __vxh_throw_oops(void *__here) -{ - __VXH_BODY(VXH_THROW_OOPS, {}, __here); - /* prevent further acquisition */ - vxh_active = 0; -} - - -#define vxh_throw_oops() __vxh_throw_oops(__HERE__); - -#define __vxh_get_vx_info(v,h) __vxh_smpl(v, VXH_GET_VX_INFO, h); -#define __vxh_put_vx_info(v,h) __vxh_smpl(v, VXH_PUT_VX_INFO, h); - -#define __vxh_init_vx_info(v,d,h) \ - __vxh_data(v,d, VXH_INIT_VX_INFO, h); -#define __vxh_set_vx_info(v,d,h) \ - __vxh_data(v,d, VXH_SET_VX_INFO, h); -#define __vxh_clr_vx_info(v,d,h) \ - __vxh_data(v,d, VXH_CLR_VX_INFO, h); - -#define __vxh_claim_vx_info(v,d,h) \ - __vxh_data(v,d, VXH_CLAIM_VX_INFO, h); -#define __vxh_release_vx_info(v,d,h) \ - __vxh_data(v,d, VXH_RELEASE_VX_INFO, h); - -#define vxh_alloc_vx_info(v) \ - __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__); -#define vxh_dealloc_vx_info(v) \ - __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__); - -#define vxh_hash_vx_info(v) \ - __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__); -#define vxh_unhash_vx_info(v) \ - __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__); - -#define vxh_loc_vx_info(v,l) \ - __vxh_long(v,l, VXH_LOC_VX_INFO, __HERE__); -#define vxh_lookup_vx_info(v,l) \ - __vxh_long(v,l, VXH_LOOKUP_VX_INFO, __HERE__); -#define vxh_create_vx_info(v,l) \ - __vxh_long(v,l, VXH_CREATE_VX_INFO, __HERE__); - -extern void vxh_dump_history(void); - - -#else /* CONFIG_VSERVER_HISTORY */ - -#define __HERE__ 0 - -#define vxh_throw_oops() do { } while (0) - -#define __vxh_get_vx_info(v,h) do { } while (0) -#define __vxh_put_vx_info(v,h) do { } while (0) - -#define __vxh_init_vx_info(v,d,h) do { } while (0) -#define __vxh_set_vx_info(v,d,h) do { } while (0) -#define __vxh_clr_vx_info(v,d,h) do { } while (0) - -#define __vxh_claim_vx_info(v,d,h) do { } while (0) -#define __vxh_release_vx_info(v,d,h) do { } while (0) - -#define vxh_alloc_vx_info(v) do { } while (0) -#define vxh_dealloc_vx_info(v) do { } while (0) - -#define vxh_hash_vx_info(v) do { } while (0) -#define vxh_unhash_vx_info(v) do { } while (0) - -#define vxh_loc_vx_info(a,v) do { } while (0) -#define vxh_lookup_vx_info(a,v) do { } while (0) -#define vxh_create_vx_info(a,v) do { } while (0) - -#define vxh_dump_history() do { } while (0) - - -#endif /* CONFIG_VSERVER_HISTORY */ - - #ifdef CONFIG_VSERVER_DEBUG #define vxd_assert_lock(l) assert_spin_locked(l) #define vxd_assert(c,f,x...) vxlprintk(!(c), \ diff -NurpP --minimal linux-2.6.16-vs2.1.1-rc15.1/include/linux/vserver/history.h linux-2.6.16-vs2.1.1-rc15.2/include/linux/vserver/history.h --- linux-2.6.16-vs2.1.1-rc15.1/include/linux/vserver/history.h 1970-01-01 01:00:00 +0100 +++ linux-2.6.16-vs2.1.1-rc15.2/include/linux/vserver/history.h 2006-04-05 04:24:49 +0200 @@ -0,0 +1,196 @@ +#ifndef _VX_HISTORY_H +#define _VX_HISTORY_H + +#ifdef CONFIG_VSERVER_HISTORY + +extern unsigned volatile int vxh_active; + +struct _vxhe_vxi { + struct vx_info *ptr; + unsigned xid; + unsigned usecnt; + unsigned tasks; +}; + +struct _vxhe_set_clr { + void *data; +}; + +struct _vxhe_loc_lookup { + unsigned arg; +}; + +enum { + VXH_UNUSED=0, + VXH_THROW_OOPS=1, + + VXH_GET_VX_INFO, + VXH_PUT_VX_INFO, + VXH_INIT_VX_INFO, + VXH_SET_VX_INFO, + VXH_CLR_VX_INFO, + VXH_CLAIM_VX_INFO, + VXH_RELEASE_VX_INFO, + VXH_ALLOC_VX_INFO, + VXH_DEALLOC_VX_INFO, + VXH_HASH_VX_INFO, + VXH_UNHASH_VX_INFO, + VXH_LOC_VX_INFO, + VXH_LOOKUP_VX_INFO, + VXH_CREATE_VX_INFO, +}; + +struct _vx_hist_entry { + void *loc; + unsigned short seq; + unsigned short type; + struct _vxhe_vxi vxi; + union { + struct _vxhe_set_clr sc; + struct _vxhe_loc_lookup ll; + }; +}; + +struct _vx_hist_entry *vxh_advance(void *loc); + + +static inline +void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi) +{ + entry->vxi.ptr = vxi; + if (vxi) { + entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt); + entry->vxi.tasks = atomic_read(&vxi->vx_tasks); + entry->vxi.xid = vxi->vx_id; + } +} + + +#define __HERE__ current_text_addr() + +#define __VXH_BODY(__type, __data, __here) \ + struct _vx_hist_entry *entry; \ + \ + preempt_disable(); \ + entry = vxh_advance(__here); \ + __data; \ + entry->type = __type; \ + preempt_enable(); + + + /* pass vxi only */ + +#define __VXH_SMPL \ + __vxh_copy_vxi(entry, vxi) + +static inline +void __vxh_smpl(struct vx_info *vxi, int __type, void *__here) +{ + __VXH_BODY(__type, __VXH_SMPL, __here) +} + + /* pass vxi and data (void *) */ + +#define __VXH_DATA \ + __vxh_copy_vxi(entry, vxi); \ + entry->sc.data = data + +static inline +void __vxh_data(struct vx_info *vxi, void *data, + int __type, void *__here) +{ + __VXH_BODY(__type, __VXH_DATA, __here) +} + + /* pass vxi and arg (long) */ + +#define __VXH_LONG \ + __vxh_copy_vxi(entry, vxi); \ + entry->ll.arg = arg + +static inline +void __vxh_long(struct vx_info *vxi, long arg, + int __type, void *__here) +{ + __VXH_BODY(__type, __VXH_LONG, __here) +} + + +static inline +void __vxh_throw_oops(void *__here) +{ + __VXH_BODY(VXH_THROW_OOPS, {}, __here); + /* prevent further acquisition */ + vxh_active = 0; +} + + +#define vxh_throw_oops() __vxh_throw_oops(__HERE__); + +#define __vxh_get_vx_info(v,h) __vxh_smpl(v, VXH_GET_VX_INFO, h); +#define __vxh_put_vx_info(v,h) __vxh_smpl(v, VXH_PUT_VX_INFO, h); + +#define __vxh_init_vx_info(v,d,h) \ + __vxh_data(v,d, VXH_INIT_VX_INFO, h); +#define __vxh_set_vx_info(v,d,h) \ + __vxh_data(v,d, VXH_SET_VX_INFO, h); +#define __vxh_clr_vx_info(v,d,h) \ + __vxh_data(v,d, VXH_CLR_VX_INFO, h); + +#define __vxh_claim_vx_info(v,d,h) \ + __vxh_data(v,d, VXH_CLAIM_VX_INFO, h); +#define __vxh_release_vx_info(v,d,h) \ + __vxh_data(v,d, VXH_RELEASE_VX_INFO, h); + +#define vxh_alloc_vx_info(v) \ + __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__); +#define vxh_dealloc_vx_info(v) \ + __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__); + +#define vxh_hash_vx_info(v) \ + __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__); +#define vxh_unhash_vx_info(v) \ + __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__); + +#define vxh_loc_vx_info(v,l) \ + __vxh_long(v,l, VXH_LOC_VX_INFO, __HERE__); +#define vxh_lookup_vx_info(v,l) \ + __vxh_long(v,l, VXH_LOOKUP_VX_INFO, __HERE__); +#define vxh_create_vx_info(v,l) \ + __vxh_long(v,l, VXH_CREATE_VX_INFO, __HERE__); + +extern void vxh_dump_history(void); + + +#else /* CONFIG_VSERVER_HISTORY */ + +#define __HERE__ 0 + +#define vxh_throw_oops() do { } while (0) + +#define __vxh_get_vx_info(v,h) do { } while (0) +#define __vxh_put_vx_info(v,h) do { } while (0) + +#define __vxh_init_vx_info(v,d,h) do { } while (0) +#define __vxh_set_vx_info(v,d,h) do { } while (0) +#define __vxh_clr_vx_info(v,d,h) do { } while (0) + +#define __vxh_claim_vx_info(v,d,h) do { } while (0) +#define __vxh_release_vx_info(v,d,h) do { } while (0) + +#define vxh_alloc_vx_info(v) do { } while (0) +#define vxh_dealloc_vx_info(v) do { } while (0) + +#define vxh_hash_vx_info(v) do { } while (0) +#define vxh_unhash_vx_info(v) do { } while (0) + +#define vxh_loc_vx_info(a,v) do { } while (0) +#define vxh_lookup_vx_info(a,v) do { } while (0) +#define vxh_create_vx_info(a,v) do { } while (0) + +#define vxh_dump_history() do { } while (0) + + +#endif /* CONFIG_VSERVER_HISTORY */ + +#endif /* _VX_HISTORY_H */ diff -NurpP --minimal linux-2.6.16-vs2.1.1-rc15.1/kernel/vserver/history.c linux-2.6.16-vs2.1.1-rc15.2/kernel/vserver/history.c --- linux-2.6.16-vs2.1.1-rc15.1/kernel/vserver/history.c 2006-03-24 04:45:39 +0100 +++ linux-2.6.16-vs2.1.1-rc15.2/kernel/vserver/history.c 2006-04-05 04:29:30 +0200 @@ -21,6 +21,7 @@ #include #include +#include #ifdef CONFIG_VSERVER_HISTORY