|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Fix boot crash on xsm/flask enabled builds when no policy module is present
Xen crashes on boot of xsm/flask enabled builds, if policy module is not
specified.
This seems to have worked on 4.1 at least. Can be fixed by testing whether
policy_buffer
is NULL before attempting to load from it - it's a global which is set to
non-NULL when
policy module is detected.
Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@xxxxxxxxxx>
---
xen/xsm/flask/hooks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index fa0589a..cfa2929 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1585,7 +1585,8 @@ static __init int flask_init(void)
if ( register_xsm(&flask_ops) )
panic("Flask: Unable to register with XSM.\n");
- ret = security_load_policy(policy_buffer, policy_size);
+ if ( policy_buffer )
+ ret = security_load_policy(policy_buffer, policy_size);
if ( flask_enforcing )
printk("Flask: Starting in enforcing mode.\n");
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |