Files
graphene/Pal/ipc/linux/ksyms.h
Chia-Che Tsai 27ed3b2f6b - Fix calling convention issues in the glibc 2.19 patch
- Port gipc module to Linux kernel 4.3
- Simplify PAL signal handling
- Fix bug #4 (epoll-related syscalls)
- Fix bug #10
- Fix bug #14
- Merge pull request #18
2016-12-02 00:24:05 -05:00

20 lines
528 B
C

#ifndef _KSYM_H
#define _KSYM_H
#include <linux/kallsyms.h>
#define __KSYM(name) __ksym_##name
#define KSYM(name) ({ BUG_ON(!__KSYM(name)); __KSYM(name); })
#define IMPORT_KSYM(name) __typeof(name) * __KSYM(name)
#define IMPORT_KSYM_PROTO(name, ret, ...) ret (*__KSYM(name)) (__VA_ARGS__)
#define LOOKUP_KSYM(name) \
do { \
__KSYM(name) = (void *) kallsyms_lookup_name(#name); \
if (!__KSYM(name)) { \
pr_err("Unknown symbol: " #name "\n"); \
return -EINVAL; \
} \
} while (0)
#endif