From 2ffdc3dbc50663b3b1e9c694cc2f62f5bdcce5cf Mon Sep 17 00:00:00 2001 From: Jingyu Wang Date: Thu, 16 Jun 2022 23:01:10 +0800 Subject: [PATCH 1/4] fix: irq_backing_store to irq_stack_backing_store. Signed-off-by: Jingyu Wang --- Interrupts/linux-interrupts-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interrupts/linux-interrupts-1.md b/Interrupts/linux-interrupts-1.md index 0c1c8c2..28403c0 100644 --- a/Interrupts/linux-interrupts-1.md +++ b/Interrupts/linux-interrupts-1.md @@ -373,7 +373,7 @@ int irq_init_percpu_irqstack(unsigned int cpu) Here we go over all the CPUs one-by-one and setup the `hardirq_stack_ptr`. Where `map_irq_stack` is called to initialize the `hardirq_stack_ptr`, -to point onto the `irq_backing_store` of the current CPU with an offset of IRQ\_STACK\_SIZE, +to point onto the `irq_stack_backing_store` of the current CPU with an offset of IRQ\_STACK\_SIZE, either with guard pages or without when KASan is enabled. From 64fd9813ed3000b16b9f4766546db1ac5c60b402 Mon Sep 17 00:00:00 2001 From: Jingyu Wang Date: Fri, 17 Jun 2022 23:02:32 +0800 Subject: [PATCH 2/4] fix local_disable_irq to local_irq_disable. Signed-off-by: Jingyu Wang --- Interrupts/linux-interrupts-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interrupts/linux-interrupts-2.md b/Interrupts/linux-interrupts-2.md index fa683c0..404190a 100644 --- a/Interrupts/linux-interrupts-2.md +++ b/Interrupts/linux-interrupts-2.md @@ -357,7 +357,7 @@ $ sudo cat /proc/lockdep redundant softirq offs: 0 ``` -Ok, now we know a little about tracing, but more info will be in the separate part about `lockdep` and `tracing`. You can see that the both `local_disable_irq` macros have the same part - `raw_local_irq_disable`. This macro defined in the [arch/x86/include/asm/irqflags.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/arch/x86/include/asm/irqflags.h) and expands to the call of the: +Ok, now we know a little about tracing, but more info will be in the separate part about `lockdep` and `tracing`. You can see that the both `local_irq_disable` macros have the same part - `raw_local_irq_disable`. This macro defined in the [arch/x86/include/asm/irqflags.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/arch/x86/include/asm/irqflags.h) and expands to the call of the: ```C static inline void native_irq_disable(void) From 4a530b9573d15e6de22d3d4645431400c9c2b84b Mon Sep 17 00:00:00 2001 From: Jingyu Wang Date: Tue, 21 Jun 2022 01:02:58 +0800 Subject: [PATCH 3/4] fix contert_tracking_enter to context_tracking_enter. Signed-off-by: Jingyu Wang --- Interrupts/linux-interrupts-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interrupts/linux-interrupts-5.md b/Interrupts/linux-interrupts-5.md index 1a0826c..1b53e0e 100644 --- a/Interrupts/linux-interrupts-5.md +++ b/Interrupts/linux-interrupts-5.md @@ -150,7 +150,7 @@ enum ctx_state { } state; ``` -The second function is `exception_exit` defined in the same [include/linux/context_tracking.h](https://github.com/torvalds/linux/tree/master/include/linux/context_tracking.h) file and checks that context tracking is enabled and call the `contert_tracking_enter` function if the previous context was `user`: +The second function is `exception_exit` defined in the same [include/linux/context_tracking.h](https://github.com/torvalds/linux/tree/master/include/linux/context_tracking.h) file and checks that context tracking is enabled and call the `context_tracking_enter` function if the previous context was `user`: ```C static inline void exception_exit(enum ctx_state prev_ctx) From d619037f75540a99d33cc327f6dc33bcf30a3290 Mon Sep 17 00:00:00 2001 From: Jingyu Wang Date: Wed, 22 Jun 2022 04:23:19 +0800 Subject: [PATCH 4/4] fix ALLOC_PT_GREGS_ON_STACK to ALLOC_PT_GPREGS_ON_STACK. Signed-off-by: Jingyu Wang --- Interrupts/linux-interrupts-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interrupts/linux-interrupts-6.md b/Interrupts/linux-interrupts-6.md index 3383807..209d5e2 100644 --- a/Interrupts/linux-interrupts-6.md +++ b/Interrupts/linux-interrupts-6.md @@ -169,7 +169,7 @@ pushq $-1 ALLOC_PT_GPREGS_ON_STACK ``` -We already saw implementation of the `ALLOC_PT_GREGS_ON_STACK` macro in the third part of the interrupts [chapter](https://0xax.gitbook.io/linux-insides/summary/interrupts/linux-interrupts-3). This macro defined in the [arch/x86/entry/calling.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/arch/x86/entry/calling.h) and yet another allocates `120` bytes on stack for the general purpose registers, from the `rdi` to the `r15`: +We already saw implementation of the `ALLOC_PT_GPREGS_ON_STACK` macro in the third part of the interrupts [chapter](https://0xax.gitbook.io/linux-insides/summary/interrupts/linux-interrupts-3). This macro defined in the [arch/x86/entry/calling.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/arch/x86/entry/calling.h) and yet another allocates `120` bytes on stack for the general purpose registers, from the `rdi` to the `r15`: ```assembly .macro ALLOC_PT_GPREGS_ON_STACK addskip=0