diff options
| author | Mike Marshall <hubcap@omnibond.com> | 2017-02-25 19:12:48 +0300 |
|---|---|---|
| committer | Mike Marshall <hubcap@omnibond.com> | 2017-02-25 19:12:48 +0300 |
| commit | e98bdb3059cbf2b1cd4261e126b08429f64466c3 (patch) | |
| tree | e378fc95b495cc6e0e558f247e99bcaa21a6d567 /include/linux/kernel.h | |
| parent | eb68d0324dc4d88ab0d6159bdcd98c247a3a8954 (diff) | |
| parent | c470abd4fde40ea6a0846a2beab642a578c0b8cd (diff) | |
| download | linux-e98bdb3059cbf2b1cd4261e126b08429f64466c3.tar.xz | |
Merge tag 'v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into for-next
Linux 4.10
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index bc6ed52a39b9..cb09238f6d32 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -45,11 +45,16 @@ #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) +/* @a is a power of 2 value */ #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) #define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) +/* generic data direction definitions */ +#define READ 0 +#define WRITE 1 + #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) #define u64_to_user_ptr(x) ( \ @@ -506,6 +511,15 @@ extern enum system_states { #define TAINT_UNSIGNED_MODULE 13 #define TAINT_SOFTLOCKUP 14 #define TAINT_LIVEPATCH 15 +#define TAINT_FLAGS_COUNT 16 + +struct taint_flag { + char c_true; /* character printed when tainted */ + char c_false; /* character printed when not tainted */ + bool module; /* also show as a per-module taint flag */ +}; + +extern const struct taint_flag taint_flags[TAINT_FLAGS_COUNT]; extern const char hex_asc[]; #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] |
