Received: by 10.213.65.68 with SMTP id h4csp114152imn; Mon, 12 Mar 2018 08:22:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELtkO8AqdD173D5dfQt8TirkFvug15vJSfPPMuRrKoODTcw0byvpHLboY5QFcPWTApxmMnRh X-Received: by 10.98.82.144 with SMTP id g138mr8262900pfb.239.1520868177416; Mon, 12 Mar 2018 08:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520868177; cv=none; d=google.com; s=arc-20160816; b=Kq0ca94fsT8JL1QujAV/KlIcnfAgdHBm84+hAaQSQ+UYP9nHrSpJUokfaaGkod1+3M uIZoCltdtbW2Obah9sV4XOvJlL5tClo0PEXoPixmoBMcImUBJnIeEBx+FQTmDHNicL6A abYf1FEmFfq3Zg4ocCXFcB10lx2fpCcoZNreTKSuHyvw961bJnt+FylL/I8cGtZByEKb 4SJAulstgF8/F2jhLJmMzutrovSNuLMCdci0elohU84X+Oak1FTscHISTqqMrpVOOMY2 notA817o6Q1fl5aRSgMq9/Q41vrxIczPB0EBOatLwD8/sfarbkjIsTklLT0usHZxvxGC 4jMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=NL9gjfsp4WKs8mxfpMDJsOizyIYv8GdOtS4daUj8Aps=; b=sViaNtVgJXRW5M74t1CzAErDssotJD2DE9lgjQE96FoqYb2kW5WUhlaqJ656ygmU+4 wy3rNOPY5BM9ENIMiPwTwqibrwNl8WHIE+1Qhp3q0ln6JI9dxAaQg+xynK21IaMAqb5A o5PPICqN6EKHyLNAB0FDqLgD3X0XGts8K7WMw4Z5UKvaX3Hl3K/5ZK5gsR27JYjOblC8 /tKfRLenyaovrjALVkGb2YkX8W4dCP2cBNmnqOoFRdXYo++k7fo4vP/BQ1Buuicvy66o SxsTrGAGPJGCt6Q1gc5g03odh2/mtGMhZU2Q71xTzn2faNybIawanY09jRMWCznXw58N fGfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si1966007pld.99.2018.03.12.08.22.42; Mon, 12 Mar 2018 08:22:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752075AbeCLPVl (ORCPT + 99 others); Mon, 12 Mar 2018 11:21:41 -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 Received: from [85.7.107.67] (helo=linux.home) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1evPGS-00080u-S9; Mon, 12 Mar 2018 16:21:29 +0100 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 X-Virus-Scanned: Clear (ClamAV 0.99.3/24386/Mon Mar 12 09:10:47 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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!