Lines Matching refs:perm
258 if (acl->perm & (1 << r->param.path.operation)) { in tomoyo_check_path_acl()
281 return (acl->perm & (1 << r->param.path_number.operation)) && in tomoyo_check_path_number_acl()
302 return (acl->perm & (1 << r->param.path2.operation)) && in tomoyo_check_path2_acl()
322 return (acl->perm & (1 << r->param.mkdev.operation)) && in tomoyo_check_mkdev_acl()
364 ->perm; in tomoyo_merge_path_acl()
365 u16 perm = READ_ONCE(*a_perm); in tomoyo_merge_path_acl() local
366 const u16 b_perm = container_of(b, struct tomoyo_path_acl, head)->perm; in tomoyo_merge_path_acl()
369 perm &= ~b_perm; in tomoyo_merge_path_acl()
371 perm |= b_perm; in tomoyo_merge_path_acl()
372 WRITE_ONCE(*a_perm, perm); in tomoyo_merge_path_acl()
373 return !perm; in tomoyo_merge_path_acl()
386 static int tomoyo_update_path_acl(const u16 perm, in tomoyo_update_path_acl() argument
391 .perm = perm in tomoyo_update_path_acl()
439 head)->perm; in tomoyo_merge_mkdev_acl()
440 u8 perm = READ_ONCE(*a_perm); in tomoyo_merge_mkdev_acl() local
442 ->perm; in tomoyo_merge_mkdev_acl()
445 perm &= ~b_perm; in tomoyo_merge_mkdev_acl()
447 perm |= b_perm; in tomoyo_merge_mkdev_acl()
448 WRITE_ONCE(*a_perm, perm); in tomoyo_merge_mkdev_acl()
449 return !perm; in tomoyo_merge_mkdev_acl()
462 static int tomoyo_update_mkdev_acl(const u8 perm, in tomoyo_update_mkdev_acl() argument
467 .perm = perm in tomoyo_update_mkdev_acl()
519 ->perm; in tomoyo_merge_path2_acl()
520 u8 perm = READ_ONCE(*a_perm); in tomoyo_merge_path2_acl() local
521 const u8 b_perm = container_of(b, struct tomoyo_path2_acl, head)->perm; in tomoyo_merge_path2_acl()
524 perm &= ~b_perm; in tomoyo_merge_path2_acl()
526 perm |= b_perm; in tomoyo_merge_path2_acl()
527 WRITE_ONCE(*a_perm, perm); in tomoyo_merge_path2_acl()
528 return !perm; in tomoyo_merge_path2_acl()
541 static int tomoyo_update_path2_acl(const u8 perm, in tomoyo_update_path2_acl() argument
546 .perm = perm in tomoyo_update_path2_acl()
657 head)->perm; in tomoyo_merge_path_number_acl()
658 u8 perm = READ_ONCE(*a_perm); in tomoyo_merge_path_number_acl() local
660 ->perm; in tomoyo_merge_path_number_acl()
663 perm &= ~b_perm; in tomoyo_merge_path_number_acl()
665 perm |= b_perm; in tomoyo_merge_path_number_acl()
666 WRITE_ONCE(*a_perm, perm); in tomoyo_merge_path_number_acl()
667 return !perm; in tomoyo_merge_path_number_acl()
678 static int tomoyo_update_path_number_acl(const u8 perm, in tomoyo_update_path_number_acl() argument
683 .perm = perm in tomoyo_update_path_number_acl()
1014 u16 perm = 0; in tomoyo_write_file() local
1020 perm |= 1 << type; in tomoyo_write_file()
1021 if (perm) in tomoyo_write_file()
1022 return tomoyo_update_path_acl(perm, param); in tomoyo_write_file()
1026 perm |= 1 << type; in tomoyo_write_file()
1027 if (perm) in tomoyo_write_file()
1028 return tomoyo_update_path2_acl(perm, param); in tomoyo_write_file()
1032 perm |= 1 << type; in tomoyo_write_file()
1033 if (perm) in tomoyo_write_file()
1034 return tomoyo_update_path_number_acl(perm, param); in tomoyo_write_file()
1038 perm |= 1 << type; in tomoyo_write_file()
1039 if (perm) in tomoyo_write_file()
1040 return tomoyo_update_mkdev_acl(perm, param); in tomoyo_write_file()