All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: clobber flags in clear_page()
@ 2018-01-13 18:50 Alexey Dobriyan
  2018-02-10 21:19 ` Borislav Petkov
  2018-02-13 16:59 ` [tip:x86/asm] x86/asm: Clobber " tip-bot for Alexey Dobriyan
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2018-01-13 18:50 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: x86, linux-kernel, bp

All clear_page() implementations use XOR which resets flags.

Judging by allyesconfig disassembly no code is affected.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/x86/include/asm/page_64.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/include/asm/page_64.h
+++ b/arch/x86/include/asm/page_64.h
@@ -47,7 +47,7 @@ static inline void clear_page(void *page)
 			   clear_page_erms, X86_FEATURE_ERMS,
 			   "=D" (page),
 			   "0" (page)
-			   : "memory", "rax", "rcx");
+			   : "cc", "memory", "rax", "rcx");
 }
 
 void copy_page(void *to, void *from);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86_64: clobber flags in clear_page()
  2018-01-13 18:50 [PATCH] x86_64: clobber flags in clear_page() Alexey Dobriyan
@ 2018-02-10 21:19 ` Borislav Petkov
  2018-02-13 16:59 ` [tip:x86/asm] x86/asm: Clobber " tip-bot for Alexey Dobriyan
  1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2018-02-10 21:19 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: tglx, mingo, hpa, x86, linux-kernel

On Sat, Jan 13, 2018 at 09:50:48PM +0300, Alexey Dobriyan wrote:
> All clear_page() implementations use XOR which resets flags.
> 
> Judging by allyesconfig disassembly no code is affected.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  arch/x86/include/asm/page_64.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/arch/x86/include/asm/page_64.h
> +++ b/arch/x86/include/asm/page_64.h
> @@ -47,7 +47,7 @@ static inline void clear_page(void *page)
>  			   clear_page_erms, X86_FEATURE_ERMS,
>  			   "=D" (page),
>  			   "0" (page)
> -			   : "memory", "rax", "rcx");
> +			   : "cc", "memory", "rax", "rcx");
>  }
>  
>  void copy_page(void *to, void *from);

Reviewed-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/asm] x86/asm: Clobber flags in clear_page()
  2018-01-13 18:50 [PATCH] x86_64: clobber flags in clear_page() Alexey Dobriyan
  2018-02-10 21:19 ` Borislav Petkov
@ 2018-02-13 16:59 ` tip-bot for Alexey Dobriyan
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Alexey Dobriyan @ 2018-02-13 16:59 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, peterz, adobriyan, hpa, linux-kernel, tglx, bp, torvalds

Commit-ID:  1acdbf7ea8a80706561013346d281d282a3c00f9
Gitweb:     https://git.kernel.org/tip/1acdbf7ea8a80706561013346d281d282a3c00f9
Author:     Alexey Dobriyan <adobriyan@gmail.com>
AuthorDate: Sat, 13 Jan 2018 21:50:48 +0300
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 13 Feb 2018 17:36:49 +0100

x86/asm: Clobber flags in clear_page()

All clear_page() implementations use XOR which resets flags.

Judging by allyesconfig disassembly no code is affected.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180113185048.GA23111@avx2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/page_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h
index 4baa6bc..f8a85c6 100644
--- a/arch/x86/include/asm/page_64.h
+++ b/arch/x86/include/asm/page_64.h
@@ -47,7 +47,7 @@ static inline void clear_page(void *page)
 			   clear_page_erms, X86_FEATURE_ERMS,
 			   "=D" (page),
 			   "0" (page)
-			   : "memory", "rax", "rcx");
+			   : "cc", "memory", "rax", "rcx");
 }
 
 void copy_page(void *to, void *from);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-13 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13 18:50 [PATCH] x86_64: clobber flags in clear_page() Alexey Dobriyan
2018-02-10 21:19 ` Borislav Petkov
2018-02-13 16:59 ` [tip:x86/asm] x86/asm: Clobber " tip-bot for Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.