Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp846491pxk; Thu, 17 Sep 2020 18:52:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1kmFwLJk6isyBVWG6VLCiT85pa6PhAu2vkAM/zNvIzOe5JuT/0DIN9ytx3jqPyoHk5bSm X-Received: by 2002:a17:906:b0a:: with SMTP id u10mr32934693ejg.226.1600393927093; Thu, 17 Sep 2020 18:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600393927; cv=none; d=google.com; s=arc-20160816; b=RRGVAwfK5Z85mU3SOx6LTrqY6Xi5Mz7jj+lQ4KhgwdPDhNR6/BAEwsEB9mQK4ydxVB EO5/NQ/8ep/HkQa7hVII4LRIfdL/ood+XKZBjQ3yu0FJY9HHUi2/IiIZaoijbqH9qKQX +/GBe40VwD/yzUpmComOL8Grnlb7SWufa4mDDpyg/bkzLMY3oV7dbp2jsePEJk5JGEte d1+bjTVoJ1UlcgoF8BYsgX4mCRiqF6Wd1nju659eybvPeUXPhSppgVRfjpQYKBXXZdMI p9RgCXLOE9JWCsW2Lin+wUCfMYwPLjh3oOHHX0/7iBwzUidX0b21EHpeS6ziVJwEsTvx t9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=EJGVCqOykZOivl/vjT4Ps8DYatJzcleSpkwzoeMx41k=; b=A9ZyrL4nv+QehVr2/o03chPyd+dELQVKzmky5K3OWSu9dUTsbzzb2UmoSOluzAfD/N iA9nizNeaQjlSi/Z4wNpTtCg6rej54z93X9bl8ISkUb5A4GkLjX9ztULhqmugkHHkrxB 2X7t2mMO7xvBkTsMLOyWj7gp866Fin3BZ9zqdEfegH88CQDWFLTR3xnk4S5ay3hTT06Y u9foUc//IEGIKBxFKcwi7c1yy5kyOeeSbyf3J0q1iFXR6l35S5sJkgBpvzv2BToMoaWn nIn9Hd3uorWik/tEHqQ4VTSE53FAa3wXnDeXRiB4PTzs40mp2osq/nSa8xGLp6poqk7B HiFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si1092653edp.549.2020.09.17.18.51.44; Thu, 17 Sep 2020 18:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726262AbgIRBr5 (ORCPT + 99 others); Thu, 17 Sep 2020 21:47:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:43414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbgIRBr5 (ORCPT ); Thu, 17 Sep 2020 21:47:57 -0400 Received: from rorschach.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 11A1B20872; Fri, 18 Sep 2020 01:47:55 +0000 (UTC) Date: Thu, 17 Sep 2020 21:47:54 -0400 From: Steven Rostedt To: peter enderborg Cc: Paul Moore , , SElinux list , Stephen Smalley Subject: Re: [RFC PATCH] selinux: Add denied trace with permssion filter Message-ID: <20200917214754.4242c489@rorschach.local.home> In-Reply-To: References: <20200824132252.31261-1-peter.enderborg@sony.com> <20200824132252.31261-2-peter.enderborg@sony.com> <6cbe5d27-ebb2-70a6-bad4-31c9f310eff2@sony.com> <59fa190f-37c0-79f3-ea46-8f821d820e1c@sony.com> <000e6a1b-6026-5e99-9a92-6ae9aafc07d4@sony.com> X-Mailer: Claws Mail 3.17.4git76 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Late reply due to long vacation followed by drowning in the email built up from said vacation! ] On Tue, 1 Sep 2020 19:18:46 +0200 peter enderborg wrote: > No. It can filter on strings. But it can not do any fuzzy matching. > They are equal not not equal. So if you have a parameter value > that is { open read !write } you need to specify a exact match. That is not actually true. It allows globing in filters. # trace-cmd start -e sched_switch -f 'next_comm ~ "c*"' # cat /etc/passwd # trace-cmd show # tracer: nop # # entries-in-buffer/entries-written: 3/3 #P:8 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | kworker/2:1-2137 [002] d..2 9263.286132: sched_switch: prev_comm=kworker/2:1 prev_pid=2137 prev_prio=120 prev_state=I ==> next_comm=cat next_pid=2146 next_prio=120 -0 [002] d..2 9264.390089: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=cat next_pid=2146 next_prio=120 kworker/2:1-2137 [002] d..2 9264.390440: sched_switch: prev_comm=kworker/2:1 prev_pid=2137 prev_prio=120 prev_state=I ==> next_comm=cat next_pid=2146 next_prio=120 Thus you can filter: "foo*" - everything that starts with foo "*foo" - everything that ends with foo "*foo*" - everything that has foo in it. -- Steve