--- kernel/softirq.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/softirq.c b/kernel/softirq.c index 513b1945987c..cfed8419b6c5 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -632,6 +632,10 @@ void irq_enter_rcu(void) */ void irq_enter(void) { +#ifdef SAFEFETCH_DEBUG + /* #warning IRQ_DEFENSE */ + current->df_stats.in_irq = 1; +#endif ct_irq_enter(); irq_enter_rcu(); } @@ -708,7 +712,11 @@ void irq_exit(void) __irq_exit_rcu(); ct_irq_exit(); /* must be last! */ +#ifdef SAFEFETCH_DEBUG + current->df_stats.in_irq = 0; +#endif lockdep_hardirq_exit(); + } /* -- 2.25.1
- [RFC v1 05/17] uaccess: add non-caching copy_from_user fun... Gatlin Newhouse
- [RFC v1 04/17] sched: add protection to task_struct Gatlin Newhouse
- [RFC v1 08/17] init: add caching startup and initializatio... Gatlin Newhouse
- [RFC v1 11/17] kernel: add SafeFetch cache handling to dup... Gatlin Newhouse
- [RFC v1 10/17] iov_iter: add SafeFetch pinning call to cop... Gatlin Newhouse
- [RFC v1 09/17] exit: add destruction of SafeFetch caches a... Gatlin Newhouse
- [RFC v1 12/17] bug: add SafeFetch statistics tracking to _... Gatlin Newhouse
- [RFC v1 07/17] gup: add non-caching get_user call to fault... Gatlin Newhouse
- [RFC v1 15/17] kconfig: debug: add SafeFetch to debug kcon... Gatlin Newhouse
- [RFC v1 17/17] vfs: ioctl: add logging to ioctl_file_dedup... Gatlin Newhouse
- [RFC v1 13/17] softirq: add SafeFetch statistics to irq_en... Gatlin Newhouse
- [RFC v1 14/17] makefile: add SafeFetch support to makefile... Gatlin Newhouse
- [RFC v1 06/17] futex: add get_user_no_dfcache() functions Gatlin Newhouse
- [RFC v1 03/17] x86: asm: support caching in do_get_user_ca... Gatlin Newhouse
- [RFC v1 16/17] x86: enable SafeFetch on x86_64 builds Gatlin Newhouse