lib/audit.c provides a generic function for auditing system calls. This patch extends it for compat syscall support on bi-architectures (32/64-bit) by adding lib/compat_audit.c. What is required to support this feature are: * add asm/unistd32.h for compat system call names * select CONFIG_AUDIT_ARCH_COMPAT_GENERIC
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -362,6 +362,12 @@ enum { · 361 unmodified lines | ||
| 362 | 362 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) |
| 363 | 363 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 364 | 364 | |
| 365 | +#ifdef CONFIG_COMPAT | |
| 366 | +#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT)) | |
| 367 | +#else | |
| 368 | +#define audit_is_compat(arch) false | |
| 369 | +#endif | |
| 370 | + | |
| 365 | 371 | #define AUDIT_PERM_EXEC 1 |
| 366 | 372 | #define AUDIT_PERM_WRITE 2 |
| 367 | 373 | #define AUDIT_PERM_READ 4 |