Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160AbbFAVpK (ORCPT ); Mon, 1 Jun 2015 17:45:10 -0400 Received: from mail9.hitachi.co.jp ([133.145.228.44]:45284 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753433AbbFAVpD (ORCPT ); Mon, 1 Jun 2015 17:45:03 -0400 Message-ID: <556CD258.8090909@hitachi.com> Date: Tue, 02 Jun 2015 06:44:56 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Eugene Shatokhin , Ingo Molnar CC: Andy Lutomirski , Ingo Molnar , LKML Subject: Re: [PATCH 0/2] kprobes/x86: Allow "boost" for 10- and 11-byte instructions References: <1433176331-479-1-git-send-email-eugene.shatokhin@rosalab.ru> In-Reply-To: <1433176331-479-1-git-send-email-eugene.shatokhin@rosalab.ru> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1775 Lines: 36 On 2015/06/02 1:32, Eugene Shatokhin wrote: > Kprobes' "boost" feature allows to avoid single-stepping in some cases, along with its overhead. > It is useful for the Kprobes that cannot be optimized for some reason. > > Currently, "boost" cannot be applied to the instructions of 10 and 11 bytes in size, including > some rather commonly used kinds of MOV. > > The first of the two patches in this series fixes the code that checks if the jump needed for > the boost fits in the insn slot (the conditional is too strict). This allows to apply "boost" > to 10-byte instructions. > > As a side effect of commit 91e5ed49fca0 ("x86/asm/decoder: Fix and enforce max instruction > size in the insn decoder"), the size of the instruction slot became 1 byte smaller, 15 bytes > VS 16 bytes before that change. The second patch makes the size of each insn slot 16 bytes > again (while keeping MAX_INSN_SIZE as 15). This allows to apply "boost" to 11-byte > instructions as well. > > I have checked that "boost" does happen for at least "movq $0x1,0x100(%rbx)" > (48 c7 83 00 01 00 00 01 00 00 00) in the kernel 4.1-rc6 after these changes. Ah, I didn't expected that such long instruction existed without redundant prefixes. I have some comment on that, but basically agree to support this. Thank you! -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/