Received: by 10.223.164.202 with SMTP id h10csp3483499wrb; Tue, 28 Nov 2017 12:03:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMakS4743rJcVTYFAokIgPnUmGZWZlMvyBue+bw815wu5l0S3bDfvjOvDhHxyhZXbwXvnMkD X-Received: by 10.159.218.144 with SMTP id w16mr293950plp.443.1511899431959; Tue, 28 Nov 2017 12:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511899431; cv=none; d=google.com; s=arc-20160816; b=GkBpvQk+H/HH7fHCGpPHIVEbLUbY9RPUCR4z7UGDmiwE+NiErwqh9eqzHm4sLe5eq+ 9UV6yn7r/vvJOt+OQE9WrYL5cgdT1Pzsc1TdS6qdGBHhUO5utIKalb1NlfDmvV/BxYOd AvIjd/9S6eXG+vDDlCNkCLSxpOlJTsXCh8yDt2mZsk6pNY5cmuFMpL67UEccLPcd3ol/ H3bu6kOglPBswiBL1ZhfZIsD65j7OiBlLZlrCxNSLa/ATYQYQxHTc7EFI5L3kV5qvOfx eJgcS0vjJ5pd6a1gVaf3Zrh93TjSLu87VYlabtbu+vftbvzBzy62i3LlPAoB0ZRKOUNa ph1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=IgDcmh/JSJ4ROjV3JRYuFlQ+uVDxqWZUq09AJwuXPpA=; b=Cy/M6RZjTISIgeVVFQO8zR4sqo1ETsbUoYABaQNhpR22PDOhj7ZXx8nFouM1yfdalo QO+GjvpqOVANP7KTxR+HPWHidX0v+aPmCJ0pKngW+7LHmIBjyBj8J0jf3fovuEVLAHy9 nDS+Qu2zxgDSsu2xh3u9NQ3epZm2eR0RQULdoGhYdQTdEgQybJtQe6R2g+6lmsbsxU89 na2GETICmzvigFrTi8EswqhtpK7p4gqluUEADFVROBuQRbJa6PiPjzaUZHDVFHc7tvZu p4U1R38TGo9bZ6xx0ioI22sKmeTeKzWdDv0bJcPNwMoRUIlGQF93pmQYzfP1d+XLftS0 o6NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=j9eFz24B; 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 h192si24948239pgc.152.2017.11.28.12.03.40; Tue, 28 Nov 2017 12:03:51 -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; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=j9eFz24B; 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 S1754219AbdK1UCq (ORCPT + 70 others); Tue, 28 Nov 2017 15:02:46 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:37948 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752903AbdK1UCo (ORCPT ); Tue, 28 Nov 2017 15:02:44 -0500 Received: by mail-qt0-f193.google.com with SMTP id d4so1471623qtj.5 for ; Tue, 28 Nov 2017 12:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IgDcmh/JSJ4ROjV3JRYuFlQ+uVDxqWZUq09AJwuXPpA=; b=j9eFz24BtKWoy8mIR2kMjDDv3kPX0w9z0PH7cxLAGinVU3MpDNaNv+urF63sPRy93k qYlYLLUh5BvlOIV4bj3SOHLXKgLzGNgCXWkrLAwHCTaImHnT0hieZZeGta18TtNgLBlJ 1kurOFEsObh1exObjuBJWs2tyZA0Vqb2Wtf8lM/YbX48ZtS1ChvZm5DVJa93SfSj9E1j sMJrSLn65/xHfToufNoSP3AXEN+zuyGuUvCNGcIcyKp+Ufo2UJ/R+POR8nTixkowK7jE 2Ou1N3gkUTPJROd4nN0Qpn/0XYyQQeOHB4pNx7qeMJx3Fx83BsIX/XSlzBvE3ZfbA7Wv W89g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IgDcmh/JSJ4ROjV3JRYuFlQ+uVDxqWZUq09AJwuXPpA=; b=gvP2s/vRAMx0zMpCDyfCrB+boPwEI6ocAjDYnAmxKKEZu/5ho3evnbkzvE5793tx2j dKi1BhBSEOvrLg9iyMF7yHEMq+GsTxHq+SsE86ndVk05n/C4V/2rY9e2XEc3M7/8Pdqe uXGnQWvKRjaTaxkIWg56m1bdGxCani88t4CnSbNej/ZCZlyXUdpIAes4VLHOhKg88yHs StdCAnPRnLfphxyP9MGPOXhJy2V32dHDonqXkHDLbRwxaLCRdSA7+MAPqiEJjIhWJGUD 2jv38/x7QAh4w9+4BkV9usoHJFqQrbDF2K9Nd+ixUTyRJTTHyB82Av+wSXtkxYlSRDr9 VV5w== X-Gm-Message-State: AJaThX5eWAzSgqx6s/XBDCE3K6WPyxTZHvyPhUDCfcNMmNr8t5sQT5CG P4S6Bls40g2M2Qys1Vq8pVQ2cQ== X-Received: by 10.200.52.216 with SMTP id x24mr646921qtb.270.1511899363913; Tue, 28 Nov 2017 12:02:43 -0800 (PST) Received: from localhost (cpe-2606-A000-4381-1201-225-22FF-FEB3-E51A.dyn6.twc.com. [2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id k75sm23911009qkk.19.2017.11.28.12.02.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 12:02:43 -0800 (PST) Date: Tue, 28 Nov 2017 15:02:42 -0500 From: Josef Bacik To: Jonathan Corbet Cc: 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, daniel@iogearbox.net, linux-btrfs@vger.kernel.org, Josef Bacik Subject: Re: [PATCH v7 1/5] add infrastructure for tagging functions as error injectable Message-ID: <20171128200241.tr5d6a2obvxl6inb@destiny> References: <1511385814-20863-1-git-send-email-josef@toxicpanda.com> <1511385814-20863-2-git-send-email-josef@toxicpanda.com> <20171128115841.4958113d@lwn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171128115841.4958113d@lwn.net> User-Agent: NeoMutt/20170714 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, Josef From 1585337407927604919@xxx Tue Nov 28 18:59:28 +0000 2017 X-GM-THRID: 1584803075397522780 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread