From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbeAJVo3 (ORCPT + 1 other); Wed, 10 Jan 2018 16:44:29 -0500 Received: from merlin.infradead.org ([205.233.59.134]:34068 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbeAJVo2 (ORCPT ); Wed, 10 Jan 2018 16:44:28 -0500 Date: Wed, 10 Jan 2018 21:33:52 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: Josh Poimboeuf , Thomas Gleixner , Borislav Petkov , David Woodhouse , Andi Kleen , the arch/x86 maintainers , Linux Kernel Mailing List , Paul Turner , Andrew Lutomirski , Tom Lendacky , Tim Chen , Greg Kroah-Hartman , Dave Hansen , Jiri Kosina , Andi Kleen Subject: Re: [PATCH] x86/alternatives: Fix optimize_nops() checking Message-ID: <20180110203352.GS6176@hirez.programming.kicks-ass.net> References: <20180110003139.10531-1-andi@firstfloor.org> <1515568506.22302.72.camel@infradead.org> <1515578735.22302.91.camel@infradead.org> <20180110112815.mgciyf5acwacphkq@pd.tnic> <20180110201532.5jnji6ypfl6slzvb@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 12:26:25PM -0800, Linus Torvalds wrote: > Imagine just how crazy that would be to debug. You'd be basically > executing insane code, and looking at the sources - or even the > binaries - it would _look_ completely sane. Been there done that.. we have too much self modifying code for that not to have been needed. Use gdb on /proc/kcore and disassemble self to see the _real_ code. But yes, tricky stuff. Not arguing we need relocations in alternatives, just saying debugging them (and static keys and others) is great fun.