Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3117525imu; Mon, 17 Dec 2018 13:41:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/VbCOitdgHlr/IVsylUyo9w987PIaC0h/C8kJVQtXXiXjzRoJ4rLtXFbw+33JdESwVL9CU0 X-Received: by 2002:a63:2109:: with SMTP id h9mr13465245pgh.277.1545082882891; Mon, 17 Dec 2018 13:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545082882; cv=none; d=google.com; s=arc-20160816; b=PL9MS5QoWi8QfCEMGe5qJ2lHYAkOzAEijETjhJdxl5JoSPQJElyfAj8qawgSi7SPcN MkP5FycUGGKSrJV/yAg2eUqcrpUiYZZlFudyewmpmWnPFzxl4shv/yHwOFsi2qZJkpiZ Wu1F/Ny6aKtfP1CfF3qJXQPHXfV+LDnNl0E+nKCsg8sm/j4Nfzl3V44u6+ozpXuEtQ7p sVAsCtBk0t+dcikxFQvRLdWSHY3Bof99ux4Z4GQ82eQGqBu876dx4cA3APOk9Lx1CEnp nnl2t+mmCS4LF5jl/gkFrdrmkxhSiXmsoHxzku2Ut+vXd5JsTEkopOqJivQilGk8ksJO iFWg== 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; bh=mdJO9dRdcc14vQPI4d+nrweP3nkAcrM4cEjxwBUibnc=; b=Q9ukVEcq4zCn9d4IoNyjTJsVbg86hXY41Ln3QBM6U3D1QjHR2trEHyCuN8+dlhXDIX B6EaZgih13kRKyB9FXGkfqsJXzM2AE6ggtc2uZ/0KZy6dXz5Wq34qo3lwGQ7w4TtmVku 8F175sF6tfLDcUTfFTKHJK9BlQzEH/VRgSt+9tFkyIaFuxHXgMyCicGjzzxoP+Iz6NW7 Dh5ui0F8tVFHX+CldVJkZX2Bf/DSELQ5ZJ/wvjKihrD7jnARpLBT/4m/bjsWqWBr5FWF aKQGUfXzY51zdRampeDfMDGFamsyu9RYyYKV0PpIn2viceAAW1DmcS6t4OUGLmxrWnbB LDsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eDrvYVZc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si11517556pll.201.2018.12.17.13.41.06; Mon, 17 Dec 2018 13:41:22 -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=@gmail.com header.s=20161025 header.b=eDrvYVZc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387777AbeLQPrR (ORCPT + 99 others); Mon, 17 Dec 2018 10:47:17 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33380 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727617AbeLQPrR (ORCPT ); Mon, 17 Dec 2018 10:47:17 -0500 Received: by mail-wr1-f68.google.com with SMTP id c14so12803163wrr.0 for ; Mon, 17 Dec 2018 07:47:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mdJO9dRdcc14vQPI4d+nrweP3nkAcrM4cEjxwBUibnc=; b=eDrvYVZcaHZfvHG4Rkr95qlPNvV+SsRYQ+mXtCo5Ozsrm0FfXTY7MXHZ9fA5ubmRHG tE62cqbu7EWVferRgbu96b5LsjnNirIZwXiVy6Prmp72WIsQpGMlnL7AG8muDnx58FPO wHjJLjOViYdeMTFsuw5JLkNHCetxjqepvm4lkvpTrm5vCeQ3Wr7b5oBmXpSIdZsLSANp eifu6wRd/cc2kVSvgOFDSEm3PX+ZGATMru17qiYLCxhE06R8qFMldUc6sXzRdoOX6ThT 9QuHHHjQrNXQmPCBQrFF0rHPfd8BgSvI0ji4NAZhik3ngTCCRU5mkDmKXw5TpCmdIXW+ qVPQ== 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=mdJO9dRdcc14vQPI4d+nrweP3nkAcrM4cEjxwBUibnc=; b=FtKfw54jR+WqbUQm4gCcnf7EoGxyYtGVSwYPjCr86vE1CVBOINLftioha8gTq1XV2U vKhuGzGfOh6rDFT1JLaw8mcHQUzlr2BpQmOoub3VhZ4MIgxRfxDlM74uaNe1iTl+4kTR GOWRzXS+uYnyjTWm+AqvFZG2xVhgTvhROE5gL/VEzcnMhGsVLS8yH+q/AXPitH+u0oJ5 DcDR57BJbG4TrOQ2rPHlnrBo5kDmpRNQc9HvHL5j6/U3G5EpMHOXqmPaJeeiwYvR9nTp wmekHbEA8RMQvr5vPXDtvULwE2KrWMSSRcmYS/mUMQBfe578K1vqlQn45qmbJNDpszIj SgEw== X-Gm-Message-State: AA+aEWbq3yy+tRpiMyqwmdqnpFWOydMZvOIIbF6l7EWx8a5hd5Ano91X iRutArK8WB6xcEyR5KrG1Q== X-Received: by 2002:a5d:528e:: with SMTP id c14mr10942910wrv.236.1545061635383; Mon, 17 Dec 2018 07:47:15 -0800 (PST) Received: from localhost (host171-129-dynamic.1-87-r.retail.telecomitalia.it. [87.1.129.171]) by smtp.gmail.com with ESMTPSA id y12sm10262661wmi.7.2018.12.17.07.47.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 07:47:14 -0800 (PST) Date: Mon, 17 Dec 2018 16:47:13 +0100 From: Andrea Righi To: Masami Hiramatsu Cc: Ingo Molnar , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" , Yonghong Song , Andy Lutomirski , Thomas Gleixner , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] x86: kprobes: Show correct blaclkist in debugfs Message-ID: <20181217154713.GA1308@Dell> References: <154503482486.26176.6224515860220847638.stgit@devbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <154503482486.26176.6224515860220847638.stgit@devbox> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 17, 2018 at 05:20:25PM +0900, Masami Hiramatsu wrote: > This is v2 series for showing correct kprobe blacklist in > debugfs. > > v1 is here: > > https://lkml.org/lkml/2018/12/7/517 > > I splitted the RFC v1 patch into x86 and generic parts, > also added a patch to remove unneeded arch-specific > blacklist check function (because those have been added > to the generic blacklist.) > > If this style is good, I will make another series for the > archs which have own arch_within_kprobe_blacklist(), and > eventually replace that with arch_populate_kprobe_blacklist() > so that user can get the correct kprobe blacklist in debugfs. > > Thank you, Looks good to me. Thanks! Tested-by: Andrea Righi Side question: there are certain symbols in arch/x86/xen that should be blacklisted explicitly, because they're non-attachable. More exactly, all functions defined in arch/x86/xen/spinlock.c, arch/x86/xen/time.c and arch/x86/xen/irq.c. The reason is that these files are compiled without -pg to allow the usage of ftrace within a Xen domain apparently (from arch/x86/xen/Makefile): ifdef CONFIG_FUNCTION_TRACER # Do not profile debug and lowlevel utilities CFLAGS_REMOVE_spinlock.o = -pg CFLAGS_REMOVE_time.o = -pg CFLAGS_REMOVE_irq.o = -pg endif Do you see a nice and clean way to blacklist all these functions (something like arch_populate_kprobe_blacklist()), or should we just flag all of them explicitly with NOKPROBE_SYMBOL()? Thanks, -Andrea