From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbbH1R00 (ORCPT ); Fri, 28 Aug 2015 13:26:26 -0400 Received: from one.firstfloor.org ([193.170.194.197]:50357 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbbH1R0Z (ORCPT ); Fri, 28 Aug 2015 13:26:25 -0400 Date: Fri, 28 Aug 2015 19:26:23 +0200 From: Andi Kleen To: Josh Poimboeuf Cc: Andi Kleen , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Pedro Alves , Namhyung Kim , Bernd Petrovitsch , Chris J Arges , Andrew Morton Subject: Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation Message-ID: <20150828172622.GO1747@two.firstfloor.org> References: <20150826142628.GN1747@two.firstfloor.org> <20150827142953.GC26200@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150827142953.GC26200@treble.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I tried to document everything an asm coder would need to know. Also I > have an invested interest in keeping the tool working and useful, and > I'm listed in the MAINTAINERS file. So any frustrated people will know > who to yell at. I find it somewhat ironic that you're proposing to simplifying write assembler code by making people hack some tool instead. > > BTW how do handle the increasing number of JITs in the kernel? > > Yeah, compile-time CFI wouldn't be applicable for code which is > generated at runtime. Maybe we will need a mechanism to allow eBPF to > quickly create minimal CFI-like metadata corresponding to the JIT code > it generates, which can be used by stack dumping code to identify the > JIT code and find the previous stack pointer on the stack. Perhaps I'm missing something, but for the hot patching you need some solution for this, as you rely on 100% accuracy. Right? I guess for now it could be some kind of big reader/writer lock for JIT code and reject hot patching if something is active there. -Andi