Received: by 10.223.164.202 with SMTP id h10csp1819478wrb; Fri, 24 Nov 2017 01:50:41 -0800 (PST) X-Google-Smtp-Source: AGs4zMYfM43kVZnTCtN2vRclPeX+oZcb76OoZ53+/+D+OfA4cfbiZW+E06Zg5dr2r3RaFvxiuds7 X-Received: by 10.101.80.70 with SMTP id k6mr27472682pgo.149.1511517041041; Fri, 24 Nov 2017 01:50:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511517041; cv=none; d=google.com; s=arc-20160816; b=F1DS498V9nLe1xfNlYn+jVLbKn2s0QSOxRl31j6kkKF4pKtmy+JjUuLQIbXCyCz+Yy lyMppsdAOq7lB/0J3KayT2t/jBaEZlWFgH4sizTQzhm5B94HtSvyDvE5toM7alNnyFvc xqvQqvWIyz/S1TJ22PKg+bbvdQv9G6VFjh/V7LP/Os1QGG7hvO5evQ97CkfJE8CGZog/ 85cgJaXb1j5JkC6+qfz8k/5Xf4XHcBSeKGyY3spR5rbsvSMWjyTAD2b+C7ap/qgL+YHd DoVhme2r6Cb2JM01z5YhLW2eL0aHbq7Un+NwD0VTSZX6xUtD6QywBp4ZE8/l7pAUql9V EBIA== 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=ZoXMALEe6VxdKnfOwipweQdHC6+mQNK4YE3+MG/mwBA=; b=OVqKoUsNwrxySeHE7KXd8SPZK1ivbM1p8bc0THjfqzS7+FuL1sqRX694pZfhkbjWht gtFqqckhxs8xOA8jYeYpHYBbgKVy8Uu7q18sM/Lxly+bchbJSxxcfeE7mZJSHQCL0J9a Jg0fxXJ3zhDxQKBc3otIIIJBpUgcvUOVOfxm5hdlksmh0gIZ28mkgQjyq7s2SreQ1MKf 3rxgqCcNBFCvQ3TUTF/KSEDlIoVYpb2bTBLoXR0K2npSxVTOoCpdjP8mEq7lT5BkBwjF uKB5fhWWgjFoi1fafM1J61j6QkRr+9AvEfhyZqgZH7j0OSwme62H43qf5hHBGuHEAGoG BZ+g== 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 3si3520691pld.485.2017.11.24.01.50.29; Fri, 24 Nov 2017 01:50:41 -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 S1753353AbdKXJqi (ORCPT + 76 others); Fri, 24 Nov 2017 04:46:38 -0500 Received: from www62.your-server.de ([213.133.104.62]:44231 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbdKXJqg (ORCPT ); Fri, 24 Nov 2017 04:46:36 -0500 Received: from [194.230.159.144] (helo=localhost.localdomain) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1eIAZ4-0004i9-0w; Fri, 24 Nov 2017 10:46:30 +0100 Subject: Re: [PATCH v7 3/5] bpf: add a bpf_override_function helper 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, linux-btrfs@vger.kernel.org Cc: Josef Bacik References: <1511385814-20863-1-git-send-email-josef@toxicpanda.com> <1511385814-20863-4-git-send-email-josef@toxicpanda.com> From: Daniel Borkmann Message-ID: <9b416c77-33f8-dacc-82c3-811a265155ed@iogearbox.net> Date: Fri, 24 Nov 2017 10:46:28 +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: <1511385814-20863-4-git-send-email-josef@toxicpanda.com> 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.2/24068/Fri Nov 24 02:08:32 2017) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/22/2017 10:23 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 > Acked-by: Ingo Molnar > Signed-off-by: Josef Bacik Series looks good to me as well; BPF bits: Acked-by: Daniel Borkmann From 1584803032929187182@xxx Wed Nov 22 21:25:49 +0000 2017 X-GM-THRID: 1584803032929187182 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread