vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page
[linux-2.6/btrfs-unstable.git] / include / linux / kcore.h
blob80db19d3a5054d5c064727644af49fdf31310111
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * /proc/kcore definitions
4 */
5 #ifndef _LINUX_KCORE_H
6 #define _LINUX_KCORE_H
8 enum kcore_type {
9 KCORE_TEXT,
10 KCORE_VMALLOC,
11 KCORE_RAM,
12 KCORE_VMEMMAP,
13 KCORE_USER,
14 KCORE_OTHER,
17 struct kcore_list {
18 struct list_head list;
19 unsigned long addr;
20 size_t size;
21 int type;
24 struct vmcore {
25 struct list_head list;
26 unsigned long long paddr;
27 unsigned long long size;
28 loff_t offset;
31 #ifdef CONFIG_PROC_KCORE
32 extern void kclist_add(struct kcore_list *, void *, size_t, int type);
33 #else
34 static inline
35 void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
38 #endif
40 #endif /* _LINUX_KCORE_H */