# Re: \[RFC PATCH v6 08/11\] x86: Insert endbr32/endbr64 to vDSO

- From: Andy Lutomirski \<luto@amacapital.net\>
- Date: 2018-11-19 22:18:04 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2018/11/5438557
- Thread: https://ratatoskr.run/linux-doc/2018/11/5438521/t.md

```text
On Mon, Nov 19, 2018 at 1:55 PM Yu-cheng Yu [ref] wrote:
>
> From: "H.J. Lu" <redacted>
>
> When Intel indirect branch tracking is enabled, functions in vDSO which
> may be called indirectly must have endbr32 or endbr64 as the first
> instruction.  Compiler must support -fcf-protection=branch so that it
> can be used to compile vDSO.
>
> Signed-off-by: H.J. Lu <redacted>
> ---
>  arch/x86/entry/vdso/.gitignore        |  4 ++++
>  arch/x86/entry/vdso/Makefile          | 12 +++++++++++-
>  arch/x86/entry/vdso/vdso-layout.lds.S |  1 +
>  3 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/entry/vdso/.gitignore b/arch/x86/entry/vdso/.gitignore
> index aae8ffdd5880..552941fdfae0 100644
> --- a/arch/x86/entry/vdso/.gitignore
> +++ b/arch/x86/entry/vdso/.gitignore
> @@ -5,3 +5,7 @@ vdso32-sysenter-syms.lds
>  vdso32-int80-syms.lds
>  vdso-image-*.c
>  vdso2c
> +vclock_gettime.S
> +vgetcpu.S
> +vclock_gettime.asm
> +vgetcpu.asm


What's this hunk about?
```
