Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934543AbdGTKBo (ORCPT ); Thu, 20 Jul 2017 06:01:44 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:38175 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934012AbdGTKBl (ORCPT ); Thu, 20 Jul 2017 06:01:41 -0400 MIME-Version: 1.0 In-Reply-To: <20170719174630.kz5g553evcrnirmr@treble> References: <20170712223547.fyra43dizqooosbs@treble> <20170712223630.gb237t4vhrqeu5zd@treble> <20170712232213.GE95735@google.com> <20170713180001.mvwzdmudht56hdk5@treble> <20170713184748.GF95735@google.com> <75850bb7-a60e-057d-d88b-afa0c79e94a0@gmail.com> <20170713203416.isvijqbwbcgupgj7@treble> <20170713211245.GG95735@google.com> <20170713213406.gx4ixkx6kxa4ppps@treble> <20170713215704.GJ95735@google.com> <20170719174630.kz5g553evcrnirmr@treble> From: Andrey Ryabinin Date: Thu, 20 Jul 2017 13:01:39 +0300 Message-ID: Subject: Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" To: Josh Poimboeuf Cc: Matthias Kaehlcke , Chris J Arges , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "x86@kernel.org" , LKML , Douglas Anderson , Michael Davidson , Greg Hackmann , Nick Desaulniers , Stephen Hines , Kees Cook , Arnd Bergmann , =?UTF-8?Q?Bernhard_Rosenkr=C3=A4nzer?= 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: 739 Lines: 22 2017-07-19 20:46 GMT+03:00 Josh Poimboeuf : > > After doing some testing, I don't think this approach is going to work > after all. In addition to forcing the stack frame, it also causes GCC > to add an unnecessary extra instruction to the epilogue of each affected > function: > > lea -0x10(%rbp),%rsp > > We shouldn't be inserting extra instructions like that. I also don't > think the other suggestion of turning the '__sp' register variable into > a global variable is a very good solution either, as that just wastes > memory for no reason. > Wastes memory? How is that wastes memory? That doesn't make any sense. > It would be nice if both compilers could agree on a way to support this. > > -- > Josh