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_connect4.c (385B)


      1#include <linux/stddef.h>
      2#include <linux/ipv6.h>
      3#include <linux/bpf.h>
      4#include <linux/in.h>
      5#include <sys/socket.h>
      6#include <bpf/bpf_helpers.h>
      7#include <bpf/bpf_endian.h>
      8
      9SEC("freplace/do_bind")
     10int new_do_bind(struct bpf_sock_addr *ctx)
     11{
     12  struct sockaddr_in sa = {};
     13
     14  bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa));
     15  return 0;
     16}
     17
     18char _license[] SEC("license") = "GPL";