Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4 #ifdef CONFIG_KASAN
- 5 #define KASAN_STACK_ORDER 1
- 6 #else
- 7 #define KASAN_STACK_ORDER 0
- 8 #endif
- 20 #define IRQ_STACK_ORDER (2 + KASAN_STACK_ORDER)
- 21 #define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER)
- PAGE_SIZE -- 1<<12 = 4096
- >>> 4096<<2
- 16384 kB
- 324 union irq_stack_union {
- 325 char irq_stack[IRQ_STACK_SIZE]; //16 kB stack size
- 326 /*
- 327 * GCC hardcodes the stack canary as %gs:40. Since the
- 328 * irq_stack is the object at %gs:0, we reserve the bottom
- 329 * 48 bytes of the irq stack for the canary.
- 330 */
- 331 struct {
- 332 char gs_base[40];
- 333 unsigned long stack_canary;
- 334 };
- 335 };
- setup_percpu.c:244
- 244 #ifdef CONFIG_X86_64
- 245 per_cpu(irq_stack_ptr, cpu) =
- 246 per_cpu(irq_stack_union.irq_stack, cpu) +
- 247 IRQ_STACK_SIZE - 64;
- setup IRQ stack pointer on per-cpu variable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement