Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752991AbbDDOEX (ORCPT ); Sat, 4 Apr 2015 10:04:23 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38306 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbbDDOEW (ORCPT ); Sat, 4 Apr 2015 10:04:22 -0400 Date: Sat, 4 Apr 2015 16:04:17 +0200 From: Ingo Molnar To: Denys Vlasenko Cc: Al Viro , LKML , Oleg Nesterov , Andy Lutomirski , Linus Torvalds , Borislav Petkov , X86 ML Subject: Re: sys_execve leaking rbp/rbx/r12-15 to the new process? Message-ID: <20150404140417.GB22756@gmail.com> References: <551FEE2F.8050903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551FEE2F.8050903@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 775 Lines: 33 * Denys Vlasenko 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/