[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 12/15] xen/xsm: remove .xsm_initcall.init section


  • To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
  • From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Date: Fri, 17 Jun 2016 13:04:01 -0400
  • Cc: xen-devel@xxxxxxxxxxxxx
  • Delivery-date: Fri, 17 Jun 2016 17:04:08 +0000
  • Ironport-phdr: 9a23:xjdrUByewI9NmGTXCy+O+j09IxM/srCxBDY+r6Qd0OoRIJqq85mqBkHD//Il1AaPBtWKraMcwLOP6+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6DyZXvnLnro9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFm2dfv/SXnYUPPoyFEEzZerh0dIA/D9hj2Fq3jvzDoq/Zw22GlPMn1BeQ3XjK45qstVx7siw8ALTcy9GyRgct12vF1uhWk8jB2xY/ZZMm5ObJRZKrUc5tOSWVNU8lLXgRdE4i8aM0JFONHMuFG+dqu72ASpAezUFH/TNjkzSVF0zqvh/U3
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 06/17/2016 11:50 AM, Konrad Rzeszutek Wilk wrote:
On Thu, Jun 09, 2016 at 10:47:15AM -0400, Daniel De Graaf wrote:
Since FLASK is the only implementation of XSM hooks in Xen, using an
iterated initcall dispatch for setup is overly complex.  Change this to

As such, should the Kconfig file enable the FLASK by default?
Or make the XSM entry have the configuration for FLASK?

Or perhaps make the FLASK be the visible one and select XSM?

XSM has previously been the configuration option to enable.  If XSM is
enabled (by choice), FLASK will then be enabled by default.

Logically, FLASK is an implementation of XSM, and while it would be
possible to swap them, this would probably need to be done by hiding the
XSM option from the user.

a direct function call to a globally visible function; if additional XSM
hooks are added in the future, a switching mechanism will be needed
regardless, and that can be placed in xsm_core.c.

+config FLASK
+       bool "FLux Advanced Security Kernel support"
+       default y
+       depends on XSM

So this would be 'select XSM' ?
+       ---help---
+         Enables FLASK (FLux Advanced Security Kernel) as the access control
+         mechanism used by the XSM framework.  This provides a mandatory access
+         control framework by which security enforcement, isolation, and
+         auditing can be achieved with fine granular control via a security
+         policy.
+
+         If unsure, say Y.
+
+config FLASK_AVC_STATS
+       def_bool y
+       depends on FLASK
+       ---help---
+         Maintain statistics on the access vector cache
+
 # Enable schedulers
 menu "Schedulers"
        visible if EXPERT = "y"
diff --git a/xen/xsm/xsm_core.c b/xen/xsm/xsm_core.c
index 634ec98..cb2fdb6 100644
--- a/xen/xsm/xsm_core.c
+++ b/xen/xsm/xsm_core.c
@@ -38,13 +38,7 @@ static inline int verify(struct xsm_operations *ops)

 static void __init do_xsm_initcalls(void)
 {
-    xsm_initcall_t *call;
-    call = __xsm_initcall_start;
-    while ( call < __xsm_initcall_end )
-    {
-        (*call) ();
-        call++;
-    }
+    flask_init();

Could you delete do_xsm_initcalls() and make xsm_init() call flask_init() ?

Sure.

--
Daniel De Graaf
National Security Agency

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.