cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

trace_irq.c (657B)


      1// SPDX-License-Identifier: GPL-2.0
      2/*
      3 * Copyright (C) 2022 Changbin Du <changbin.du@gmail.com>
      4 */
      5
      6#include <linux/irqflags.h>
      7#include <linux/kprobes.h>
      8#include "trace_irq.h"
      9
     10/*
     11 * trace_hardirqs_on/off require the caller to setup frame pointer properly.
     12 * Otherwise, CALLER_ADDR1 might trigger an pagging exception in kernel.
     13 * Here we add one extra level so they can be safely called by low
     14 * level entry code which $fp is used for other purpose.
     15 */
     16
     17void __trace_hardirqs_on(void)
     18{
     19	trace_hardirqs_on();
     20}
     21NOKPROBE_SYMBOL(__trace_hardirqs_on);
     22
     23void __trace_hardirqs_off(void)
     24{
     25	trace_hardirqs_off();
     26}
     27NOKPROBE_SYMBOL(__trace_hardirqs_off);