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>
....@@ -39,15 +33,6 @@
3933 #if defined(__APCS_26__)
4034 #error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32
4135 #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.
50
-#endif
5136
5237 int main(void)
5338 {
....@@ -58,7 +43,6 @@
5843 BLANK();
5944 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
6045 DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
61
- DEFINE(TI_PREEMPT_LAZY, offsetof(struct thread_info, preempt_lazy_count));
6246 DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit));
6347 DEFINE(TI_TASK, offsetof(struct thread_info, task));
6448 DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
....@@ -82,6 +66,10 @@
8266 #ifdef CONFIG_CRUNCH
8367 DEFINE(TI_CRUNCH_STATE, offsetof(struct thread_info, crunchstate));
8468 #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);
8573 BLANK();
8674 DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0));
8775 DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1));
....@@ -170,14 +158,6 @@
170158 BLANK();
171159 DEFINE(CACHE_WRITEBACK_ORDER, __CACHE_WRITEBACK_ORDER);
172160 DEFINE(CACHE_WRITEBACK_GRANULE, __CACHE_WRITEBACK_GRANULE);
173
- BLANK();
174
-#ifdef CONFIG_KVM_ARM_HOST
175
- DEFINE(VCPU_GUEST_CTXT, offsetof(struct kvm_vcpu, arch.ctxt));
176
- DEFINE(VCPU_HOST_CTXT, offsetof(struct kvm_vcpu, arch.host_cpu_context));
177
- DEFINE(CPU_CTXT_VFP, offsetof(struct kvm_cpu_context, vfp));
178
- DEFINE(CPU_CTXT_GP_REGS, offsetof(struct kvm_cpu_context, gp_regs));
179
- DEFINE(GP_REGS_USR, offsetof(struct kvm_regs, usr_regs));
180
-#endif
181161 BLANK();
182162 #ifdef CONFIG_VDSO
183163 DEFINE(VDSO_DATA_SIZE, sizeof(union vdso_data_store));