XFS and LSM
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Keith Owens
Quoted 6 lines · Russell Coker
I wanted to build a system running the XFS file system and Linux Security Modules (LSM), so I had a look at hacking the patch files to make them work.
I found one issue where the patches severely conflict, system call 1217 on IA64 is
sys_setxattrfor XFS and issys_securityfor LSM!The *attr syscall numbers are official, in both Linus and Marcelo kernels. LSM is picking an arbitrary syscall number for testing so they will have to find another number - and change user space to match.
OK. Shouldn't be a big issue.
Quoted 3 lines
Pity Linus did not take my patch that reserves a range of syscall numbers for testing and provides a clean interface for determining which number to use. Linus does not consider this to be a problem.
Yes, reserving a separate range for testing would be good, especially if you can make it work so that patches don't conflict...
BTW XFS also changes the quota system in a serious way which breaks SE Linux (not LSM).
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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.
Quoted 2 lines · Russell Coker
BTW XFS also changes the quota system in a serious way which breaks SE Linux (not LSM).
The changes to the quota code have already been merged into 2.5, and the 2.5 SELinux module in BitKeeeper has already been updated for those changes. You can backport the quotactl hook from the 2.5 SELinux module.
--
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.
So,
ext2 and ext3 would be optimum filesystems that would not "break" SE Linux?
- Ryan
Signature · 12 lines
Ryan O. Emge Information Assurance & Security Norwich University - http://www.norwich.edu 158 Harmon Drive Northfield, VT 05663 An NSA "Center of Academic Excellence in Information Assurance" E: [email protected] On Thu, 13 Jun 2002 12:47:31 +0200
Quoted 19 lines · Russell Coker
Quoted 11 lines · Keith Owens
Quoted 6 lines · Russell Coker
I wanted to build a system running the XFS file system and Linux Security Modules (LSM), so I had a look at hacking the patch files to make them work.
I found one issue where the patches severely conflict, system call 1217 on IA64 is
sys_setxattrfor XFS and issys_securityfor LSM!The *attr syscall numbers are official, in both Linus and Marcelo kernels. LSM is picking an arbitrary syscall number for testing so they will have to find another number - and change user space to match.
OK. Shouldn't be a big issue.
Quoted 3 lines
Pity Linus did not take my patch that reserves a range of syscall numbers for testing and provides a clean interface for determining which number to use. Linus does not consider this to be a problem.
Quoted 17 lines
Yes, reserving a separate range for testing would be good, especially if you can make it work so that patches don't conflict...
BTW XFS also changes the quota system in a serious way which breaks SE Linux (not LSM).
Signature · 9 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the From field. -- 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.
--
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.
Quoted 1 line · Ryan Emge
ext2 and ext3 would be optimum filesystems that would not "break" SE Linux?
Stephen says that the quota changes in question are already in 2.5 kernels, so if you can find a 2.5.x kernel patch for XFS then it should not cause any difficulty (unless you use IA64).
Ext2/3 are not the only file systems that will work without problems. ReiserFS is working well for me, there's no reason to expect a problem with Minix or any other Inode based file system either.
The only problems are with file systems that lack Inodes (DOS and NFS), and with file systems that aren't in the kernel as applying several patches to the kernel is likely to result in patches not applying or a kernel that doesn't compile.
Anyway I have a 2.4.18 kernel running with XFS support compiled in. When I quickly hacked the support in I probably broke SE support for quotas, but I don't care as it's not something that's important to me. The only problem here is that I can't be sure that my sample policy works well for other people in this regard (but it would not be difficult for them to fix).
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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.
Quoted 3 lines · Russell Coker
Stephen says that the quota changes in question are already in 2.5 kernels, so if you can find a 2.5.x kernel patch for XFS then it should not cause any difficulty (unless you use IA64).
I'd actually suggest backporting the quotactl and *xattr hooks from the 2.5 LSM and SELinux to the 2.4 kernel with XFS merged.
Quoted 3 lines
Ext2/3 are not the only file systems that will work without problems. ReiserFS is working well for me, there's no reason to expect a problem with Minix or any other Inode based file system either.
The SELinux kernel module only tries using a persistent label mapping if it recognizes the filesystem type as being one of a set of known types that are known to have persistent and unique inode numbers. It will currently only try to do this with ext2, ext3, and reiserfs unless you patch the module. We'll likely make this configurable so that you can specify the set of legitimate filesystem types in the policy configuration.
--
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.
Quoted 7 lines · Stephen Smalley
Quoted 3 lines · Russell Coker
Stephen says that the quota changes in question are already in 2.5 kernels, so if you can find a 2.5.x kernel patch for XFS then it should not cause any difficulty (unless you use IA64).
I'd actually suggest backporting the quotactl and *xattr hooks from the 2.5 LSM and SELinux to the 2.4 kernel with XFS merged.
It's probably easier that way. Or you can just remove the few lines of code in question as I did. If you don't need SE functionality on quotas that's an OK interim solution.
Quoted 11 lines
Quoted 3 lines
Ext2/3 are not the only file systems that will work without problems. ReiserFS is working well for me, there's no reason to expect a problem with Minix or any other Inode based file system either.
The SELinux kernel module only tries using a persistent label mapping if it recognizes the filesystem type as being one of a set of known types that are known to have persistent and unique inode numbers. It will currently only try to do this with ext2, ext3, and reiserfs unless you patch the module. We'll likely make this configurable so that you can specify the set of legitimate filesystem types in the policy configuration.
Having it configurable would be good, but in the mean time it's not difficult to patch hooks.c .
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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.
Quoted 1 line · Ryan Emge
ext2 and ext3 would be optimum filesystems that would not "break" SE Linux?
SELinux works fine with ext2 and ext3. It has also been reported to work with reiserfs, although we have not tested it ourselves.
With regard to XFS in general, see my prior message on the topic at
http://marc.theaimsgroup.com/?l=selinux&m=101300861319394&w=2. With regard to the quota changes, these can be easily addressed by backporting the corresponding changes to SELinux from the 2.5 SELinux module. Likewise, the LSM and SELinux changes related to the *xattr operations can be backported from the 2.5 SELinux module.
--
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.