Re: [PATCH v2 06/12] x86/retpoline/crypto: Convert xen assembler indirect jumps

2018-01-03 Thread Andi Kleen
> > diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S 
> > b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> > index 1743e6850e00..9cd8450a2050 100644
> > --- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> > +++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> > @@ -12,6 +12,7 @@
> >  
> >  #include 
> >  #include 
> > +#include 
> 
> I fail to connect this change to the patch title.
> 
> Maybe should be part of the crypto patch?

Right I moved the hunk into the wrong patch. Will fix.

-Andi


Re: [PATCH v2 06/12] x86/retpoline/crypto: Convert xen assembler indirect jumps

2018-01-03 Thread Andi Kleen
> > diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S 
> > b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> > index 1743e6850e00..9cd8450a2050 100644
> > --- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> > +++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> > @@ -12,6 +12,7 @@
> >  
> >  #include 
> >  #include 
> > +#include 
> 
> I fail to connect this change to the patch title.
> 
> Maybe should be part of the crypto patch?

Right I moved the hunk into the wrong patch. Will fix.

-Andi


Re: [PATCH v2 06/12] x86/retpoline/crypto: Convert xen assembler indirect jumps

2018-01-03 Thread Juergen Gross
On 04/01/18 03:00, Andi Kleen wrote:
> From: Andi Kleen 
> 
> Convert all indirect jumps in xen inline assembler code to use
> non speculative sequences.
> 
> Based on code from David Woodhouse and Tim Chen
> 
> Signed-off-by: Andi Kleen 
> ---
>  arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 1 +
>  arch/x86/include/asm/xen/hypercall.h | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S 
> b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> index 1743e6850e00..9cd8450a2050 100644
> --- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> +++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> @@ -12,6 +12,7 @@
>  
>  #include 
>  #include 
> +#include 

I fail to connect this change to the patch title.

Maybe should be part of the crypto patch?

>  
>  #define CAMELLIA_TABLE_BYTE_LEN 272
>  
> diff --git a/arch/x86/include/asm/xen/hypercall.h 
> b/arch/x86/include/asm/xen/hypercall.h
> index 7cb282e9e587..91de35bcce5e 100644
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -44,6 +44,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -217,7 +218,7 @@ privcmd_call(unsigned call,
>   __HYPERCALL_5ARG(a1, a2, a3, a4, a5);
>  
>   stac();
> - asm volatile("call *%[call]"
> + asm volatile(NOSPEC_CALL("%[call]")
>: __HYPERCALL_5PARAM
>: [call] "a" (_page[call])
>: __HYPERCALL_CLOBBER5);
> 

Acked-by: Juergen Gross 


Juergen


Re: [PATCH v2 06/12] x86/retpoline/crypto: Convert xen assembler indirect jumps

2018-01-03 Thread Juergen Gross
On 04/01/18 03:00, Andi Kleen wrote:
> From: Andi Kleen 
> 
> Convert all indirect jumps in xen inline assembler code to use
> non speculative sequences.
> 
> Based on code from David Woodhouse and Tim Chen
> 
> Signed-off-by: Andi Kleen 
> ---
>  arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 1 +
>  arch/x86/include/asm/xen/hypercall.h | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S 
> b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> index 1743e6850e00..9cd8450a2050 100644
> --- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> +++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
> @@ -12,6 +12,7 @@
>  
>  #include 
>  #include 
> +#include 

I fail to connect this change to the patch title.

Maybe should be part of the crypto patch?

>  
>  #define CAMELLIA_TABLE_BYTE_LEN 272
>  
> diff --git a/arch/x86/include/asm/xen/hypercall.h 
> b/arch/x86/include/asm/xen/hypercall.h
> index 7cb282e9e587..91de35bcce5e 100644
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -44,6 +44,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -217,7 +218,7 @@ privcmd_call(unsigned call,
>   __HYPERCALL_5ARG(a1, a2, a3, a4, a5);
>  
>   stac();
> - asm volatile("call *%[call]"
> + asm volatile(NOSPEC_CALL("%[call]")
>: __HYPERCALL_5PARAM
>: [call] "a" (_page[call])
>: __HYPERCALL_CLOBBER5);
> 

Acked-by: Juergen Gross 


Juergen


[PATCH v2 06/12] x86/retpoline/crypto: Convert xen assembler indirect jumps

2018-01-03 Thread Andi Kleen
From: Andi Kleen 

Convert all indirect jumps in xen inline assembler code to use
non speculative sequences.

Based on code from David Woodhouse and Tim Chen

Signed-off-by: Andi Kleen 
---
 arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 1 +
 arch/x86/include/asm/xen/hypercall.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S 
b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
index 1743e6850e00..9cd8450a2050 100644
--- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
+++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
@@ -12,6 +12,7 @@
 
 #include 
 #include 
+#include 
 
 #define CAMELLIA_TABLE_BYTE_LEN 272
 
diff --git a/arch/x86/include/asm/xen/hypercall.h 
b/arch/x86/include/asm/xen/hypercall.h
index 7cb282e9e587..91de35bcce5e 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -217,7 +218,7 @@ privcmd_call(unsigned call,
__HYPERCALL_5ARG(a1, a2, a3, a4, a5);
 
stac();
-   asm volatile("call *%[call]"
+   asm volatile(NOSPEC_CALL("%[call]")
 : __HYPERCALL_5PARAM
 : [call] "a" (_page[call])
 : __HYPERCALL_CLOBBER5);
-- 
2.14.3



[PATCH v2 06/12] x86/retpoline/crypto: Convert xen assembler indirect jumps

2018-01-03 Thread Andi Kleen
From: Andi Kleen 

Convert all indirect jumps in xen inline assembler code to use
non speculative sequences.

Based on code from David Woodhouse and Tim Chen

Signed-off-by: Andi Kleen 
---
 arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 1 +
 arch/x86/include/asm/xen/hypercall.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S 
b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
index 1743e6850e00..9cd8450a2050 100644
--- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
+++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
@@ -12,6 +12,7 @@
 
 #include 
 #include 
+#include 
 
 #define CAMELLIA_TABLE_BYTE_LEN 272
 
diff --git a/arch/x86/include/asm/xen/hypercall.h 
b/arch/x86/include/asm/xen/hypercall.h
index 7cb282e9e587..91de35bcce5e 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -217,7 +218,7 @@ privcmd_call(unsigned call,
__HYPERCALL_5ARG(a1, a2, a3, a4, a5);
 
stac();
-   asm volatile("call *%[call]"
+   asm volatile(NOSPEC_CALL("%[call]")
 : __HYPERCALL_5PARAM
 : [call] "a" (_page[call])
 : __HYPERCALL_CLOBBER5);
-- 
2.14.3