arm64: mm: mark fault_info table const
authorMark Rutland <mark.rutland@arm.com>
Mon, 13 Jun 2016 16:57:02 +0000 (17:57 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 14 Jun 2016 14:02:34 +0000 (15:02 +0100)
Unlike the debug_fault_info table, we never intentionally alter the
fault_info table at runtime, and all derived pointers are treated as
const currently.

Make the table const so that it can be placed in .rodata and protected
from unintentional writes, as we do for the syscall tables.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/fault.c

index ba3fc12bd2722b469ec31da5e133f0e7cbf92715..013e2cbe792474eb3777c8f01ff65f2356527260 100644 (file)
@@ -441,7 +441,7 @@ static int do_bad(unsigned long addr, unsigned int esr, struct pt_regs *regs)
        return 1;
 }
 
-static struct fault_info {
+static const struct fault_info {
        int     (*fn)(unsigned long addr, unsigned int esr, struct pt_regs *regs);
        int     sig;
        int     code;
This page took 0.027745 seconds and 5 git commands to generate.