hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/crash_dump.h
....@@ -5,9 +5,10 @@
55 #include <linux/kexec.h>
66 #include <linux/proc_fs.h>
77 #include <linux/elf.h>
8
+#include <linux/pgtable.h>
89 #include <uapi/linux/vmcore.h>
910
10
-#include <asm/pgtable.h> /* for pgprot_t */
11
+#include <linux/pgtable.h> /* for pgprot_t */
1112
1213 #ifdef CONFIG_CRASH_DUMP
1314 #define ELFCORE_ADDR_MAX (-1ULL)
....@@ -26,6 +27,10 @@
2627
2728 extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
2829 unsigned long, int);
30
+extern ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf,
31
+ size_t csize, unsigned long offset,
32
+ int userbuf);
33
+
2934 void vmcore_cleanup(void);
3035
3136 /* Architecture code defines this if there are other possible ELF
....@@ -93,8 +98,6 @@
9398 static inline bool is_kdump_kernel(void) { return 0; }
9499 #endif /* CONFIG_CRASH_DUMP */
95100
96
-extern unsigned long saved_max_pfn;
97
-
98101 /* Device Dump information to be filled by drivers */
99102 struct vmcoredd_data {
100103 char dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Unique name of the dump */
....@@ -111,4 +114,18 @@
111114 return -EOPNOTSUPP;
112115 }
113116 #endif /* CONFIG_PROC_VMCORE_DEVICE_DUMP */
117
+
118
+#ifdef CONFIG_PROC_VMCORE
119
+ssize_t read_from_oldmem(char *buf, size_t count,
120
+ u64 *ppos, int userbuf,
121
+ bool encrypted);
122
+#else
123
+static inline ssize_t read_from_oldmem(char *buf, size_t count,
124
+ u64 *ppos, int userbuf,
125
+ bool encrypted)
126
+{
127
+ return -EOPNOTSUPP;
128
+}
129
+#endif /* CONFIG_PROC_VMCORE */
130
+
114131 #endif /* LINUX_CRASHDUMP_H */