diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/capability.h | 7 | ||||
| -rw-r--r-- | include/linux/flex_array.h | 2 | ||||
| -rw-r--r-- | include/linux/kernel.h | 3 | ||||
| -rw-r--r-- | include/linux/security.h | 3 | ||||
| -rw-r--r-- | include/linux/tpm.h | 4 | ||||
| -rw-r--r-- | include/linux/tpm_command.h | 28 | ||||
| -rw-r--r-- | include/linux/xattr.h | 4 |
7 files changed, 46 insertions, 5 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 90012b9ddbf3..fb16a3699b99 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -246,7 +246,6 @@ struct cpu_vfs_cap_data { | |||
| 246 | /* Allow configuration of the secure attention key */ | 246 | /* Allow configuration of the secure attention key */ |
| 247 | /* Allow administration of the random device */ | 247 | /* Allow administration of the random device */ |
| 248 | /* Allow examination and configuration of disk quotas */ | 248 | /* Allow examination and configuration of disk quotas */ |
| 249 | /* Allow configuring the kernel's syslog (printk behaviour) */ | ||
| 250 | /* Allow setting the domainname */ | 249 | /* Allow setting the domainname */ |
| 251 | /* Allow setting the hostname */ | 250 | /* Allow setting the hostname */ |
| 252 | /* Allow calling bdflush() */ | 251 | /* Allow calling bdflush() */ |
| @@ -352,7 +351,11 @@ struct cpu_vfs_cap_data { | |||
| 352 | 351 | ||
| 353 | #define CAP_MAC_ADMIN 33 | 352 | #define CAP_MAC_ADMIN 33 |
| 354 | 353 | ||
| 355 | #define CAP_LAST_CAP CAP_MAC_ADMIN | 354 | /* Allow configuring the kernel's syslog (printk behaviour) */ |
| 355 | |||
| 356 | #define CAP_SYSLOG 34 | ||
| 357 | |||
| 358 | #define CAP_LAST_CAP CAP_SYSLOG | ||
| 356 | 359 | ||
| 357 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 360 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
| 358 | 361 | ||
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 631b77f2ac70..70e4efabe0fb 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
| @@ -71,7 +71,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr); | |||
| 71 | int flex_array_shrink(struct flex_array *fa); | 71 | int flex_array_shrink(struct flex_array *fa); |
| 72 | 72 | ||
| 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ | 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ |
| 74 | flex_array_put(fa, nr, &(void *)(src), gfp) | 74 | flex_array_put(fa, nr, (void *)&(src), gfp) |
| 75 | 75 | ||
| 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); | 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); |
| 77 | 77 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b6de9a6f7018..d0fbc043de60 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -56,6 +56,8 @@ | |||
| 56 | 56 | ||
| 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
| 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
| 59 | |||
| 60 | /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ | ||
| 59 | #define roundup(x, y) ( \ | 61 | #define roundup(x, y) ( \ |
| 60 | { \ | 62 | { \ |
| 61 | const typeof(y) __y = y; \ | 63 | const typeof(y) __y = y; \ |
| @@ -263,6 +265,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 263 | } | 265 | } |
| 264 | 266 | ||
| 265 | extern int hex_to_bin(char ch); | 267 | extern int hex_to_bin(char ch); |
| 268 | extern void hex2bin(u8 *dst, const char *src, size_t count); | ||
| 266 | 269 | ||
| 267 | /* | 270 | /* |
| 268 | * General tracing related utility functions - trace_printk(), | 271 | * General tracing related utility functions - trace_printk(), |
diff --git a/include/linux/security.h b/include/linux/security.h index 1ac42475ea08..c642bb8b8f5a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1058,8 +1058,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1058 | * @cred points to the credentials to provide the context against which to | 1058 | * @cred points to the credentials to provide the context against which to |
| 1059 | * evaluate the security data on the key. | 1059 | * evaluate the security data on the key. |
| 1060 | * @perm describes the combination of permissions required of this key. | 1060 | * @perm describes the combination of permissions required of this key. |
| 1061 | * Return 1 if permission granted, 0 if permission denied and -ve it the | 1061 | * Return 0 if permission is granted, -ve error otherwise. |
| 1062 | * normal permissions model should be effected. | ||
| 1063 | * @key_getsecurity: | 1062 | * @key_getsecurity: |
| 1064 | * Get a textual representation of the security context attached to a key | 1063 | * Get a textual representation of the security context attached to a key |
| 1065 | * for the purposes of honouring KEYCTL_GETSECURITY. This function | 1064 | * for the purposes of honouring KEYCTL_GETSECURITY. This function |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index ac5d1c1285d9..fdc718abf83b 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); |
| 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); |
| 34 | extern int tpm_send(u32 chip_num, void *cmd, size_t buflen); | ||
| 34 | #else | 35 | #else |
| 35 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | 36 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { |
| 36 | return -ENODEV; | 37 | return -ENODEV; |
| @@ -38,5 +39,8 @@ static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | |||
| 38 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { | 39 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { |
| 39 | return -ENODEV; | 40 | return -ENODEV; |
| 40 | } | 41 | } |
| 42 | static inline int tpm_send(u32 chip_num, void *cmd, size_t buflen) { | ||
| 43 | return -ENODEV; | ||
| 44 | } | ||
| 41 | #endif | 45 | #endif |
| 42 | #endif | 46 | #endif |
diff --git a/include/linux/tpm_command.h b/include/linux/tpm_command.h new file mode 100644 index 000000000000..727512e249b5 --- /dev/null +++ b/include/linux/tpm_command.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #ifndef __LINUX_TPM_COMMAND_H__ | ||
| 2 | #define __LINUX_TPM_COMMAND_H__ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * TPM Command constants from specifications at | ||
| 6 | * http://www.trustedcomputinggroup.org | ||
| 7 | */ | ||
| 8 | |||
| 9 | /* Command TAGS */ | ||
| 10 | #define TPM_TAG_RQU_COMMAND 193 | ||
| 11 | #define TPM_TAG_RQU_AUTH1_COMMAND 194 | ||
| 12 | #define TPM_TAG_RQU_AUTH2_COMMAND 195 | ||
| 13 | #define TPM_TAG_RSP_COMMAND 196 | ||
| 14 | #define TPM_TAG_RSP_AUTH1_COMMAND 197 | ||
| 15 | #define TPM_TAG_RSP_AUTH2_COMMAND 198 | ||
| 16 | |||
| 17 | /* Command Ordinals */ | ||
| 18 | #define TPM_ORD_GETRANDOM 70 | ||
| 19 | #define TPM_ORD_OSAP 11 | ||
| 20 | #define TPM_ORD_OIAP 10 | ||
| 21 | #define TPM_ORD_SEAL 23 | ||
| 22 | #define TPM_ORD_UNSEAL 24 | ||
| 23 | |||
| 24 | /* Other constants */ | ||
| 25 | #define SRKHANDLE 0x40000000 | ||
| 26 | #define TPM_NONCE_SIZE 20 | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index f1e5bde4b35a..e6131ef98d8f 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
| @@ -40,9 +40,13 @@ | |||
| 40 | #define XATTR_SMACK_SUFFIX "SMACK64" | 40 | #define XATTR_SMACK_SUFFIX "SMACK64" |
| 41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" | 41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" |
| 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" | 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" |
| 43 | #define XATTR_SMACK_EXEC "SMACK64EXEC" | ||
| 44 | #define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE" | ||
| 43 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX | 45 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX |
| 44 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN | 46 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN |
| 45 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT | 47 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT |
| 48 | #define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC | ||
| 49 | #define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE | ||
| 46 | 50 | ||
| 47 | #define XATTR_CAPS_SUFFIX "capability" | 51 | #define XATTR_CAPS_SUFFIX "capability" |
| 48 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 52 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
