Re: [PATCH] x86: only use ERMS for user copies for larger sizes

From: Ingo Molnar
Date: Thu Nov 22 2018 - 06:21:27 EST



* Ingo Molnar <mingo@xxxxxxxxxx> wrote:

> So I dug into this some more:
>
> 1)
>
> Firstly I tracked down GCC bloating the might_fault() checks and the
> related out-of-line code exception handling which bloats the full
> generated function.

Sorry, I mis-remembered that detail when I wrote the email: it was
CONFIG_HARDENED_USERCOPY=y and its object size checks that distros enable
- and I disabled that option to simplify the size analysis.

(might_fault() doesn't have inline conditionals so shouldn't have any
effect on the generated code.)

Thanks,

Ingo