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

compat_audit.c (843B)


      1// SPDX-License-Identifier: GPL-2.0
      2#undef __powerpc64__
      3#include <linux/audit_arch.h>
      4#include <asm/unistd.h>
      5
      6unsigned ppc32_dir_class[] = {
      7#include <asm-generic/audit_dir_write.h>
      8~0U
      9};
     10
     11unsigned ppc32_chattr_class[] = {
     12#include <asm-generic/audit_change_attr.h>
     13~0U
     14};
     15
     16unsigned ppc32_write_class[] = {
     17#include <asm-generic/audit_write.h>
     18~0U
     19};
     20
     21unsigned ppc32_read_class[] = {
     22#include <asm-generic/audit_read.h>
     23~0U
     24};
     25
     26unsigned ppc32_signal_class[] = {
     27#include <asm-generic/audit_signal.h>
     28~0U
     29};
     30
     31int ppc32_classify_syscall(unsigned syscall)
     32{
     33	switch(syscall) {
     34	case __NR_open:
     35		return AUDITSC_OPEN;
     36	case __NR_openat:
     37		return AUDITSC_OPENAT;
     38	case __NR_socketcall:
     39		return AUDITSC_SOCKETCALL;
     40	case __NR_execve:
     41		return AUDITSC_EXECVE;
     42	case __NR_openat2:
     43		return AUDITSC_OPENAT2;
     44	default:
     45		return AUDITSC_COMPAT;
     46	}
     47}