diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/compat.h | 11 | ||||
| -rw-r--r-- | include/linux/perf/arm_pmu.h | 11 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 11 |
3 files changed, 30 insertions, 3 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index df45ee8413d6..1a3c4f37e908 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -1019,6 +1019,17 @@ static inline struct compat_timeval ns_to_compat_timeval(s64 nsec) | |||
| 1019 | return ctv; | 1019 | return ctv; |
| 1020 | } | 1020 | } |
| 1021 | 1021 | ||
| 1022 | /* | ||
| 1023 | * Kernel code should not call compat syscalls (i.e., compat_sys_xyzyyz()) | ||
| 1024 | * directly. Instead, use one of the functions which work equivalently, such | ||
| 1025 | * as the kcompat_sys_xyzyyz() functions prototyped below. | ||
| 1026 | */ | ||
| 1027 | |||
| 1028 | int kcompat_sys_statfs64(const char __user * pathname, compat_size_t sz, | ||
| 1029 | struct compat_statfs64 __user * buf); | ||
| 1030 | int kcompat_sys_fstatfs64(unsigned int fd, compat_size_t sz, | ||
| 1031 | struct compat_statfs64 __user * buf); | ||
| 1032 | |||
| 1022 | #else /* !CONFIG_COMPAT */ | 1033 | #else /* !CONFIG_COMPAT */ |
| 1023 | 1034 | ||
| 1024 | #define is_compat_task() (0) | 1035 | #define is_compat_task() (0) |
diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index ad5444491975..10f92e1d8e7b 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h | |||
| @@ -25,6 +25,12 @@ | |||
| 25 | */ | 25 | */ |
| 26 | #define ARMPMU_MAX_HWEVENTS 32 | 26 | #define ARMPMU_MAX_HWEVENTS 32 |
| 27 | 27 | ||
| 28 | /* | ||
| 29 | * ARM PMU hw_event flags | ||
| 30 | */ | ||
| 31 | /* Event uses a 64bit counter */ | ||
| 32 | #define ARMPMU_EVT_64BIT 1 | ||
| 33 | |||
| 28 | #define HW_OP_UNSUPPORTED 0xFFFF | 34 | #define HW_OP_UNSUPPORTED 0xFFFF |
| 29 | #define C(_x) PERF_COUNT_HW_CACHE_##_x | 35 | #define C(_x) PERF_COUNT_HW_CACHE_##_x |
| 30 | #define CACHE_OP_UNSUPPORTED 0xFFFF | 36 | #define CACHE_OP_UNSUPPORTED 0xFFFF |
| @@ -87,14 +93,13 @@ struct arm_pmu { | |||
| 87 | struct perf_event *event); | 93 | struct perf_event *event); |
| 88 | int (*set_event_filter)(struct hw_perf_event *evt, | 94 | int (*set_event_filter)(struct hw_perf_event *evt, |
| 89 | struct perf_event_attr *attr); | 95 | struct perf_event_attr *attr); |
| 90 | u32 (*read_counter)(struct perf_event *event); | 96 | u64 (*read_counter)(struct perf_event *event); |
| 91 | void (*write_counter)(struct perf_event *event, u32 val); | 97 | void (*write_counter)(struct perf_event *event, u64 val); |
| 92 | void (*start)(struct arm_pmu *); | 98 | void (*start)(struct arm_pmu *); |
| 93 | void (*stop)(struct arm_pmu *); | 99 | void (*stop)(struct arm_pmu *); |
| 94 | void (*reset)(void *); | 100 | void (*reset)(void *); |
| 95 | int (*map_event)(struct perf_event *event); | 101 | int (*map_event)(struct perf_event *event); |
| 96 | int num_events; | 102 | int num_events; |
| 97 | u64 max_period; | ||
| 98 | bool secure_access; /* 32-bit ARM only */ | 103 | bool secure_access; /* 32-bit ARM only */ |
| 99 | #define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40 | 104 | #define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40 |
| 100 | DECLARE_BITMAP(pmceid_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS); | 105 | DECLARE_BITMAP(pmceid_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index ebb2f24027e8..2ff814c92f7f 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -81,6 +81,7 @@ union bpf_attr; | |||
| 81 | #include <linux/unistd.h> | 81 | #include <linux/unistd.h> |
| 82 | #include <linux/quota.h> | 82 | #include <linux/quota.h> |
| 83 | #include <linux/key.h> | 83 | #include <linux/key.h> |
| 84 | #include <linux/personality.h> | ||
| 84 | #include <trace/syscall.h> | 85 | #include <trace/syscall.h> |
| 85 | 86 | ||
| 86 | #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER | 87 | #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER |
| @@ -1282,4 +1283,14 @@ static inline long ksys_truncate(const char __user *pathname, loff_t length) | |||
| 1282 | return do_sys_truncate(pathname, length); | 1283 | return do_sys_truncate(pathname, length); |
| 1283 | } | 1284 | } |
| 1284 | 1285 | ||
| 1286 | static inline unsigned int ksys_personality(unsigned int personality) | ||
| 1287 | { | ||
| 1288 | unsigned int old = current->personality; | ||
| 1289 | |||
| 1290 | if (personality != 0xffffffff) | ||
| 1291 | set_personality(personality); | ||
| 1292 | |||
| 1293 | return old; | ||
| 1294 | } | ||
| 1295 | |||
| 1285 | #endif | 1296 | #endif |
