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

test_enable_stats.c (339B)


      1// SPDX-License-Identifier: GPL-2.0
      2// Copyright (c) 2020 Facebook
      3
      4#include <linux/bpf.h>
      5#include <stdint.h>
      6#include <linux/types.h>
      7#include <bpf/bpf_helpers.h>
      8
      9char _license[] SEC("license") = "GPL";
     10
     11__u64 count = 0;
     12
     13SEC("raw_tracepoint/sys_enter")
     14int test_enable_stats(void *ctx)
     15{
     16	__sync_fetch_and_add(&count, 1);
     17	return 0;
     18}