Received: by 10.223.164.202 with SMTP id h10csp4610587wrb; Wed, 29 Nov 2017 09:00:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMY2z085BcuvS8j0w2G3dA/03txICiTlTEZkjG+90Rf7IX3m9zSQyM6kCWQq3wtpBoamMSva X-Received: by 10.84.234.9 with SMTP id m9mr3581120plk.436.1511974850602; Wed, 29 Nov 2017 09:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511974850; cv=none; d=google.com; s=arc-20160816; b=KxiM7eeOomNUqDzoJY0E85UrdPu/6pZQtagn1eFVrCWiJYquHblrhlD0gamGuePqtq EZgdH7Nh9bY0p0UzbegZBKAEJbIinWJuxl0SwRf2aSAH6UFC0bGXjedPR5UmDo+LNZH7 U2Um1K1fSS1C3AA3mpSECF0l7bepHhF86rn0qJ0la/rE4AWN8PS44tXgDeuzKIZxMM4a eUo2EKmnsq3e8li2mmSae/EF/eyx7e7hpNvfAxcrwPvXKDh6SUO1zIpH2IwNHldpoO8P J2Kumrw2sYhvOivsWqj8gz347FvxxhPz0yJU53S5pdYmcmPmAO35lS5KwSiBgKr9hDbW uvCg== 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=TKiDGaLU+qh3QBrtPqp56XIWC+nAAhKAOOcjAhvFYM8=; b=cIn8lZvBrsrDcXeDlhZVaaatE/dSNGLl/8nGm2TE5SNbNjG9/YsTbDisveLjzGJQVa L87KkXHKDu3Ssv3GaQ1QZB4YJgxYf2CsPX6Hxbf+VmwjmXGay8PqnqczaZZdqRO0MTBr kKlgf/6RNs4qIfnaEaqgkW3cCMn/cj8oG3wgx+nkpJQHLVXbctgOUpIUy4vXu94JNaJ6 b605PKfQeEAnArQiErKStxO5ehXTpWu63EyInB2z3n3Y1oM2A3o0rcQuvwJ7D0Coe5F/ K4/TV6y3S5dcpZ3kmUJTuhOJYIY0hiZZ8LgDlHNPJKYY9XZcO2k/n33QQMrvwkjBxX21 Uqyg== 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 g13si1528289plm.520.2017.11.29.09.00.40; Wed, 29 Nov 2017 09:00:50 -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 S1755604AbdK2RAC (ORCPT + 70 others); Wed, 29 Nov 2017 12:00:02 -0500 Received: from www62.your-server.de ([213.133.104.62]:47293 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbdK2RAB (ORCPT ); Wed, 29 Nov 2017 12:00:01 -0500 Received: from [194.230.159.120] (helo=localhost.localdomain) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1eK5i7-0004Hk-Pq; Wed, 29 Nov 2017 17:59:47 +0100 Subject: Re: [PATCH v7 1/5] add infrastructure for tagging functions as error injectable To: Josef Bacik , Jonathan Corbet Cc: 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, Josef Bacik References: <1511385814-20863-1-git-send-email-josef@toxicpanda.com> <1511385814-20863-2-git-send-email-josef@toxicpanda.com> <20171128115841.4958113d@lwn.net> <20171128200241.tr5d6a2obvxl6inb@destiny> From: Daniel Borkmann Message-ID: <83414bdd-2e83-bc77-da90-33ee43b89a97@iogearbox.net> Date: Wed, 29 Nov 2017 17:59:39 +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: <20171128200241.tr5d6a2obvxl6inb@destiny> 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/24084/Wed Nov 29 10:02:52 2017) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/2017 09:02 PM, Josef Bacik wrote: > On Tue, Nov 28, 2017 at 11:58:41AM -0700, Jonathan Corbet wrote: >> On Wed, 22 Nov 2017 16:23:30 -0500 >> Josef Bacik wrote: >>> From: Josef Bacik >>> >>> Using BPF we can override kprob'ed functions and return arbitrary >>> values. Obviously this can be a bit unsafe, so make this feature opt-in >>> for functions. Simply tag a function with KPROBE_ERROR_INJECT_SYMBOL in >>> order to give BPF access to that function for error injection purposes. >>> >>> Signed-off-by: Josef Bacik >>> Acked-by: Ingo Molnar >>> --- >>> arch/x86/include/asm/asm.h | 6 ++ >>> include/asm-generic/vmlinux.lds.h | 10 +++ >>> include/linux/bpf.h | 11 +++ >>> include/linux/kprobes.h | 1 + >>> include/linux/module.h | 5 ++ >>> kernel/kprobes.c | 163 ++++++++++++++++++++++++++++++++++++++ >>> kernel/module.c | 6 +- >>> 7 files changed, 201 insertions(+), 1 deletion(-) >>> >>> diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h >>> index b0dc91f4bedc..340f4cc43255 100644 >>> --- a/arch/x86/include/asm/asm.h >>> +++ b/arch/x86/include/asm/asm.h >>> @@ -85,6 +85,12 @@ >>> _ASM_PTR (entry); \ >>> .popsection >>> >>> +# define _ASM_KPROBE_ERROR_INJECT(entry) \ >>> + .pushsection "_kprobe_error_inject_list","aw" ; \ >>> + _ASM_ALIGN ; \ >>> + _ASM_PTR (entry); \ >>> + .popseciton >> >> So this stuff is not my area of greatest expertise, but I do have to wonder >> how ".popseciton" can work ... ? > > Well fuck, do you want me to send a increment Daniel/Alexei or resend this patch > fixed? Thanks, Sorry for late reply, please rebase + respin the whole series with this fixed. There were also few typos in the cover letter / commit messages that would be good to get fixed along the way. Also, could you debug why this wasn't caught at compile/runtime during testing? Thanks a lot, Daniel From 1585341458720838391@xxx Tue Nov 28 20:03:51 +0000 2017 X-GM-THRID: 1584803075397522780 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread