From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v7 01/26] ptrace,x86: Make user_64bit_mode() available to 32-bit builds Date: Sun, 21 May 2017 16:19:27 +0200 Message-ID: <20170521141927.GB5676@nazgul.tnic> References: <20170505181724.55000-1-ricardo.neri-calderon@linux.intel.com> <20170505181724.55000-2-ricardo.neri-calderon@linux.intel.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20170505181724.55000-2-ricardo.neri-calderon@linux.intel.com> Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="utf-8" To: Ricardo Neri Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Andrew Morton , Brian Gerst , Chris Metcalf , Dave Hansen , Paolo Bonzini , Liang Z Li , Masami Hiramatsu , Huang Rui , Jiri Slaby , Jonathan Corbet , "Michael S. Tsirkin" , Paul Gortmaker , Vlastimil Babka , Chen Yucong , Alexandre Julliard , Stas On Fri, May 05, 2017 at 11:16:59AM -0700, Ricardo Neri wrote: > In its current form, user_64bit_mode() can only be used when CONFIG_X86_64 > is selected. This implies that code built with CONFIG_X86_64=n cannot use > it. If a piece of code needs to be built for both CONFIG_X86_64=y and > CONFIG_X86_64=n and wants to use this function, it needs to wrap it in > an #ifdef/#endif; potentially, in multiple places. > > This can be easily avoided with a single #ifdef/#endif pair within > user_64bit_mode() itself. > > Suggested-by: Borislav Petkov > Cc: Dave Hansen > Cc: Adam Buchbinder > Cc: Colin Ian King > Cc: Lorenzo Stoakes > Cc: Qiaowei Ren > Cc: Arnaldo Carvalho de Melo > Cc: Masami Hiramatsu > Cc: Adrian Hunter > Cc: Kees Cook > Cc: Thomas Garnier > Cc: Peter Zijlstra > Cc: Borislav Petkov > Cc: Dmitry Vyukov > Cc: Ravi V. Shankar > Cc: x86@kernel.org > Signed-off-by: Ricardo Neri > --- > arch/x86/include/asm/ptrace.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --