[RFC PATCH v3 0/3] arm64/kernel: get rid of GCC large model code
Will Deacon
will.deacon at arm.com
Mon Mar 5 09:40:58 PST 2018
On Wed, Feb 14, 2018 at 11:36:42AM +0000, Ard Biesheuvel wrote:
> I am resending this as an RFC, because I'd like to understand whether
> anyone else shares my concern, or whether I am being overly paranoid.
>
> v2 blurb:
>
> GCC's large model uses literal pools to emit cross object symbol
> references rather than movz/movk sequences, resulting in data items
> mixed in the with executable code in modules' .text segments, reducing
> cache utilization, but also potentially resulting in the creation of
> code gadgets that are exploitable under speculative execution.
>
> We are using GCC's large model for two separate reasons, both of which can
> be worked around rather easily:
> - KASLR uses it to move modules and the kernel very far apart, which is
> not really needed,
> - the Cortex-A53 erratum code uses it to avoid ADRP instruction altogether,
> which can be replaced by selective patching of only the ADRP instructions
> that are affected by the erratum
I think this is a sensible thing to do, cheers.
Will
More information about the linux-arm-kernel
mailing list