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

stub_segv.c (455B)


      1/*
      2 * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
      3 * Licensed under the GPL
      4 */
      5
      6#include <sysdep/stub.h>
      7#include <sysdep/faultinfo.h>
      8#include <sysdep/mcontext.h>
      9#include <sys/ucontext.h>
     10
     11void __attribute__ ((__section__ (".__syscall_stub")))
     12stub_segv_handler(int sig, siginfo_t *info, void *p)
     13{
     14	struct faultinfo *f = get_stub_page();
     15	ucontext_t *uc = p;
     16
     17	GET_FAULTINFO_FROM_MC(*f, &uc->uc_mcontext);
     18	trap_myself();
     19}
     20