ia64/xen-unstable

changeset 18117:217c8b6ebfab

[XSM][FLASK] Remove unused code from XSM and Flask

The complete_init hook has been unused since the introduction of the
create secure interface for domain_create.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 21 09:42:30 2008 +0100 (2008-07-21)
parents fa66b33f975a
children 978ffdd19c0f
files xen/include/xsm/xsm.h xen/xsm/dummy.c xen/xsm/flask/hooks.c
line diff
     1.1 --- a/xen/include/xsm/xsm.h	Mon Jul 21 09:41:36 2008 +0100
     1.2 +++ b/xen/include/xsm/xsm.h	Mon Jul 21 09:42:30 2008 +0100
     1.3 @@ -108,7 +108,6 @@ struct xsm_operations {
     1.4      int (*schedop_shutdown) (struct domain *d1, struct domain *d2);
     1.5  
     1.6      long (*__do_xsm_op) (XEN_GUEST_HANDLE(xsm_op_t) op);
     1.7 -    void (*complete_init) (struct domain *d);
     1.8  
     1.9  #ifdef CONFIG_X86
    1.10      int (*shadow_control) (struct domain *d, uint32_t op);
    1.11 @@ -392,11 +391,6 @@ static inline long __do_xsm_op (XEN_GUES
    1.12      return xsm_call(__do_xsm_op(op));
    1.13  }
    1.14  
    1.15 -static inline void xsm_complete_init (struct domain *d)
    1.16 -{
    1.17 -    xsm_call(complete_init(d));
    1.18 -}
    1.19 -
    1.20  #ifdef XSM_ENABLE
    1.21  extern int xsm_init(unsigned int *initrdidx, const multiboot_info_t *mbi,
    1.22                                            unsigned long initial_images_start);
     2.1 --- a/xen/xsm/dummy.c	Mon Jul 21 09:41:36 2008 +0100
     2.2 +++ b/xen/xsm/dummy.c	Mon Jul 21 09:42:30 2008 +0100
     2.3 @@ -254,11 +254,6 @@ static void dummy_free_security_evtchn (
     2.4      return;
     2.5  }
     2.6  
     2.7 -static void dummy_complete_init (struct domain *d)
     2.8 -{
     2.9 -    return;
    2.10 -}
    2.11 -
    2.12  static long dummy___do_xsm_op(XEN_GUEST_HANDLE(xsm_op_t) op)
    2.13  {
    2.14      return -ENOSYS;
    2.15 @@ -462,7 +457,6 @@ void xsm_fixup_ops (struct xsm_operation
    2.16      set_to_dummy_if_null(ops, schedop_shutdown);
    2.17  
    2.18      set_to_dummy_if_null(ops, __do_xsm_op);
    2.19 -    set_to_dummy_if_null(ops, complete_init);
    2.20  
    2.21  #ifdef CONFIG_X86
    2.22      set_to_dummy_if_null(ops, shadow_control);
     3.1 --- a/xen/xsm/flask/hooks.c	Mon Jul 21 09:41:36 2008 +0100
     3.2 +++ b/xen/xsm/flask/hooks.c	Mon Jul 21 09:42:30 2008 +0100
     3.3 @@ -714,18 +714,6 @@ static int flask_perfcontrol(void)
     3.4      return domain_has_xen(current->domain, XEN__PERFCONTROL);
     3.5  }
     3.6  
     3.7 -void flask_complete_init(struct domain *d)
     3.8 -{
     3.9 -    struct domain_security_struct *dsec;
    3.10 -
    3.11 -    /* Set the security state for the Dom0 domain. */
    3.12 -    dsec = d->ssid;
    3.13 -    dsec->sid = SECINITSID_DOM0;
    3.14 -    dsec->create_sid = SECINITSID_UNLABELED;
    3.15 -
    3.16 -    printk("Flask:  Completed initialization.\n");
    3.17 -}
    3.18 -
    3.19  #ifdef CONFIG_X86
    3.20  static int flask_shadow_control(struct domain *d, uint32_t op)
    3.21  {
    3.22 @@ -1101,7 +1089,6 @@ static struct xsm_operations flask_ops =
    3.23      .schedop_shutdown = flask_schedop_shutdown,
    3.24  
    3.25      .__do_xsm_op = do_flask_op,
    3.26 -    .complete_init = flask_complete_init,    
    3.27  
    3.28  #ifdef CONFIG_X86
    3.29      .shadow_control = flask_shadow_control,