Problems compiling: SELinux 200104121417 on Alpha (config/flash.h: No such file or directory)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I am having a problem compiling SELinux with a 2.4 kernel on an alpha. I am using the complete downloaded package, slinux-200104121417-release.tgz (i.e. NOT the patches).
When doing a make dep; make I get the following error:
gcc -D__KERNEL__ -I/home/snowdog/src/slinux/kernel-2.4/include -Wall
- - -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
- - -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6 -c -oinit/main.oinit/main.c
In file included from /home/snowdog/src/slinux/kernel-2.4/include/linux/mm.h:4,
from/home/snowdog/src/slinux/kernel-2.4/include/linux/slab.h:14,
from/home/snowdog/src/slinux/kernel-2.4/include/linux/proc_fs.h:9,
from init/main.c:18:
/home/snowdog/src/slinux/kernel-2.4/include/linux/sched.h:35:26:config/flask.h: No such file or directory
I saw an article in the archives talking about this
(http://www.nsa.gov/selinux/list-archive/0003.html), but it said this shouldn't happen if I was doing a normal kernel build from the sources, which I was.
I then proceeded to do the following:
[snowdog@alpha kernel]$ cd flask
[snowdog@alpha flask]$ export TOPDIR=.. [snowdog@alpha flask]$ make/bin/sh ./mkflask.sh awk security_classes initial_sids cp flask.h class_to_string.h initial_sid_to_string.h ../include/linux/flask/bin/sh ./mkaccess_vector.sh awk access_vectors
cp av_inherit.h common_perm_to_string.h av_perm_to_string.h av_permissions.h ../include/linux/flask [snowdog@alpha flask]$
I assume the above part is normally done during the kernel build.
I then edited the file "include/linux/sched.h" and changed line 35 FROM "#include <config/flask.h>" TO "#include <linux/flask/flask.h>".
Finally, I changed to the kernel root directory and typed "make" and it proceeded to compile the kernel with no additional errors.
Am I doing something wrong or did I miss an important step from the docs? I read through the docs and didn't see any pre-compile stuff that needed to be done for the kernel to build properly.
The above method is probably not the cleanest or most ideal way to get this to compile. Any thoughts or suggestions??
Thanks...
Sean Rolinson
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
iQA/AwUBOwRB1gZ8QuEIBpz3EQLdMQCcD4djruOnWsG+Cf8KDsSDBAzR7FIAoNIb OcCUfouNbR7dwSMAaFfGn4YK
=hSjY
-----END PGP SIGNATURE-----
Quoted 3 lines · Sean Rolinson
I am having a problem compiling SELinux with a 2.4 kernel on an alpha. I am using the complete downloaded package, slinux-200104121417-release.tgz (i.e. NOT the patches).
SELinux is not currently supported on the Alpha, although it should not be difficult to port it to the Alpha. If you grep for CONFIG_FLASK under arch/i386, you'll see that some of changes are in the architecture-specific files. Also, there is some Alpha-specific code in the execve system call that might require some Flask changes, but that isn't clear.
Quoted 2 lines
I then edited the file "
include/linux/sched.h" and changed line 35 FROM "#include <config/flask.h>" TO "#include <linux/flask/flask.h>".
These are two very different header files. config/flask.h is generated during the kernel configuration and defines the various CONFIG_FLASK* options. You don't have one because arch/alpha/config.in doesn't include any Flask options, since we don't currently support the Alpha (see arch/i386/config.in for the Flask security mechanisms menu). This option menu should actually be moved into a separate config.in file in a non-architecture-specific directory (e.g. flask/config.in) since the options themselves are not architecture-specific so that it can be sourced by any of the architecture-specific config.in files.
Quoted 2 lines
Finally, I changed to the kernel root directory and typed "make" and it proceeded to compile the kernel with no additional errors.
Since you didn't have a config/flask.h, none of the Flask options were defined, so your "make" simply built an ordinary Linux kernel.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stephen/Group,
Thanks for the response. It explains ALOT about the install.
Is there currently anyone on the list who is working on porting SELinux to Alpha? Because I'd love to hop on the bus. :)
Otherwise, I suppose I can put on my driving hat and attempt to help out. However, I'm not much of a programmer, so unless we want the Alpha kernel booting up and printing "Hello World" endlessly, I would certainly welcome any programming resources.
If anyone is interested, lemme know.
Thanks again...
Sean Rolinson
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
iQA/AwUBOwVIyAZ8QuEIBpz3EQKhogCg2axiM9tQxibCgdLgcpft7kmiW/kAn2E1 j2Ck5oO8/KGBguofYh4YL1vj
=VDjP
-----END PGP SIGNATURE-----
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.