Skip to contentSkip to conversation

2.6.0-test3 and UML

DISCUSSION Russell Coker 2 participants 2 messages Aug 14, 2003 – Aug 15, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw

For 2.6.0-test3 to work with UML the following changes are necessary:

In security/selinux/avc.c add the following:
#include <linux/init.h>

In include/asm-um/common.lds.S add the following:
__security_initcall_start = .; .security_initcall.init : { *(.security_initcall.init) } __security_initcall_end = .;

This makes it compile and appear to run. I'm fairly certain that adding init.h is OK, but I'm not sure if the initcall stuff is right. Hopefully Steve can advise.

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 4 lines · Russell Coker

For 2.6.0-test3 to work with UML the following changes are necessary:

In security/selinux/avc.c add the following:
#include <linux/init.h>

This is actually in the tree now, as part of Geert's patch to allow m68k compilation.

Quoted 8 lines

In include/asm-um/common.lds.S add the following:
__security_initcall_start = .; .security_initcall.init : { *(.security_initcall.init) } __security_initcall_end = .;

This makes it compile and appear to run. I'm fairly certain that adding init.h is OK, but I'm not sure if the initcall stuff is right. Hopefully Steve can advise.

Use SECURITY_INIT, which is defined in include/asm-generic/vmlinux.lds.h. This header is already included by arch/um/vmlinux.lds.S prior to including common.lds.S, so you should be able to use the SECURITY_INIT symbol.

You should submit the change to the UML maintainer.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.