lkml.org 
[lkml]   [2018]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] x86/entry/64: extend register clearing on syscall entry to lower registers

* Dominik Brodowski <linux@dominikbrodowski.net> wrote:

> .endif
> pushq \rdx /* pt_regs->dx */
> + xorl %edx, %edx /* nosepc dx */
> pushq %rcx /* pt_regs->cx */
> + xorl %ecx, %ecx /* nosepc cx */
> pushq \rax /* pt_regs->ax */
> pushq %r8 /* pt_regs->r8 */
> xorl %r8d, %r8d /* nospec r8 */
> diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
> index 08425c42f8b7..23e0945959e5 100644
> --- a/arch/x86/entry/entry_64_compat.S
> +++ b/arch/x86/entry/entry_64_compat.S
> @@ -220,8 +220,11 @@ GLOBAL(entry_SYSCALL_compat_after_hwframe)
> pushq %rax /* pt_regs->orig_ax */
> pushq %rdi /* pt_regs->di */
> pushq %rsi /* pt_regs->si */
> + xorl %esi, %esi /* nosepc si */
> pushq %rdx /* pt_regs->dx */
> + xorl %edx, %edx /* nosepc dx */
> pushq %rbp /* pt_regs->cx (stashed in bp) */
> + xorl %ecx, %ecx /* nosepc cx */
> pushq $-ENOSYS /* pt_regs->ax */
> pushq $0 /* pt_regs->r8 = 0 */
> xorl %r8d, %r8d /* nospec r8 */
> @@ -365,8 +368,11 @@ ENTRY(entry_INT80_compat)
>
> pushq (%rdi) /* pt_regs->di */
> pushq %rsi /* pt_regs->si */
> + xorl %esi, %esi /* nosepc si */
> pushq %rdx /* pt_regs->dx */
> + xorl %edx, %edx /* nosepc dx */
> pushq %rcx /* pt_regs->cx */
> + xorl %ecx, %ecx /* nosepc cx */
> pushq $-ENOSYS /* pt_regs->ax */
> pushq $0 /* pt_regs->r8 = 0 */
> xorl %r8d, %r8d /* nospec r8 */

s/nosepc
/nospec

Thanks,

Ingo

\
 
 \ /
  Last update: 2018-03-30 12:11    [W:1.150 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site