541 |
static void ccs_read_manager_policy(struct ccs_io_buffer *head) |
static void ccs_read_manager_policy(struct ccs_io_buffer *head) |
542 |
{ |
{ |
543 |
struct list_head *pos; |
struct list_head *pos; |
|
ccs_assert_read_lock(); |
|
544 |
if (head->read_eof) |
if (head->read_eof) |
545 |
return; |
return; |
546 |
list_for_each_cookie(pos, head->read_var2, &ccs_policy_manager_list) { |
list_for_each_cookie(pos, head->read_var2, &ccs_policy_manager_list) { |
570 |
const struct ccs_path_info *domainname |
const struct ccs_path_info *domainname |
571 |
= ccs_current_domain()->domainname; |
= ccs_current_domain()->domainname; |
572 |
bool found = false; |
bool found = false; |
|
ccs_assert_read_lock(); |
|
573 |
if (!ccs_policy_loaded) |
if (!ccs_policy_loaded) |
574 |
return true; |
return true; |
575 |
if (task->ccs_flags & CCS_TASK_IS_POLICY_MANAGER) |
if (task->ccs_flags & CCS_TASK_IS_POLICY_MANAGER) |
650 |
{ |
{ |
651 |
unsigned int pid; |
unsigned int pid; |
652 |
struct ccs_domain_info *domain = NULL; |
struct ccs_domain_info *domain = NULL; |
|
ccs_assert_read_lock(); |
|
653 |
if (!strcmp(data, "allow_execute")) { |
if (!strcmp(data, "allow_execute")) { |
654 |
head->read_execute_only = true; |
head->read_execute_only = true; |
655 |
return true; |
return true; |
1543 |
{ |
{ |
1544 |
struct list_head *dpos; |
struct list_head *dpos; |
1545 |
struct list_head *apos; |
struct list_head *apos; |
|
ccs_assert_read_lock(); |
|
1546 |
if (head->read_eof) |
if (head->read_eof) |
1547 |
return; |
return; |
1548 |
if (head->read_step == 0) |
if (head->read_step == 0) |
1619 |
char *cp = strchr(data, ' '); |
char *cp = strchr(data, ' '); |
1620 |
struct ccs_domain_info *domain; |
struct ccs_domain_info *domain; |
1621 |
unsigned int profile; |
unsigned int profile; |
|
ccs_assert_read_lock(); |
|
1622 |
if (!cp) |
if (!cp) |
1623 |
return -EINVAL; |
return -EINVAL; |
1624 |
*cp = '\0'; |
*cp = '\0'; |
1648 |
static void ccs_read_domain_profile(struct ccs_io_buffer *head) |
static void ccs_read_domain_profile(struct ccs_io_buffer *head) |
1649 |
{ |
{ |
1650 |
struct list_head *pos; |
struct list_head *pos; |
|
ccs_assert_read_lock(); |
|
1651 |
if (head->read_eof) |
if (head->read_eof) |
1652 |
return; |
return; |
1653 |
list_for_each_cookie(pos, head->read_var1, &ccs_domain_list) { |
list_for_each_cookie(pos, head->read_var1, &ccs_domain_list) { |
1694 |
struct task_struct *p; |
struct task_struct *p; |
1695 |
struct ccs_domain_info *domain = NULL; |
struct ccs_domain_info *domain = NULL; |
1696 |
u32 ccs_flags = 0; |
u32 ccs_flags = 0; |
|
ccs_assert_read_lock(); |
|
1697 |
/* Accessing write_buf is safe because head->io_sem is held. */ |
/* Accessing write_buf is safe because head->io_sem is held. */ |
1698 |
if (!buf) |
if (!buf) |
1699 |
return; /* Do nothing if open(O_RDONLY). */ |
return; /* Do nothing if open(O_RDONLY). */ |
1778 |
*/ |
*/ |
1779 |
static void ccs_read_exception_policy(struct ccs_io_buffer *head) |
static void ccs_read_exception_policy(struct ccs_io_buffer *head) |
1780 |
{ |
{ |
|
ccs_assert_read_lock(); |
|
1781 |
if (head->read_eof) |
if (head->read_eof) |
1782 |
return; |
return; |
1783 |
switch (head->read_step) { |
switch (head->read_step) { |