Skip to contentSkip to conversation

IA-64 Boot Partition

POLICY/PATCH KaiGai Kohei 4 participants 8 messages Apr 16, 2005 – Apr 19, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hello,

This attached patch modifies genfs_contexts.
When arch_ia64 is defined in tunable/tunable.tun,
vfat is labeled as boot_t, not dosfs_t.

Currently, vfat-fs is recognized as dosfs_t.
But, vfat is often used as bootable partition
which should be labeled as boot_t.

In IA-64 Linux, any files related to booting process such as vmlinuz and initrd.img are placed under /boot/efi/.
We must mount a vfat partition contains such files on /boot/efi, because EFI can't recognize the contents of Ext2/3 partitions. (EFI is a firmware similar to PC's BIOS.)
# The kernel provided by RedHat is placed in /boot/efi/efi/redhat.

Thanks,
--
DO NOTHING IS THE WORST POLICY.
KaiGai Kohei <[email protected]>

genfs_contexts +3 -1
@@ -77,7 +77,9 @@
 genfscon ramfs /			system_u:object_r:ramfs_t
 
 # vfat, msdos
-genfscon vfat /				system_u:object_r:dosfs_t
+ifdef(`arch_ia64',
+`genfscon vfat /				system_u:object_r:boot_t',
+`genfscon vfat /				system_u:object_r:dosfs_t')
 genfscon msdos /			system_u:object_r:dosfs_t
 genfscon fat /				system_u:object_r:dosfs_t
 genfscon ntfs /				system_u:object_r:dosfs_t
tunables/tunable.tun +3 -0
@@ -29,3 +29,6 @@
 
 # for ndc_t to be used for restart shell scripts
 dnl define(`ndc_shell_script')
+
+# for IA-64 archtecture
+dnl define(`arch_ia64')
#1 lore raw
Quoted 8 lines · KaiGai Kohei

This attached patch modifies genfs_contexts.
When arch_ia64 is defined in tunable/tunable.tun,
vfat is labeled as boot_t, not dosfs_t.

Currently, vfat-fs is recognized as dosfs_t.
But, vfat is often used as bootable partition
which should be labeled as boot_t.

Quoted 6 lines

In IA-64 Linux, any files related to booting process such as vmlinuz and initrd.img are placed under /boot/efi/.
We must mount a vfat partition contains such files on /boot/efi, because EFI can't recognize the contents of Ext2/3 partitions. (EFI is a firmware similar to PC's BIOS.)
# The kernel provided by RedHat is placed in /boot/efi/efi/redhat.

It would seem like mounting /boot with the context= mount option is a better solution. Vfat being mounted at /boot is an exception to the genfscon; there could be other vfat partitions you might want to mount, and they should be dosfs_t. So rather then making all vfat partitions boot_t on ia64, you should just mount /boot with the context= option.

Signature · 10 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150



--
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.
#2 lore raw

Hi, Christopher

Thanks for your solution.
Indeed, we can solve this problem with appending a line into /etc/fstab or a command line option.

BTW, what archtectures are used and checked by SELinux's people ? For example, kernel panic is occured on the 2.6.6 or former kernel for IA-64 when SELinux is enabled. This phenomenon have been overlooked.

I can validate the evidence on IA64/i386 environment.
Is there a person who can try to run SELinux on infrequent(not i386) plathome?

Thanks,

Quoted 5 lines

It would seem like mounting /boot with the context= mount option is a better solution. Vfat being mounted at /boot is an exception to the genfscon; there could be other vfat partitions you might want to mount, and they should be dosfs_t. So rather then making all vfat partitions boot_t on ia64, you should just mount /boot with the context= option.

Signature · 7 lines
DO NOTHING IS THE WORST POLICY.
KaiGai Kohei <[email protected]>

--
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.
#3 lore raw
Quoted 6 lines · KaiGai Kohei

BTW, what archtectures are used and checked by SELinux's people ? For example, kernel panic is occured on the 2.6.6 or former kernel for IA-64 when SELinux is enabled. This phenomenon have been overlooked.

I can validate the evidence on IA64/i386 environment.
Is there a person who can try to run SELinux on infrequent(not i386) plathome?

I have AMD64 and PPC running fine. I know SPARC64 works too.

Signature · 10 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150



--
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.
#4 lore raw
In reply to KaiGai Kohei
Quoted 10 lines · KaiGai Kohei

Thanks for your solution.
Indeed, we can solve this problem with appending a line into /etc/fstab or a command line option.

BTW, what archtectures are used and checked by SELinux's people ? For example, kernel panic is occured on the 2.6.6 or former kernel for IA-64 when SELinux is enabled. This phenomenon have been overlooked.

I can validate the evidence on IA64/i386 environment.
Is there a person who can try to run SELinux on infrequent(not i386) plathome?

All of my machines are x86, so I'm afraid I can't be of much help there.

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.
#5 lore raw

Hi,

Quoted 9 lines
Quoted 6 lines

BTW, what archtectures are used and checked by SELinux's people ? For example, kernel panic is occured on the 2.6.6 or former kernel for IA-64 when SELinux is enabled. This phenomenon have been overlooked.

I can validate the evidence on IA64/i386 environment.
Is there a person who can try to run SELinux on infrequent(not i386) plathome?

All of my machines are x86, so I'm afraid I can't be of much help there.

In Japan, Secure-OS such as SELinux is hoped for embedded computing field, because applying the latest security patch for those application is not as easy as one for our desktop PC.
So, I wonder who did evaluate the behavior on ARM/MIPS archtecture.

# This is NOT NEC's bussiness requirement, my personal interresting. :-)

Thanks,

Signature · 7 lines
DO NOTHING IS THE WORST POLICY.
KaiGai Kohei <[email protected]>

--
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.
#6 lore raw
Quoted 4 lines · KaiGai Kohei

In Japan, Secure-OS such as SELinux is hoped for embedded computing field, because applying the latest security patch for those application is not as easy as one for our desktop PC.
So, I wonder who did evaluate the behavior on ARM/MIPS archtecture.

Earlier versions of SELinux were ported to ARM and successfully run on the iPAQ by two independent efforts, but that was all prior to the 2.6 SELinux. At this point, the largest challenge to SELinux there is likely the fact that the 2.6 SELinux depends on extended attributes for file security contexts, and jffs2 doesn't support them natively. There has been discussion of supporting extended attributes in jffs3, I believe.

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.
#7 lore raw
In reply to KaiGai Kohei
Quoted 4 lines · KaiGai Kohei

In Japan, Secure-OS such as SELinux is hoped for embedded computing field, because applying the latest security patch for those application is not as easy as one for our desktop PC.
So, I wonder who did evaluate the behavior on ARM/MIPS archtecture.

I was one of the people who got SE Linux to work on an iPaQ. I own two iPaQ's and plan to get them going again as soon as JFFS2 supports XATTRs.

I have no immediate plans to get any more machines other than x86. In Australia P3-800 class machines are really cheap, such machines provide all the computer power I generally need so I don't have any plans to purchase anything better.

I have access to some other platforms in the Red Hat test lab, but nothing I can actually have on my desk.

We really need to get some people seriously using SE Linux on non-x86 platforms for their regular computer use to get everything tested out.

Signature · 9 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.