--- trunk/ccs-patch/README.ccs 2007/07/10 11:52:21 290 +++ trunk/1.6.x/ccs-patch/README.ccs 2008/11/04 04:30:02 1778 @@ -1,7 +1,7 @@ Notes for TOMOYO Linux project This is a handy Mandatory Access Control patch for Linux kernels. -This patch is released under the GPL. +This patch is released under the GPLv2. Project URL: http://tomoyo.sourceforge.jp/ @@ -769,7 +769,7 @@ @ Allow reuse of memory allocated for domain policy. - As with domain policy, unlike other policies, didn't have + Regarding domain policy, unlike other policies, didn't have "is_deleted" flag and new memory were allocated if the deleted entries are given again. But to allow administrators switch domain policy periodically, @@ -933,8 +933,8 @@ @ Fix ReadAddressGroupPolicy() bug. - ReadAddressGroupPolicy() fails if both "path_group" and "address_group" are used - because I forgot to set "head->read_var1 = NULL". + ReadAddressGroupPolicy() fails if both "path_group" and "address_group" + are used because I forgot to set "head->read_var1 = NULL". Fix 2007/07/10 @@ -944,3 +944,767 @@ but permission check was missing. Version 1.4.2 2007/07/13 Bug fix release. + +Fix 2007/08/06 + + @ Remove mount-flags manipulation. + + Until now, administrator is permitted to turn on/off specific mount + options regardless of mount options passed to kernel. + I removed this feature because "exact option matching" sounds better than + "automatic option enabler/disabler". + + @ Remove /proc/ccs/info/mapping . + + I removed /proc/ccs/info/mapping because nobody seems to use this + feature. + + @ Call external policy loader automatically. + + Until now, users had to add init=/.init parameter to load policy + before /sbin/init starts. + I inserted call_usermodehelper() to call external policy loader when + execve("/sbin/init") is requested and external policy loader exists. + + This change will remove init=/.init parameter from most environment, + although call_usermodehelper() can't handle interactive operations. + + @ Move external policy loader from /.init to /sbin/ccs-init . + + Installing programs in / directory is not good for packaging. + +Fix 2007/08/13 + + @ Update external policy loader. + + It turned out that /sbin/ccs-init invoked via call_usermodehelper() + can handle interactive operations by opening /dev/console . + Now, there is no difference between init=/sbin/ccs-init and + call_usermodehelper("/sbin/ccs-init"), and users no longer need to + add init=/sbin/ccs-init parameter to load policy before /sbin/init + starts. + +Fix 2007/08/14 + + @ Update recvmsg() hooks. + + Until now, it was impossible to apply network access control for + incoming UDP and RAW packets if they are brought to userland using + read() or recvmsg() with NULL address because address buffer is NULL. + I moved hooks from sock_recvmsg() to skb_recv_datagram() so that + network access control for incoming UDP and RAW packets always work. + +Fix 2007/08/16 + + @ Return appropriate error code for CheckMountPermission(). + + I was returning -EPERM if something is wrong with CheckMountPermission(). + But SELinux determines whether selinuxfs is supported by kernel + based on whether error code is -ENODEV or not. + So I stopped returning -EPERM unconditionally. + +Fix 2007/08/17 + + @ Remove initializer directive. + + Use "initialize_domain" instrad of "initializer". + +Fix 2007/08/21 + + @ Fix "allow_argv0 ... if if ..." bug. + + It was impossible to use a word "if" to the second argument of + allow_argv0 if condition part is used. + +Fix 2007/08/24 + + @ Move /proc/ccs/\*/\* to /proc/ccs/\* . + + Some pathnames for /proc/ccs/ interface were changed. + +Fix 2007/09/05 + + @ Drop MSG_PEEK'ed message before skb_free_datagram(). + + I need to remove head message from unwanted source + from socket's receive queue so that the caller can pick up + next message from wanted source with MSG_PEEK flags. + +Version 1.5.0 2007/09/20 Usability enhancement release. + +Fix 2007/09/27 + + @ Avoid eating memory after quota exceeded. + + Although ACL entries in a domain won't be added if the domain's quota + has exceeded, SaveName() in AddFileACL() is called anyway. + This caused unneeded memory consumption. + + Now, quota checking is done before getting domain_acl_lock lock. + This may exceed quota by one or two entries, but that won't matter. + +Fix 2007/10/16 + + @ Add environment variable check. + + There are environment variables that may cause dangerous behavior + like LD_\* . + So I introduced 'allow_env' directive that allows specified + environment variable inherited to next domain. + Unlike other permissions, this check is done at execve() time + using next domain's ACL information. + + To manage commonly inherited environments like PATH , + you can use 'allow_env' directive in exception policy + to globally grant specified environment variable. + +Fix 2007/11/05 + + @ Replace semaphore with mutex. + + I replaced semaphore with mutex. + + @ Add missing down() in AddReservedEntry(). + + Mutex debugging capability told me that I had forgotten to call down() + since TOMOYO version 1.3.2 . + This function is not called by learning mode, + so the semaphore's counter will not overflow for normal usage. + +Fix 2005/11/27 + + @ Fix ReadTable() truncation bug. + + "snprintf(str, size, format, ...) >= size" means truncated. + But I was checking for "snprintf(str, size, format, ...) > size". + As a result, some entries might be dumped without '\n'. + + @ Purge direct "->prev"/"->next" manipulation. + + All list manipulations use "struct list_head" or "struct list1_head". + "struct list1_head" doesn't have "->prev" member to save memory usage. + +Fix 2007/11/29 + + @ Add missing semaphore in GetEXE(). + + mm->mmap_sem was missing. + +Fix 2007/12/17 + + @ Remove unused EXPORT_SYMBOL(). + + Mark some functions static. + +Fix 2007/12/18 + + @ Fix AddMountACL() rejection bug. + + To my surprise, "mount --bind source dest" accepts + not only "both source and dest are directory" + but also "both source and dest are non-directory". + I was rejecting if dest is not a directory in AddMountACL(). + + @ Change log format. + + Profile number and mode is added in audit logs. + +Fix 2008/01/03 + + @ Change directive for file's read/write/execute permission. + + Directives for file's read/write/execute permissions were + 4/2/1 respectively. But for easier understanding, they are now + replaced by read/write/execute (e.g. "allow_read" instead of "4"). + But for easier inputting, 4/2/1 are still accepted instead of + allow_read/allow_write/allow_execute respectively. + + @ Change internal data structure. + + Since I don't have more than 16 types of file permissions, + I combined them using bit-fields. + + Each entry had a field for conditional permission support. + But since this field is unlikely used, I separated the field from + common part. + + These changes will reduce memory used by policy. + +Fix 2008/01/15 + + @ Add ptrace() hook. + + To prevent attackers from controlling important processes using + ptrace(), I added a hook for ptrace(). + Most programs (except strace(1) and gdb(1)) won't use ptrace(2). + + @ Fix sleep condition check in CheckSocketRecvDatagramPermission(). + + It seems that correct method to use is in_atomic() + rather than in_interrupt() because in_atomic() returns nonzero + whenever scheduling is not allowed. + +Fix 2008/02/05 + + @ Use find_task_by_vpid() instead of find_task_by_pid(). + + Kernel 2.6.24 introduced PID namespace. + To search PID given from userland, the kernel needs to use + find_task_by_vpid() instead of find_task_by_pid(). + +Fix 2008/02/14 + + @ Add execve() parameter checking. + + Until now, it was impossible to check argv[] and envp[] parameters + passed to execve(). + I expanded conditional permission syntax so that + { argc, envc, argv[] , envp[] } parameters can be checked if needed. + This will allow administrator permit execution of /bin/sh only when + /bin/sh is invoked in the form of "/bin/sh -c" and environment variable + HOME is set by specifying + + allow_execute /bin/sh if exec.argv[1]="-c" exec.envp["HOME"]!=NULL + + in the policy. + This extension will make exploit codes difficult to start /bin/sh because + they unlikely set up environment variables and unlikely specify "-c" + option when invoking /bin/sh , whereas proper functions likely set up + environment variables and likely specify "-c" option. + +Fix 2008/02/18 + + @ Add process state checking. + + Until now, it was impossible to change ACL without executing program. + I added three variables for performing stateful checking within a domain. + You can set current process's state like: + + allow_network TCP accept @TRUSTED_HOSTS 1024-65535 ; set task.state[0]=1 + allow_network TCP accept @UNTRUSTED_HOSTS 1024-65535 ; set task.state[0]=0 + + and you can use the state like + + allow_read /path/to/important/file if task.state[0]=1 + + in the policy. + The state changes when the request was granted by the MAC's policy, + so please be careful with situations where the state has changed + successfully but the request was not processed because of other reasons + (e.g. out of memory). + +Fix 2008/02/26 + + @ Support /proc/ccs/ access by non-root user. + + Until now, only root user can access /proc/ccs/ interface. + But to permit /proc/ccs/ access by non-root user so that it won't require + ssh login by root user when administrating from remote host, + I made "(current->uid == 0 && current->euid == 0)" requirement optional. + If this requirement is disabled, only "conventional DAC permission + checks" and "/proc/ccs/manager checks" are used. + +Fix 2008/02/29 + + @ Add sleep_on_violation feature. + + Some exploit codes (e.g. trans2open for Samba) continue running + until it achieves the purpose of the exploit code (e.g. invoke /bin/sh). + + If such code is injected due to buffer overflow but the kernel + rejects the request, it triggers infinite "Permission denied" loop. + As a result, the CPU usage becomes 100% and gives bad effects to + the rest of processes. + This is a side effect of rejecting the request from the exploit code + which wouldn't happen if the request from the exploit code was granted. + + To avoid such CPU consumption, I added a penalty that forcibly + sleeps for specified period when a request is rejected. + + This penalty doesn't work if the exploit code does nothing but + continue running, but I think most exploit code's purpose is + to start some program rather than to slow down the target system. + + @ Add alt_exec feature. + + Since TOMOYO Linux's approach is "know all essential requests in advance + and create policy that permits only them", you can regard anomalous + requests as attacks (if you want to do so). + + Common MAC implementations merely reject requests that violate policy. + But I added a special handler for execve() to TOMOYO Linux. + + This handler is triggered when a process requested to execute a program + but the request was rejected by the policy. + This handler executes a program specified by the administrator + instead of a program requested by the process. + + Most attackers attempt to execute /bin/sh to start something malicious. + Attackers execute an exploit code using buffer overflow vulnerability + to steal control of a process. But this handler can get back control + if an exploit code requests execve() that is not permitted by policy. + + By default, this handler does nothing (i.e. merely reject execve() + request). You can specify any program to start what you want to do. + + You can redirect attackers to somewhere else (e.g. honey pot). + This makes it possible to act your Linux box as an on-demand honey pot + while keeping regular services for your usage. + + You can collect information of the attacker (e.g. IP address) and + update firewall configuration. + + You can silently terminate a process who requested execve() + that is not permitted by policy. + +Fix 2008/03/03 + + @ Add "force_alt_exec" keyword. + + To be able to fully utilize "alt_exec" feature, + I added "force_alt_exec" keyword so that + all execute requests are replaced by the execute request of a program + specified by alt_exec feature. + + If this keyword is specified for a domain, the domain no longer + executes any programs regardless of the mode of file access control + (i.e. the domain won't execute even if MAC_FOR_FILE=0 ). + Instead, the domain executes the program specified by alt_exec feature + and the program specified by alt_exec feature validates the execute + request and executes it if it is appropriate to execute. + + If you can tolerate that there is no chance to return an error code + to the caller to tell the execute request was rejected, + this is more flexible approach than in-kernel execve() parameter + checking because we can do argv[] and envp[] checking easily. + +Fix 2008/03/04 + + @ Use string for access control mode. + + An integer expression for access control mode sometimes confuses + administrators because profile number is also an integer expression. + To avoid confusion between profile number and access control mode, + I introduced a string expression for access control mode. + + Modes which take an integer between 0 and 3. + + 0 -> disabled + 1 -> learning + 2 -> permissive + 3 -> enforcing + + Modes which take 0 or 1. + + 0 -> disabled + 1 -> enabled + +Fix 2008/03/10 + + @ Rename "force_alt_exec" keyword to "execute_handler". + + To be able to use different programs for validating execve() parameters, + I moved the location to specify the program's pathname from profile + to domain policy. + + The "execute_handler" keyword takes one pathname which is + invoked whenever execve() request is issued. Thus, any "allow_execute" + keywords in a domain with "execute_handler" are ignored. + This keyword is designed for validating expected/desirable execve() + requests in userspace, although there is no way to tell the caller + that the execve() request was rejected. + + @ Rename "alt_exec" keyword to "denied_execute_handler". + + The "denied_execute_handler" keyword takes one pathname which is + invoked only when execve() request was rejected. In other words, + this program is invoked only when the following conditions are met. + + (1) None of "allow_execute" keywords in the domain matched. + (2) The execve() request was rejected in enforcing mode. + (3) "execute_handler" keyword is not used by the domain. + + This keyword is designed for handling unexpected/undesirable execve() + requests, to redirect the process issuing such requests to somewhere. + +Fix 2008/03/18 + + @ Fix wrong/redundant locks in pre-vfs functions. + + lock_kernel()/unlock_kernel() in pre_vfs_rename() were redundant for + 2.6 kernels. + + Locking order in pre_vfs_link() and pre_vfs_unlink() for 2.4 kernels + after 2.4.33 were different from before 2.4.32 . + +Fix 2008/03/28 + + @ Disable execute handler loop. + + To be able to use "execute_handler" in a "keep_domain" domain, + ignore "execute_handler" and "denied_execute_handler" keywords + if the current process is executing programs specified by + "execute_handler" or "denied_execute_handler" keyword. + + This exception is needed to avoid infinite execute handler loop. + If a domain has both "keep_domain" and "execute_handler", + any execute request by that domain is handled by an execute handler, + and the execute handler attempts to process original execute request. + But the original execute request is handled by the same execute handler + unless the execute handler ignores "execute_handler". + + @ Update coding style. + + I rewrote the code to pass scripts/checkpatch.pl as much as possible. + Function names were changed to use only lower letters. + +Version 1.6.0 2008/04/01 Feature enhancement release. + +Fix 2008/04/14 + + @ Fix "Compilation failures" and "Initialization ordering bugs" + with kernels before 2.4.30/2.6.11 . + + 2.6 kernels before 2.6.9 didn't have include/linux/hardirq.h , + resulting compilation error at #include . + I added #elif condition. + + CentOS 4.6's 2.6.9 kernel calls do_execve() before initialization of + ccs_alloc(), resulting NULL pointer dereference. + I changed __initcall to core_initcall. + + CentOS 4.6's 2.6.9 kernel backported kzalloc() from 2.6.14 , + resulting compilation error at kzalloc(). + I modified prototype of kzalloc(). + +Fix 2008/04/20 + + @ Fix "Compilation failures" with kernels before 2.4.30/2.6.11 . + + Turbolinux 10 Server's 2.6.8 kernel backported kzalloc() as an inlined + function, resulting compilation error at kzalloc(). + I converted kzalloc() from an inlined function into a macro. + +Fix 2008/04/21 + + @ Add workaround for gcc 3.2.2's inline bug. + + RedHat Linux 9's gcc 3.2.2 generated a bad code + if ((var_of_u8 & 0x000000BF) & 0x80000000) { } + where the expected code is + if ((var_of_u8 & 0xBF) & 0x80) { } + when embedding ccs_acl_type2() into print_entry(), + resulting runtime BUG(). + I added the expected code explicitly as a workaround. + +Fix 2008/05/06 + + @ Add memory quota. + + 1.5.x returns -ENOMEM when FindNextDomain() failed to create a new + domain, but I forgot to return -ENOMEM when find_next_domain() failed to + create a new domain. + + A domain is automatically created by find_next_domain() only if + the domain for the requested program doesn't exist. + This behavior is for the administrator's convenience. + The administrator needn't to know how many domains are needed for running + the whole programs in the system beforehand when developing the policy. + But the administrator does not want the kernel to reject execution of the + requested program when developing the policy. + + So, I think it is better to grant execution of programs even if + find_next_domain() failed to create a new domain than reject execution. + Thus, I decided not to return -ENOMEM when find_next_domain() failed to + create a new domain. This exception breaks the domain transition rules, + so I print "transition_failed" warning in /proc/ccs/domain_policy + when this exception happened. + + Also, to prevent the system from being halted by unexpectedly allocating + all kernel memory for the policy, I added memory quota. + This quota is configurable via /proc/ccs/meminfo like + + echo Shared: 1048576 > /proc/ccs/meminfo + echo Private: 1048576 > /proc/ccs/meminfo + +Version 1.6.1 2008/05/10 Bug fix release. + +Fix 2008/06/04 + + @ Check open mode of /proc/ccs/ interface. + + It turned out that I can avoid allocating memory for reading if + FMODE_READ is not set and memory for writing if FMODE_WRITE is not set. + + @ Wait for completion of /sbin/ccs-init . + + Since 2.4 kernel's call_usermodehelper() can't wait for termination of + the executed program, I was using the close() request of + /proc/ccs/meminfo to indicate that loading policy has finished. + But since /proc/ccs/meminfo could be accessed for setting memory quota + by /etc/ccs/ccs-post-init , I stopped using the close() request. + The policy loader no longer need to access /proc/ccs/meminfo to notify + the kernel that loading policy has finished. + +Fix 2008/06/05 + + @ Fix realpath for pipes and sockets. + + Kernel 2.6.22 and later use different method for calculating d_path(). + Since fs/realpath.c didn't notice the change, the realpath of pipes + appeared as "pipe:" rather than "pipe:[\$]" when they are opened via + /proc/PID/fd/ directory. + + @ Add process's information into /proc/ccs/query . + + While /proc/ccs/grant_log and /proc/ccs/reject_log contain process's + information, /proc/ccs/query doesn't contain it. + To be able to utilize ccs-queryd and ccs-notifyd more, I added it into + /proc/ccs/query . + +Fix 2008/06/10 + + @ Allow using patterns for globally readable files. + + To allow users specify locale specific files to globally readable files, + I relaxed checking in update_globally_readable_entry(). + +Fix 2008/06/11 + + @ Remove ALLOW_ENFORCE_GRACE parameter. + + Since unexpected requests caused by doing software updates can happen + in all profiles, users likely have to write ALLOW_ENFORCE_GRACE=enabled + to all profiles. And it makes meaningless to allow users to selectively + enable specific profile's ALLOW_ENFORCE_GRACE parameter. + So, I removed ALLOW_ENFORCE_GRACE parameter. + Now, the system behaves as if ALLOW_ENFORCE_GRACE=enabled is specified. + The behavior of "delayed enforcing" mode is defined in the following + order. + + (1) The requests are rejected immediately if nobody is opening + /proc/ccs/query interface. + (2) The requests will be rejected in 10 seconds if somebody other than + ccs-queryd (such as less(1)) is opening /proc/ccs/query interface, + for such process doesn't write dummy decisions. + +Fix 2008/06/22 + + @ Pass escaped pathname to audit_execute_handler_log(). + + I was passing unescaped pathname to audit_execute_handler_log() + which causes /proc/ccs/grant_log contain whitespace characters + if execute handler's pathname contains whitespace characters. + +Fix 2008/06/25 + + @ Return 0 when ccs_may_umount() succeeds. + + I forgot to clear error value in ccs_may_umount() when the requested + directory didn't match "deny_unmount" keyword. As a result, any umount() + request with RESTRICT_UNMOUNT=enforcing returned -EPERM error. + +Version 1.6.2 2008/06/25 Usability enhancement release. + +Fix 2008/07/01 + + @ Fix "Compilation failure" with 2.4.20 kernel. + + RedHat Linux 9's 2.4.20 kernel backported O(1) scheduler patch, + resulting compilation error at ccs_load_policy(). + I added defined(TASK_DEAD) check. + +Fix 2008/07/08 + + @ Don't check permissions if vfsmount is NULL. + + Some filesystems (e.g. unionfs) pass NULL vfsmount. + I changed fs/tomoyo_file.c not to try to calculate pathnames + if vfsmount is NULL. + +Version 1.6.3 2008/07/15 Bug fix release. + +Fix 2008/08/21 + + @ Add workaround for gcc 4.3's bug. + + In some environments, fs/tomoyo_network.c could not be compiled + because of gcc 4.3's bug. + I modified save_ipv6_address() to use "integer literal" value + instead for "static const u8" variable. + + @ Change prototypes of some functions. + + To support 2.6.27 kernels, I replaced "struct nameidata" with + "struct path" for some functions. + + @ Detect distributor specific patches automatically. + + Since kernels with AppArmor patch applied is increasing, + I introduced a mechanism which determines whether specific patches + are applied or not, based on "#define" directives in the patches. + +Fix 2008/08/29 + + @ Remove "-ccs" suffix from Makefile's EXTRAVERSION. + + To reduce conflicts on Makefile's EXTRAVERSION, + I removed "-ccs" suffix from ccs-patch-2.\*.diff . + Those who build kernels without using specs/build-\*.sh , + please edit EXTRAVERSION tag manually so that original kernels + will not be overwritten by TOMOYO Linux kernels. + +Version 1.6.4 2008/09/03 Minor update release. + +Fix 2008/09/09 + + @ Add "try again" response to "delayed enforcing" mode. + + To be able to handle pathname changes caused by software updates, + "delayed enforcing" mode was introduced. It allows administrator to + grant access requests which are about to be rejected by the kernel. + + To be able to handle pathname changes caused by software updates better, + I introduced "try again" response. As "delayed enforcing" mode sleeps + a process which violated policy, administrator can update policy while + the process is sleeping. This "try again" response allows administrator + to restart policy checks from the beginning after updating policy. + +Fix 2008/09/11 + + @ Remember whether the process is allowed to write to /proc/ccs/ interface. + + Since programs for manipulating policy (e.g. ccs-queryd ) are installed + in the form of RPM/DEB packages, these programs lose the original + pathnames when they are updated by the package manager. The package + manager renames these programs before deleting these programs so that + the package manager can rollback the operation. + This causes a problem when the programs are listed into /proc/ccs/manager + using pathnames, as the programs will no longer be allowed to write to + /proc/ccs/ interface while the process of old version of the program is + alive. + + To solve this problem, I modified to remember the fact that the process + is once allowed to write to /proc/ccs/ interface until the process + attempts to execute a different program. + This change makes it impossible to revoke permission to write to + /proc/ccs/ interface without killing the process, but it will be better + than nonfunctioning ccs-queryd program. + +Fix 2008/09/19 + + @ Allow selecting a domain by PID. + + Sometimes we want to know what ACLs are given to specific PID, but + finding a domainname for that PID from /proc/ccs/.process_status and + reading ACLs from /proc/ccs/domain_policy by the domainname is very slow. + Thus, I modified /proc/ccs/domain_policy to allow selecting a domain by + PID. For example, to read domain ACL of current process from bash, + run as follows. + + # exec 100<>/proc/ccs/domain_policy + # echo select pid=$$ >&100 + # while read -u 100; do echo $REPLY; done + + If a domain is once selected by PID, reading /proc/ccs/domain_policy will + print only that domain if that PID exists or print nothing otherwise. + + @ Disallow concurrent /proc/ccs/ access using the same file descriptor. + + Until now, one process can read() from /proc/ccs/ while other process + that shares the file descriptor can write() to /proc/ccs/ . + But to implement "Allow selecting a domain by PID" feature, I disabled + concurrent read()/write() because the feature need to modify read buffer + while writing. + +Fix 2008/10/01 + + @ Add retry counter into /proc/ccs/query . + + To be able to handle some of queries from /proc/ccs/query without user's + interaction, I added retry counter for avoiding infinite loop caused by + "try again" response. + +Fix 2008/10/07 + + @ Don't transit to new domain until do_execve() succeeds. + + Until now, a process's domain was updated to new domain which the process + will belongs to before do_execve() succeeds so that the kernel can do + permission checks for interpreters and environment variables based on + new domain. But this caused a subtle problem when other process sends + signals to the process, for the process returns to old domain if + do_execve() failed. + + So, I modified to pass new domain to functions so that I can avoid + modifying a process's domain before do_execve() succeeds. + + @ Use old task state for audit logs. + + Until now, audit logs were generated using the task state after + processing "; set task.state" part. But to generate accurate logs, + I modified to save the task state before processing "; set task.state" + part and use the saved state for audit logs. + + @ Use a structure for passing parameters. + + As the number of parameters is increasing, I modified to use a structure + for passing parameters. + +Fix 2008/10/11 + + @ Remove domain_acl_lock mutex. + + I noticed that I don't need to keep all functions that modify an ACL of + a domain mutually exclusive. Since each functions handles different type + of ACL, locking is needed only when they append an ACL to a domain. + So, I modified to use local locks. + +Fix 2008/10/14 + + @ Fix ccs_check_condition() bug. + + Due to a bug in ccs_check_condition(), it was impossible to use + task.state[0] task.state[1] task.state[2] inside condition part + if the ACL does not treat a pathname. For example, an ACL like + + allow_network TCP connect @HTTP_SERVERS 80 if task.state[0]=100 + + didn't work. + +Fix 2008/10/15 + + @ Show process information in /proc/ccs/.process_status . + + To be able to determine a process's type, I added a command "info PID" + which returns process information of the specified PID in + "PID manager=\* execute_handler=\* state[0]=\$ state[1]=\$ state[2]=\$" + format. + +Fix 2008/10/20 + + @ Use rcu_dereference() when walking the list. + + I was using "dependency ordering" for appending an element to a list + without asking the reader to take a lock. But "dependency ordering" + is not respected by DEC Alpha or by some aggressive value-speculation + compiler optimizations. + + On such environment, use of "dependency ordering" can lead to system + crash because the reader might read uninitialized value of newly + appended element. + + To prevent the reader from reading uninitialized value of newly appended + element, I inserted rcu_dereference() when walking the list. + +Fix 2008/11/04 + + @ Use sys_getpid() instead for current->pid. + + Kernel 2.6.24 introduced PID namespace. + + To compare PID given from userland, I can't use current->pid. + So, I modified to use sys_getpid() instead for current->pid. + + I modified to use task_tgid_nr_ns() for 2.6.25 and later instead for + current->tgid when checking /proc/self/ in get_absolute_path().