Well, over the last few weeks I have been having some serious fun.. using virtual machines and what not, i have been doing some serious kernel debugging/hacking..
my tools:
-printk Yay!
-systemtap (coolest thing over.. on demand, dymanic printk's)..
looked into kdb or kgdb, but never actually got to it.. systemtap and manual code printk's when systemtap failed, worked more or less well enuff for me..
Basically, I figured out 2 things... one openvz needs to be configured to allow the use of devices that aren't in the default set.. apparently this info was in the 112 page documentation, but no where easily accessible in the faq or wiki.. so i didn't know about it...
After overcomming openvz blocking my access, I got around to figuring out why grsec was blocking access... openvz was blocking access on the open call.. grsec was blocking access on the write system call...
basically, i drilled down to the following code in write_grsec_handler@grsecurity/gracl.c
- Code: Select all
if ((gr_status & GR_READY) && !(current->acl->mode & GR_KERNELAUTH))
Basically, for anything in the chroot, GR_KERNELAUTH wasn't set in the mode.. after digging further into the grsecurity code in the kernel and gradm, I figured out how to get that mode set..
so, there is a subject mode option called 'a'... when a subject is given mode 'a' in the policy, then it can have access to /dev/grsec... i never knew of this, because I am assuming that the / subject is automatically by default given the 'a' mode, so I have never had to specify it..
anyways, after giving the gradm in the chroot the 'a' subject mode, it could now authenticate to the kernel.. yay!!
so, now that I got that figured out, I am going to get back to working on the openvz/grsec patchset.. run some openvz environments for a couple weeks, try some well know servers like apache, and ftp server.. stress the server in their openvz environments under grsec policy protections.. and if all goes well, I will make another post regarding where you can get the patchset..
mind u.. this is a couple of weeks worth of time that I will spend... but i'll prolly spread this couple of weeks worth of time over a month or two.. =)..
maybe within a month i'll post an update or so..
--hmhansolo