lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141201214104.32d3f10d@gandalf.local.home>
Date:	Mon, 1 Dec 2014 21:41:04 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Theodore Ts'o <tytso@....edu>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Alexei Starovoitov <ast@...mgrid.com>
Subject: Re: Checking to see if a bit is _not_ set in a ftrace event filter

On Mon, 1 Dec 2014 21:19:12 -0500
Theodore Ts'o <tytso@....edu> wrote:

> I was trying to do something like this:
> 
> filter="events/writeback/writeback_mark_inode_dirty/filter"
> echo "(flags & 2048) && ((state & 2048) == 0)" > $filter
> 
> ... but that doesn't work.
> 
> This works:
> 
> echo "flags & 2048" > $filter
> 
> But the problem is this:
> 
> echo "(state & 2048) == 0" > $filter
> 
> The simplest patch to add this would be add a new filter_ops so we
> could do this:
> 
> echo "(state !& 2048)" > $filter
> 
> ... but that's pretty ugly.  But adding more general expression
> parsing in the ftrace event filter code would be non-trivial, and if
> we start trying to make things like "!(state & 2048)" or "(state &
> 2048) == 0", then at some point some crazy person might request
> supporting something like this: "(state ^ flags) == 2048".  :-)
> 
> So I guess the main question I want to ask is your opinion about
> whether a patch that adds support for the operator "!&" is too ugly to
> live?
> 

Yeah, I don't want to add some bastardization compare that we'll be
stuck with till the end of time. Either we modify the tree walk to
handle values (it shouldn't be too difficult, but it wont be trivial),
or we wait till eBPF is up and running as the trace filter replacement
and that should be able to handle this much better.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ