From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbbBRVUV (ORCPT ); Wed, 18 Feb 2015 16:20:21 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:48649 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753125AbbBRVUS (ORCPT ); Wed, 18 Feb 2015 16:20:18 -0500 Date: Wed, 18 Feb 2015 22:20:13 +0100 From: Ingo Molnar To: Borislav Petkov Cc: X86 ML , LKML Subject: Re: [PATCH v1 00/12] x86, alternatives: Instruction padding and more robust JMPs Message-ID: <20150218212013.GB22696@gmail.com> References: <1422987390-17878-1-git-send-email-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422987390-17878-1-git-send-email-bp@alien8.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > From: Borislav Petkov > > [ Changelog is in version-increasing number so that one can follow the > evolution of the patch set in a more natural way (i.e., latest version > comes at the end. ] > > v0: > > this is something which hpa and I talked about recently: > the ability for the alternatives code to add padding to > the original instruction in case the replacement is > longer and also to be able to simply write "jmp" and not > care about which JMP exactly the compiler generates and > whether the relative offsets are correct. > > So this is a stab at it, it seems to boot in kvm here but > it needs more staring to make sure we're actually > generating the proper code at all times. Ok, this looks really cool. Do you have any stats about how many such (affected) patch sites we have in say the 64-bit defconfig kernel? I.e. what's the scope of this optimization? Thanks, Ingo