From: Mark Rutland Date: Mon, 13 Jun 2016 16:57:02 +0000 (+0100) Subject: arm64: mm: mark fault_info table const X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~9937^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bbb1681ee3653bdcfc6a4ba31902738118311fd4;p=mirror_ubuntu-focal-kernel.git arm64: mm: mark fault_info table const 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 Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon --- diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index ba3fc12bd272..013e2cbe7924 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -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;