hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/kernel/asm-offsets.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 1995-2003 Russell King
34 * 2001-2002 Keith Owens
....@@ -5,18 +6,11 @@
56 * Generate definitions needed by assembly language modules.
67 * This code generates raw asm output which is post-processed to extract
78 * and format the required data.
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
129 */
1310 #include <linux/compiler.h>
1411 #include <linux/sched.h>
1512 #include <linux/mm.h>
1613 #include <linux/dma-mapping.h>
17
-#ifdef CONFIG_KVM_ARM_HOST
18
-#include <linux/kvm_host.h>
19
-#endif
2014 #include <asm/cacheflush.h>
2115 #include <asm/kexec-internal.h>
2216 #include <asm/glue-df.h>
....@@ -38,15 +32,6 @@
3832 */
3933 #if defined(__APCS_26__)
4034 #error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32
41
-#endif
42
-/*
43
- * GCC 4.8.0-4.8.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
44
- * miscompiles find_get_entry(), and can result in EXT3 and EXT4
45
- * filesystem corruption (possibly other FS too).
46
- */
47
-#if defined(GCC_VERSION) && GCC_VERSION >= 40800 && GCC_VERSION < 40803
48
-#error Your compiler is too buggy; it is known to miscompile kernels
49
-#error and result in filesystem corruption and oopses.
5035 #endif
5136
5237 int main(void)
....@@ -81,6 +66,10 @@
8166 #ifdef CONFIG_CRUNCH
8267 DEFINE(TI_CRUNCH_STATE, offsetof(struct thread_info, crunchstate));
8368 #endif
69
+#ifdef CONFIG_STACKPROTECTOR_PER_TASK
70
+ DEFINE(TI_STACK_CANARY, offsetof(struct thread_info, stack_canary));
71
+#endif
72
+ DEFINE(THREAD_SZ_ORDER, THREAD_SIZE_ORDER);
8473 BLANK();
8574 DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0));
8675 DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1));
....@@ -169,14 +158,6 @@
169158 BLANK();
170159 DEFINE(CACHE_WRITEBACK_ORDER, __CACHE_WRITEBACK_ORDER);
171160 DEFINE(CACHE_WRITEBACK_GRANULE, __CACHE_WRITEBACK_GRANULE);
172
- BLANK();
173
-#ifdef CONFIG_KVM_ARM_HOST
174
- DEFINE(VCPU_GUEST_CTXT, offsetof(struct kvm_vcpu, arch.ctxt));
175
- DEFINE(VCPU_HOST_CTXT, offsetof(struct kvm_vcpu, arch.host_cpu_context));
176
- DEFINE(CPU_CTXT_VFP, offsetof(struct kvm_cpu_context, vfp));
177
- DEFINE(CPU_CTXT_GP_REGS, offsetof(struct kvm_cpu_context, gp_regs));
178
- DEFINE(GP_REGS_USR, offsetof(struct kvm_regs, usr_regs));
179
-#endif
180161 BLANK();
181162 #ifdef CONFIG_VDSO
182163 DEFINE(VDSO_DATA_SIZE, sizeof(union vdso_data_store));