Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp497762rdg; Thu, 12 Oct 2023 11:33:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECSpxiW4IrrlTy7w/iiBgtlQFTbh/GcSDSqrNzmHl1bjnc5WUalJGV0MzO+XK1WWtqMvrF X-Received: by 2002:a17:90b:384c:b0:276:caee:db4d with SMTP id nl12-20020a17090b384c00b00276caeedb4dmr20766750pjb.10.1697135605483; Thu, 12 Oct 2023 11:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697135605; cv=none; d=google.com; s=arc-20160816; b=LG0KHpnLm2995p7nCaq+JzeE8nhst4vPszHggXxLfM351/U4TvNkNyjqx21sVQKtDv kdEJOmZ3KcDIgtQ0+ZUkxbKPje7L7fqQLv79gQgHDkbK6BgOqPe6a30y31NfMRvD9YmN eqp9tIYSgPEI9qrUKn2zROfFARjbiVnKLHfOgiHKAeHoYmWRxkVZFhd8tIPBRB9300gF 0YdIrqCBVOdCWkkO/IGUE3qWQ+reG9v7y2N/u/7Dh7r4xyjvn4nIOXO0hPSicB4JcOeA N0r4469AWbI5NV60g99DBK+7W778aQmduuuqwf/9jZRfmGJXlsQVYAZSnHshe4tf8Czz nPdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=5Yt4HEDKKo6+d4XZeN0QMyHve5mG55+QEMOQYKa6AoA=; fh=Wib+XfiOo+Du8pUFY3cxbcKn04jbAU1MgTSL3fqXENw=; b=W6il9dY5XOwQOs/rP+eqTy7dFRmvZ1CQDr26cPCNQKMqkHyBJc8hGB5AfrKljisWa2 Qa1klwG+3LejlZCYbmYadDabjDYhsvrCQ7rbxkEsTS7kOTg1yHSmWbLcuIRKwsHzjkdC XL8CqTNcqy8I1BtpVUmWKOnAevsTiFR8OHSUeLvjWni7n3nb0PqsKZO6iAUz7F6UjiXA iN7al2tcIvq4xuk4q0fKr3z9/ZWOeoZc29TIZkQSWtbyMp6DBVhi1KidYrqjJ7EH8NiA W7S746slcj8QZfaMQIZv0rg+qvYitj4br9CdmWvOWCZviCVh1c8dqjnEKBcQGhHTKugU WknA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GEchmT1H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ei17-20020a17090ae55100b00273ede74018si2803221pjb.187.2023.10.12.11.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 11:33:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GEchmT1H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0E11A81C46DF; Thu, 12 Oct 2023 11:33:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379577AbjJLSdM (ORCPT + 99 others); Thu, 12 Oct 2023 14:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344128AbjJLSdK (ORCPT ); Thu, 12 Oct 2023 14:33:10 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7606BE; Thu, 12 Oct 2023 11:33:08 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-53df747cfe5so2420514a12.2; Thu, 12 Oct 2023 11:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697135587; x=1697740387; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=5Yt4HEDKKo6+d4XZeN0QMyHve5mG55+QEMOQYKa6AoA=; b=GEchmT1HUyrD5ndeq8eQvC4BXcid0V1eA3aPYnpS7ES+aKQcQmmO2Bynt6+9yNHmKE iR3DQgoZSlD34fWpxu4CBiMFTIx/l1WxkIGSu8EHjG6VkoBxMvy4uzCXrzY2F13leE/U 7dBvnXP6QOYaHaGYzSLle43vxlp44JpkyBcyw47/f5DIABXVX3ynzfCJqOh8zyS0a/Ic AWAw/LzJc6ILx+E9OIeMs1AfwAZdrMlnrIrpkp3eMba1BBWs9e30RowUKOPIDQTSQaHJ msVINpDGZopk+ZhU/109zHYlgO4LoFIBMRd2KUMraEEo1T6aZlNFX+o5cL7gJi/O5QNC tVYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697135587; x=1697740387; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Yt4HEDKKo6+d4XZeN0QMyHve5mG55+QEMOQYKa6AoA=; b=P0XRWzf2MAuTTlOXFvbPz8UYaoVpg8t5p/iC5jSK0jWJ/jgGJ4O354nXY+DUh5rkaH oNmXFgNTCn2KCOHoCllXymsAL+EZIWEBHFQNYKRFSizrXUhQHde+mxWpME0zijajcF2p k110HO2OzGjNWcrip7A/4gxyqI8gHVltMypW2b4G96qhceKGCrxZpjqf2c+7G1E8s4yI 8Y6Y4DRBGQWp6ZZi/iowSASwEzgnu0Jt+Cpx0otYm+LLce+lyR0viAvGQxKY9a4FmTmq szy5TUH7n0/UYAuUdwDqg8Zy2OvxFi8uXMBnRkVLtcFbjBbr5Kz6OiSSbq2UCQjRLXhG GRuQ== X-Gm-Message-State: AOJu0Yw96VPI1aNA6WDH3a14qWzP4EN/y/KIwBusE2FkopA2XAFxi1oo pSqnZgadrMCJzRhRC+5nvoo= X-Received: by 2002:a17:907:b1a:b0:9b6:5a86:2926 with SMTP id h26-20020a1709070b1a00b009b65a862926mr20502640ejl.62.1697135587281; Thu, 12 Oct 2023 11:33:07 -0700 (PDT) Received: from gmail.com (1F2EF405.nat.pool.telekom.hu. [31.46.244.5]) by smtp.gmail.com with ESMTPSA id b13-20020a170906d10d00b009930c80b87csm11532318ejz.142.2023.10.12.11.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 11:33:06 -0700 (PDT) Sender: Ingo Molnar Date: Thu, 12 Oct 2023 20:33:03 +0200 From: Ingo Molnar To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Peter Zijlstra , Ian Rogers , Adrian Hunter , LKML , linux-perf-users@vger.kernel.org, Linus Torvalds , Stephane Eranian , Masami Hiramatsu , linux-toolchains@vger.kernel.org, linux-trace-devel@vger.kernel.org, Ben Woodard , Joe Mario , Kees Cook , David Blaikie , Xu Liu , Kan Liang , Ravi Bangoria Subject: Re: [RFC 00/48] perf tools: Introduce data type profiling (v1) Message-ID: References: <20231012035111.676789-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 12 Oct 2023 11:33:23 -0700 (PDT) * Namhyung Kim wrote: > > Could we perhaps add an IP filter to perf events to get this built-in? > > Perhaps attr->exclude_user would achieve something similar? > > Unfortunately IBS doesn't support privilege filters IIUC. Maybe > we could add a general filtering logic in the NMI handler but I'm > afraid it can complicate the code and maybe slow it down a bit. > Probably it's ok to have only a simple privilege filter by IP range. It will still be so much faster than moving it through the BPF machinery, and bonus points if we merge this into the existing privilege-domain filtering ABI, so no magic 0x800000000000 constants are needed. 'Overhead' to other usecases shouldn't be much more than a single branch somewhere. Thanks, Ingo