15 #include <linux/sched.h>
20 #define kenter(FMT, ...) \
21 printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
22 #define kleave(FMT, ...) \
23 printk(KERN_DEBUG "<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
24 #define kdebug(FMT, ...) \
25 printk(KERN_DEBUG " "FMT"\n", ##__VA_ARGS__)
27 #define kenter(FMT, ...) \
28 no_printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
29 #define kleave(FMT, ...) \
30 no_printk(KERN_DEBUG "<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
31 #define kdebug(FMT, ...) \
32 no_printk(KERN_DEBUG FMT"\n", ##__VA_ARGS__)
76 #define KEYQUOTA_LINK_BYTES 4
90 const struct key_type *
type,
92 unsigned long *_prealloc);
95 unsigned long *_prealloc);
97 struct key_type *
type,
98 unsigned long prealloc);
101 const struct key_type *
type,
112 struct key_type *
type,
115 bool no_state_check);
136 const void *callout_info,
139 struct key *dest_keyring,
140 unsigned long flags);
145 #define KEY_LOOKUP_CREATE 0x01
146 #define KEY_LOOKUP_PARTIAL 0x02
147 #define KEY_LOOKUP_FOR_UNLINK 0x04
166 static inline int key_permission(
const key_ref_t key_ref, key_perm_t
perm)
172 #define KEY_VIEW 0x01
173 #define KEY_READ 0x02
174 #define KEY_WRITE 0x04
175 #define KEY_SEARCH 0x08
176 #define KEY_LINK 0x10
177 #define KEY_SETATTR 0x20
194 const void *callout_info,
196 struct key *dest_keyring);
206 key->flags & ((1 << KEY_FLAG_DEAD) |
207 (1 << KEY_FLAG_INVALIDATED)) ||
208 (key->expiry > 0 && key->expiry <= limit);
223 const char __user *, key_serial_t);
228 size_t, key_serial_t);
238 const struct iovec __user *,
239 unsigned, key_serial_t);
243 const struct iovec *,
244 unsigned,
size_t, key_serial_t);
250 extern void __key_check(
const struct key *);
252 static inline void key_check(
const struct key *key)
254 if (key && (IS_ERR(key) || key->magic != KEY_DEBUG_MAGIC))
260 #define key_check(key) do {} while(0)