Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp560354rdg; Thu, 12 Oct 2023 13:46:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFepevSXVTdhx/bs0jZAl1t2rCKkAa/im0mHBrvaKshotudtU7m1yQxcZqGgAVxKxqpblyb X-Received: by 2002:a05:6a00:3693:b0:693:479f:bd1c with SMTP id dw19-20020a056a00369300b00693479fbd1cmr28190678pfb.1.1697143601828; Thu, 12 Oct 2023 13:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697143601; cv=none; d=google.com; s=arc-20160816; b=qZxP/WHeGjByKCcD59ygysXUApmOQWxXa/nl8fbRGcVqz8fW/p8AUNsDcSRNRS3p54 4SomYkzxED0z2P8f2QhL5y9CspRT3F1cIZh55W2HuBlcrLUsGi0AUI36uApUNaiq1GId oekGgSic+jRHwLA0tqidcDN1RdUbE4jsRmQK32/89WHfr3XjxR17TREp1hRsxEzRumVU j5bPQ/pv0z19WH0mmuhenwsENAZ3ejX1YFkmO5Zxkv0fNzynC6LmTe4+7q/3Y2VNt9VM Et/4vTxKD8ickDYiPjwXoQPFWbLrQr2QUwzoAv1xgs4Bp5mICEOpKEwVWt1hvT/4zKrk ZAtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=lfatCS/sZu3/DT+w/IutoTABxDbadEQsx69ws07dpVQ=; fh=+LnW9RCJuKMdVT8iSCsiB50xRf+5s2MGTpVeGRhX+sQ=; b=NQjOsvYAWuZ56MWzHX1MB7uVfK5V1G5wTG0eWVBj1JbMX9tbORWbAyYAQoVkGfuv4d IBdBLgNUXHdAZlYseETYCc9tLUMJlI5p6NyH2be5MYArEnHpdIIQKNoaha+9OKkyiaGy dDRXn6Oncu83yvYaYAVxWBcmT7kvyb/MSc5KccQHI/SyiLUOiRmfYD80zEqDNw+lAjYZ ux59q73X7cIzxd+lvSuqMTxnq5ZG6L68Hp07+Qz9IYM0OvtFCN2cmHGEOaL2J+wfW4Q4 TYn8k3yYyZzLKQq+q+j9eG3+qaO6J0XpT3gCvJ3Zo6G3b4MZAuMmcpF6p1vulwIvfrwp KRQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bz23-20020a056a02061700b0057748a05fcfsi3031991pgb.27.2023.10.12.13.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 13:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 1B007807C742; Thu, 12 Oct 2023 13:45:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442372AbjJLUpS convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 Oct 2023 16:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343782AbjJLUpR (ORCPT ); Thu, 12 Oct 2023 16:45:17 -0400 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDA39C0; Thu, 12 Oct 2023 13:45:16 -0700 (PDT) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-690d2441b95so1052526b3a.1; Thu, 12 Oct 2023 13:45:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697143516; x=1697748316; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pxBM1WL5YWehdPAMO4b4zshfBpUnsTGMOdYs0eBjj/w=; b=lLZEUKtqOpwzuxc9E4pKErfnIrhMUb4GXfRoUPSP2OpjCeet3XB/MxiwAvbZCJFxmz kMpcVuUeueQ2Y08tZ10xeIHwTgMWdOJOkDr5xzS+8QHbe7dhkaXIdr0Uzr4oZhDaZhXq BBxn1a2utTH0OYXl0MX3jWfrbqFM4h4PCxRf290SUAvdl7ZfxQDDp+JjhqdR8pntknFL TChy446uJ/+0xAl2Ldmctno7oECEj7wnkf9k1tbv3BL6tE79bGUaxWYtZfePoDwqau4Q 7i8gDLA0OX5UJ7NoZg10+pWC6aEUlE9vqPKIz8WaCuu5KMszQKR2w2E6bPMjANfS7mli QPCA== X-Gm-Message-State: AOJu0Yzn5KbrQdQTs9EX8XMieXJtUXDfnd9TW53mQqaK1CTIXPCG+tol vw67CXrY0Bb7vrtT3W/AcosJEF41NzzfNmhHo2zPiHlJ X-Received: by 2002:a05:6a00:238d:b0:690:f877:aa1e with SMTP id f13-20020a056a00238d00b00690f877aa1emr38987459pfc.12.1697143515938; Thu, 12 Oct 2023 13:45:15 -0700 (PDT) MIME-Version: 1.0 References: <20231012035111.676789-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Thu, 12 Oct 2023 13:45:04 -0700 Message-ID: Subject: Re: [RFC 00/48] perf tools: Introduce data type profiling (v1) To: Ingo Molnar 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 12 Oct 2023 13:45:29 -0700 (PDT) On Thu, Oct 12, 2023 at 11:33 AM Ingo Molnar wrote: > > > * 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. Ok, maybe overhead is not a concern. But users need to pass the filter expression to the kernel. Thanks, Namhyung