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

freplace_global_func.c (354B)


      1// SPDX-License-Identifier: GPL-2.0
      2#include <linux/bpf.h>
      3#include <bpf/bpf_helpers.h>
      4
      5__noinline
      6int test_ctx_global_func(struct __sk_buff *skb)
      7{
      8	volatile int retval = 1;
      9	return retval;
     10}
     11
     12SEC("freplace/test_pkt_access")
     13int new_test_pkt_access(struct __sk_buff *skb)
     14{
     15	return test_ctx_global_func(skb);
     16}
     17
     18char _license[] SEC("license") = "GPL";