Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965659AbeAJPVo (ORCPT + 1 other); Wed, 10 Jan 2018 10:21:44 -0500 Received: from mail-qt0-f176.google.com ([209.85.216.176]:41134 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965635AbeAJPVl (ORCPT ); Wed, 10 Jan 2018 10:21:41 -0500 X-Google-Smtp-Source: ACJfBov76ArgilZF1mdxc9x1Pps7fNQK6adH9LgXM1JRHrb5NiJI4IMv0W7AaLOEiO0euk+3MaioKg== Date: Wed, 10 Jan 2018 10:21:39 -0500 From: Josef Bacik To: Masami Hiramatsu Cc: Alexei Starovoitov , Josef Bacik , rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, kernel-team@fb.com, daniel@iogearbox.net, linux-btrfs@vger.kernel.org, darrick.wong@oracle.com, Josef Bacik , Akinobu Mita Subject: Re: [PATCH bpf-next v3 1/5] tracing/kprobe: bpf: Check error injectable event is on function entry Message-ID: <20180110152138.fefzhdhuixljvapo@destiny> References: <151557939382.6629.18074658376309258555.stgit@devbox> <151557942619.6629.4941380220602441478.stgit@devbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <151557942619.6629.4941380220602441478.stgit@devbox> User-Agent: NeoMutt/20170714 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 07:17:06PM +0900, Masami Hiramatsu wrote: > Check whether error injectable event is on function entry or not. > Currently it checks the event is ftrace-based kprobes or not, > but that is wrong. It should check if the event is on the entry > of target function. Since error injection will override a function > to just return with modified return value, that operation must > be done before the target function starts making stackframe. > > As a side effect, bpf error injection is no need to depend on > function-tracer. It can work with sw-breakpoint based kprobe > events too. > > Signed-off-by: Masami Hiramatsu Reviewed-by: Josef Bacik Thanks, Josef