From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751296AbdBWSaF (ORCPT ); Thu, 23 Feb 2017 13:30:05 -0500 Received: from merlin.infradead.org ([205.233.59.134]:49226 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbdBWSaE (ORCPT ); Thu, 23 Feb 2017 13:30:04 -0500 Date: Thu, 23 Feb 2017 19:30:02 +0100 From: Peter Zijlstra To: mhiramat@kernel.org Cc: Borislav Petkov , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner Subject: kprobes vs __ex_table[] Message-ID: <20170223183002.GD6557@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masami, I just wondered what would happen if I put a probe on an instruction that was listed in __ex_table[] or __bug_table[]. And it looks like it will happily do that. It will then run the instruction out-of-line, and when said instruction traps, the instruction address will not match the one listed in either __ex_table[] or __bug_table[] and badness will happen. If kprobes does indeed not check this, we should probably fix it, if it does do check this, could you point me to it?