public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Borislav Petkov <bp@alien8.de>, X86 ML <x86@kernel.org>
Subject: Re: sys_execve leaking rbp/rbx/r12-15 to the new process?
Date: Sat, 4 Apr 2015 16:04:17 +0200	[thread overview]
Message-ID: <20150404140417.GB22756@gmail.com> (raw)
In-Reply-To: <551FEE2F.8050903@redhat.com>


* Denys Vlasenko <dvlasenk@redhat.com> wrote:

> We can do this instead:
> 
> ENTRY(stub_execve)
>         CFI_STARTPROC
>         call	sys_execve
> 	testl	%eax, %eax
> 	jz	1f
> 	ret
> 1:      addq	$8, %rsp
> 	xorl	%ebx, %ebx    // maybe create a macro for zeroing these
> 	xorl	%ebp, %ebp    //
> 	xorl	%r12d, %r12d  //
> 	xorl	%r13d, %r13d  //
> 	xorl	%r14d, %r14d  //
> 	xorl	%r15d, %r15d  //

Yeah, call it ZERO_EXTRA_REGS or so.

> Any reason we should not do this change?

Not that I can see - lets try it.

Thanks,

	Ingo

      reply	other threads:[~2015-04-04 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-04 13:59 sys_execve leaking rbp/rbx/r12-15 to the new process? Denys Vlasenko
2015-04-04 14:04 ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150404140417.GB22756@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=dvlasenk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=oleg@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox