diff options
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 08fb02477641..4c52907a6d8b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -469,6 +469,7 @@ extern enum system_states { | |||
| 469 | #define TAINT_CRAP 10 | 469 | #define TAINT_CRAP 10 |
| 470 | #define TAINT_FIRMWARE_WORKAROUND 11 | 470 | #define TAINT_FIRMWARE_WORKAROUND 11 |
| 471 | #define TAINT_OOT_MODULE 12 | 471 | #define TAINT_OOT_MODULE 12 |
| 472 | #define TAINT_UNSIGNED_MODULE 13 | ||
| 472 | 473 | ||
| 473 | extern const char hex_asc[]; | 474 | extern const char hex_asc[]; |
| 474 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | 475 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] |
| @@ -841,4 +842,12 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 841 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD | 842 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD |
| 842 | #endif | 843 | #endif |
| 843 | 844 | ||
| 845 | /* Permissions on a sysfs file: you didn't miss the 0 prefix did you? */ | ||
| 846 | #define VERIFY_OCTAL_PERMISSIONS(perms) \ | ||
| 847 | (BUILD_BUG_ON_ZERO((perms) < 0) + \ | ||
| 848 | BUILD_BUG_ON_ZERO((perms) > 0777) + \ | ||
| 849 | /* User perms >= group perms >= other perms */ \ | ||
| 850 | BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \ | ||
| 851 | BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \ | ||
| 852 | (perms)) | ||
| 844 | #endif | 853 | #endif |
