From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752708AbcAPThp (ORCPT ); Sat, 16 Jan 2016 14:37:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:60196 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752660AbcAPThT (ORCPT ); Sat, 16 Jan 2016 14:37:19 -0500 Date: Sat, 16 Jan 2016 20:36:58 +0100 From: Borislav Petkov To: Brian Gerst Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Denys Vlasenko , Andy Lutomirski , Linus Torvalds Subject: Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Message-ID: <20160116193658.GC32085@pd.tnic> References: <1452972124-7380-1-git-send-email-brgerst@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1452972124-7380-1-git-send-email-brgerst@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 16, 2016 at 02:22:04PM -0500, Brian Gerst wrote: > Move the code to do the dynamic check to the init text section so that it > is discarded after alternatives have run and a static branch has been > chosen. > > A new section is defined to avoid warnings with modpost due to references > to init text from main text, which in this case is legitimate. All such > references are patched out before init mem is discarded. And we're doing this because...? Space savings? How much are we talkin'? -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --