From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751649AbdG0HCJ (ORCPT ); Thu, 27 Jul 2017 03:02:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:44102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbdG0HCI (ORCPT ); Thu, 27 Jul 2017 03:02:08 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21D9922C97 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Thu, 27 Jul 2017 16:02:05 +0900 From: Masami Hiramatsu To: Denys Vlasenko Cc: Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: Doubled "opcode != 0x9a" check Message-Id: <20170727160205.a20b1af3d5e88d493993dbf2@kernel.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Jul 2017 21:55:34 +0200 Denys Vlasenko wrote: > commit bd0b90676c30fe640e7ead919b3e38846ac88ab7 > Author: Masami Hiramatsu > Date: Wed Mar 29 13:56:56 2017 +0900 > > kprobes/x86: Fix kprobe-booster not to boost far call instructions > > Fix the kprobe-booster not to boost far call instruction, > because a call may store the address in the single-step > execution buffer to the stack, which should be modified > after single stepping. > > Currently, this instruction will be filtered as not > boostable in resume_execution(), so this is not a > critical issue. > ... case 0x70: > return 0; /* can't boost conditional jump */ > + case 0x90: > + return opcode != 0x9a; /* can't boost call far */ > case 0xc0: > > > Masami. You missed the fact that later, there is this: Oops, right. Hmm, it should be reverted. Ingo, could you revert this commit? Thank you! > > default: > /* segment override prefixes are boostable */ > if (opcode == 0x26 || opcode == 0x36 || opcode == 0x3e) > goto retry; /* prefixes */ > /* CS override prefix and call are not boostable */ > return (opcode != 0x2e && opcode != 0x9a); > ^^^^^^^^^^^^^^^^ -- Masami Hiramatsu