Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933448AbbFIS7h (ORCPT ); Tue, 9 Jun 2015 14:59:37 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:34734 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752372AbbFIS73 (ORCPT ); Tue, 9 Jun 2015 14:59:29 -0400 MIME-Version: 1.0 In-Reply-To: <1433876051-26604-5-git-send-email-dvlasenk@redhat.com> References: <1433876051-26604-1-git-send-email-dvlasenk@redhat.com> <1433876051-26604-5-git-send-email-dvlasenk@redhat.com> From: Andy Lutomirski Date: Tue, 9 Jun 2015 11:59:06 -0700 Message-ID: Subject: Re: [PATCH 5/5] x86/asm/entry/32: Simplify ptrace register shuffling To: Denys Vlasenko Cc: Ingo Molnar , Linus Torvalds , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , X86 ML , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1046 Lines: 22 On Tue, Jun 9, 2015 at 11:54 AM, Denys Vlasenko wrote: > Before this patch, we were clearing pt_regs->r8..r11 on stack. > We can as well just store actual r8..r11 registers there: > they came from userspace, we leak no information by showing them to ptrace. > This allows to get rid of one insn ("xor %eax,%eax"). > Not a big deal, but still... > > After call to syscall_trace_enter(), before this patch we were restoring > clobbered registers and jump to code which converts 32-bit syscall > ABI to 64-bit C ABI. This is unnecessary work, we can combine both > steps into one (similar to what audit code does already). I think like zeroing it better. There's nothing wrong with zeroing it, and it makes testing (if we ever started testing this stuff) easier, I think. --Andy -- 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/