Changeset 719a208 in mainline for kernel/generic/include/security/perm.h
- Timestamp:
- 2017-05-30T05:59:09Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2460a50
- Parents:
- 456c086
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/security/perm.h
r456c086 r719a208 35 35 /** 36 36 * @file 37 * @brief Capabilities definitions.37 * @brief Task permissions definitions. 38 38 * 39 * Capabilities represent virtual rights that entitle their39 * Permissions represent virtual rights that entitle their 40 40 * holder to perform certain security sensitive tasks. 41 41 * 42 * Each task can have arbitrary combination of the capabilities42 * Each task can have arbitrary combination of the permissions 43 43 * defined in this file. Therefore, they are required to be powers 44 44 * of two. 45 45 */ 46 46 47 #ifndef __ CAP_H__48 #define __ CAP_H__47 #ifndef __PERM_H__ 48 #define __PERM_H__ 49 49 50 50 #include <typedefs.h> 51 51 52 52 /** 53 * CAP_CAP allows its holder to grant/revoke arbitrary54 * privilege to/fromother tasks.53 * PERM_PERM allows its holder to grant/revoke arbitrary permission to/from 54 * other tasks. 55 55 */ 56 #define CAP_CAP(1 << 0)56 #define PERM_PERM (1 << 0) 57 57 58 58 /** 59 * CAP_MEM_MANAGER allows its holder to map physical memory 60 * to other tasks. 59 * PERM_MEM_MANAGER allows its holder to map physical memory to other tasks. 61 60 */ 62 #define CAP_MEM_MANAGER(1 << 1)61 #define PERM_MEM_MANAGER (1 << 1) 63 62 64 63 /** 65 * CAP_IO_MANAGER allows its holder to access I/O space 66 * to other tasks. 64 * PERM_IO_MANAGER allows its holder to access I/O space to other tasks. 67 65 */ 68 #define CAP_IO_MANAGER (1 << 2)66 #define PERM_IO_MANAGER (1 << 2) 69 67 70 68 /** 71 * CAP_IRQ_REG entitles its holder to register IRQ handlers.69 * PERM_IRQ_REG entitles its holder to register IRQ handlers. 72 70 */ 73 #define CAP_IRQ_REG(1 << 3)71 #define PERM_IRQ_REG (1 << 3) 74 72 75 typedef uint32_t cap_t;73 typedef uint32_t perm_t; 76 74 77 75 #ifdef __32_BITS__ 78 76 79 extern sysarg_t sys_ cap_grant(sysarg64_t *, cap_t);80 extern sysarg_t sys_ cap_revoke(sysarg64_t *, cap_t);77 extern sysarg_t sys_perm_grant(sysarg64_t *, perm_t); 78 extern sysarg_t sys_perm_revoke(sysarg64_t *, perm_t); 81 79 82 80 #endif /* __32_BITS__ */ … … 84 82 #ifdef __64_BITS__ 85 83 86 extern sysarg_t sys_ cap_grant(sysarg_t, cap_t);87 extern sysarg_t sys_ cap_revoke(sysarg_t, cap_t);84 extern sysarg_t sys_perm_grant(sysarg_t, perm_t); 85 extern sysarg_t sys_perm_revoke(sysarg_t, perm_t); 88 86 89 87 #endif /* __64_BITS__ */
Note:
See TracChangeset
for help on using the changeset viewer.