From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Lendacky Subject: Re: [PATCH v5 32/32] x86/mm: Add support to make use of Secure Memory Encryption Date: Tue, 30 May 2017 10:48:27 -0500 Message-ID: <1ac40d18-a8b2-94eb-35ed-c30768667be8@amd.com> References: <20170418211612.10190.82788.stgit@tlendack-t1.amdoffice.net> <20170418212223.10190.85121.stgit@tlendack-t1.amdoffice.net> <20170519113005.3f5kwzg4pgh7j6a5@pd.tnic> <20170519201651.dhayf2pwjlsnouz4@treble> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170519201651.dhayf2pwjlsnouz4@treble> Content-Language: en-US Sender: owner-linux-mm@kvack.org To: Josh Poimboeuf , Borislav Petkov Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Rik van Riel , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Toshimitsu Kani , Arnd Bergmann , Jonathan Corbet , Matt Fleming , "Michael S. Tsirkin" , Joerg Roedel , Konrad Rzeszutek Wilk , Paolo Bonzini , Larry Woodman , Brijesh Singh , Ingo Molnar , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin List-Id: linux-efi@vger.kernel.org On 5/19/2017 3:16 PM, Josh Poimboeuf wrote: > On Fri, May 19, 2017 at 01:30:05PM +0200, Borislav Petkov wrote: >>> it is called so early. I can get past it by adding: >>> >>> CFLAGS_mem_encrypt.o := $(nostackp) >>> >>> in the arch/x86/mm/Makefile, but that obviously eliminates the support >>> for the whole file. Would it be better to split out the sme_enable() >>> and other boot routines into a separate file or just apply the >>> $(nostackp) to the whole file? >> >> Josh might have a better idea here... CCed. > > I'm the stack validation guy, not the stack protection guy :-) > > But there is a way to disable compiler options on a per-function basis > with the gcc __optimize__ function attribute. For example: > > __attribute__((__optimize__("no-stack-protector"))) > I'll look at doing that instead of removing the support for the whole file. Thanks, Tom -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org