Skip to content

Commit 2a28224

Browse files
author
Russell King
committed
Merge branch 'security-fixes' into fixes
2 parents 2103f6c + d9f9663 commit 2a28224

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

arch/arm/kernel/entry-armv.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ ENDPROC(__pabt_svc)
357357
.endm
358358

359359
.macro kuser_cmpxchg_check
360-
#if !defined(CONFIG_CPU_32v6K) && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
360+
#if !defined(CONFIG_CPU_32v6K) && defined(CONFIG_KUSER_HELPERS) && \
361+
!defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
361362
#ifndef CONFIG_MMU
362363
#warning "NPTL on non MMU needs fixing"
363364
#else

arch/arm/kernel/fiq.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,13 @@ int show_fiq_list(struct seq_file *p, int prec)
8484

8585
void set_fiq_handler(void *start, unsigned int length)
8686
{
87-
#if defined(CONFIG_CPU_USE_DOMAINS)
88-
void *base = (void *)0xffff0000;
89-
#else
9087
void *base = vectors_page;
91-
#endif
9288
unsigned offset = FIQ_OFFSET;
9389

9490
memcpy(base + offset, start, length);
91+
if (!cache_is_vipt_nonaliasing())
92+
flush_icache_range(base + offset, offset + length);
9593
flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length);
96-
if (!vectors_high())
97-
flush_icache_range(offset, offset + length);
9894
}
9995

10096
int claim_fiq(struct fiq_handler *f)

arch/arm/kernel/perf_event.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ armpmu_map_cache_event(const unsigned (*cache_map)
5353
static int
5454
armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config)
5555
{
56-
int mapping = (*event_map)[config];
56+
int mapping;
57+
58+
if (config >= PERF_COUNT_HW_MAX)
59+
return -EINVAL;
60+
61+
mapping = (*event_map)[config];
5762
return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping;
5863
}
5964

@@ -253,6 +258,9 @@ validate_event(struct pmu_hw_events *hw_events,
253258
struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
254259
struct pmu *leader_pmu = event->group_leader->pmu;
255260

261+
if (is_software_event(event))
262+
return 1;
263+
256264
if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF)
257265
return 1;
258266

arch/arm/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ int in_gate_area_no_mm(unsigned long addr)
462462
{
463463
return in_gate_area(NULL, addr);
464464
}
465-
#define is_gate_vma(vma) ((vma) = &gate_vma)
465+
#define is_gate_vma(vma) ((vma) == &gate_vma)
466466
#else
467467
#define is_gate_vma(vma) 0
468468
#endif

0 commit comments

Comments
 (0)