Received: by 10.223.164.202 with SMTP id h10csp1026105wrb; Tue, 7 Nov 2017 20:06:18 -0800 (PST) X-Google-Smtp-Source: ABhQp+SmBnb8euTl4UtVJSHSLObHs9ZG7IYyMxX+tVn7cwF0fgSXiaefycS4ADc0azHpKNTyL/1W X-Received: by 10.159.235.137 with SMTP id f9mr295554plr.355.1510113978692; Tue, 07 Nov 2017 20:06:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510113978; cv=none; d=google.com; s=arc-20160816; b=Z0S8kecZM55bxiZ6od7W1DW7AdqRFH9q0fFwZzLqEl4SgLvce4w14SeHEs/b5BofIp mlc0BBKOYVCjGm+pM7JgvCRGCW2bM/WEMytDsJRZL1wKojqZ6zQ2mq+Imit9+dGe6Ce4 bRBH4MRJeGKypAsfv8to+R5UY+i6PP3RctE/wZoZZrz2O9XDc60JFQDPPi+3i+FU0tJA LgfeOT61D8xGqjOpXyCLbdFM0vqwMp5RxmyFG0SPbkwrUm9w0hRKGVjZoHTzWnZ0qx9z oFSsY7yMUorPQydorjc+pPdeDubt+ezK2MUGVmqlJs9IjADu+xQtakoqQXUEe+U2oGa9 d6WQ== 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:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=f/rgI81vbAGC+J7KHeHkEdMb/L5b+hvDYDKN2bGGQjI=; b=LShU5QkL07YCtaz/2BAyt/EVMZmhPil+/bFy4UMQuSfkj14+oC4GpPJniiYK9dGjcp NMszcyYVZYkyB3pOrkUuWbhdXmoBXuYXIWkNeOZfNGIpVyC4UBlIynTakLggsZhjwUPG +guF/B/zlkMdPgWmbgZnFaJfBdh2qKeUr5bsl1IwjTZvZUi6KacRVEyTLy2L2zXwALyb YsFJ20noPFP6dIQL7WaZvpp2IFu84wjqhs0TPMfigqAjNkkegzz1TIhZP0bu9Bv/eVpv cRsOm33iA0ZedCK6G2PpisOt4FZPW+6xNxw+KztrUWEKo03r8Eu00Y6AOXra305LtO6H o4OQ== 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 v5si2893434pfl.215.2017.11.07.20.06.06; Tue, 07 Nov 2017 20:06:18 -0800 (PST) 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 S1754274AbdKHC2t (ORCPT + 90 others); Tue, 7 Nov 2017 21:28:49 -0500 Received: from www62.your-server.de ([213.133.104.62]:40834 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753674AbdKHC2r (ORCPT ); Tue, 7 Nov 2017 21:28:47 -0500 Received: from [194.230.159.142] (helo=localhost.localdomain) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1eCG6W-000202-Q9; Wed, 08 Nov 2017 03:28:36 +0100 Message-ID: <5A026BD2.6000007@iogearbox.net> Date: Wed, 08 Nov 2017 03:28:34 +0100 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: 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 CC: Josef Bacik Subject: Re: [PATCH 1/2] bpf: add a bpf_override_function helper References: <1510086523-8859-1-git-send-email-josef@toxicpanda.com> <1510086523-8859-2-git-send-email-josef@toxicpanda.com> In-Reply-To: <1510086523-8859-2-git-send-email-josef@toxicpanda.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.99.2/24023/Tue Nov 7 22:06:05 2017) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/07/2017 09:28 PM, Josef Bacik wrote: > From: Josef Bacik > > Error injection is sloppy and very ad-hoc. BPF could fill this niche > perfectly with it's kprobe functionality. We could make sure errors are > only triggered in specific call chains that we care about with very > specific situations. Accomplish this with the bpf_override_funciton > helper. This will modify the probe'd callers return value to the > specified value and set the PC to an override function that simply > returns, bypassing the originally probed function. This gives us a nice > clean way to implement systematic error injection for all of our code > paths. > > Acked-by: Alexei Starovoitov > Signed-off-by: Josef Bacik BPF bits: Acked-by: Daniel Borkmann From 1583463755336960738@xxx Wed Nov 08 02:38:34 +0000 2017 X-GM-THRID: 1583463755336960738 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread