From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752081AbeCLPVm (ORCPT ); Mon, 12 Mar 2018 11:21:42 -0400 Received: from www62.your-server.de ([213.133.104.62]:55998 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbeCLPVk (ORCPT ); Mon, 12 Mar 2018 11:21:40 -0400 Subject: Re: [BUGFIX PATCH bpf-next] error-injection: Fix to prohibit jump optimization 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, linux-btrfs@vger.kernel.org, darrick.wong@oracle.com, Josef Bacik , Akinobu Mita References: <152084884886.1536.4464134247603910765.stgit@devbox> <20180312192738.77061ec53f9437d960b437d9@kernel.org> <20180312230625.cea180f66d44dc1ea4930fa7@kernel.org> From: Daniel Borkmann Message-ID: <79a6cf73-8e37-fe49-da96-dac70978f226@iogearbox.net> Date: Mon, 12 Mar 2018 16:21:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180312230625.cea180f66d44dc1ea4930fa7@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/12/2018 03:06 PM, Masami Hiramatsu wrote: > On Mon, 12 Mar 2018 11:44:21 +0100 > Daniel Borkmann wrote: >> On 03/12/2018 11:27 AM, Masami Hiramatsu wrote: >>> On Mon, 12 Mar 2018 19:00:49 +0900 >>> Masami Hiramatsu wrote: >>> >>>> Since the kprobe which was optimized by jump can not change >>>> the execution path, the kprobe for error-injection must not >>>> be optimized. To prohibit it, set a dummy post-handler as >>>> officially stated in Documentation/kprobes.txt. >>> >>> Note that trace-probe based BPF is not affected, because it >>> ensures the trace-probe is based on ftrace, which is not >>> jump optimized. >> >> Thanks for the fix! I presume this should go via bpf instead of bpf-next >> tree since 4b1a29a7f542 ("error-injection: Support fault injection framework") >> is in Linus' tree as well. Unless there are objection I would rather route >> it that way so it would be for 4.16. > > Ah, right! It should go into 4.16. It should be applicable cleanly either tree > since there is only the above commit on kernel/fail_function.c :) Applied to bpf tree, thanks Masami!