[PATCH v2 16/29] ARM: kernel: switch to relative exception tables
From: Ard Biesheuvel <hidden>
Date: 2017-09-04 17:30:26
From: Ard Biesheuvel <hidden>
Date: 2017-09-04 17:30:26
On 4 September 2017 at 18:17, Nicolas Pitre [off-list ref] wrote:
On Sun, 3 Sep 2017, Ard Biesheuvel wrote:quoted
To avoid having to relocate the contents of extable entries at runtime when running with KASLR enabled, wire up the existing support for emitting them as relative references. This ensures these quantities are invariant under runtime relocation. Cc: Russell King <linux@armlinux.org.uk> Signed-off-by: Ard Biesheuvel <redacted>Could it be better to have a macro that encapsulates exception entries e.g.: .macro ex_entry insn fixup .long \insn - ., \fixup - . .endif so that if ever this changes again or for whatever reason someone needs absolute entries then this won't have to be done everywhere. The section switch could be included in such a macro too. And it is so easy to forget to do the "- ." when adding new entries.
Good point. I will change that.