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: <20250408123306.5477f30c@gandalf.local.home>
Date: Tue, 8 Apr 2025 12:33:06 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Andy Chiu <andybnac@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
 mark.rutland@....com, mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
 bjorn@...osinc.com, puranjay12@...il.com, alexghiti@...osinc.com,
 paul.walmsley@...ive.com, greentime.hu@...ive.com, nick.hu@...ive.com,
 nylon.chen@...ive.com, eric.lin@...ive.com, vincent.chen@...ive.com,
 zong.li@...ive.com, yongxuan.wang@...ive.com, samuel.holland@...ive.com,
 olivia.chu@...ive.com, c2232430@...il.com
Subject: Re: [PATCH v2] ftrace: properly merge notrace hash

On Wed,  9 Apr 2025 00:02:57 +0800
Andy Chiu <andybnac@...il.com> wrote:

> The global notrace hash should be jointly decided by the intersection of
> each subops's notrace hash, but not the filter hash.
> 
> Fixes: 5fccc7552ccb ("ftrace: Add subops logic to allow one ops to manage many")
> Signed-off-by: Andy Chiu <andybnac@...il.com>
>

Thanks.

I'll apply this (currently testing it along with other fixes), but I
realized that this isn't working as expected.

I did the following:

  # trace-cmd start -B foo -p function_graph -l '*lock*' -n '*clock*'
  # trace-cmd start -B bar -p function_graph -l '*sched*' -n '*time*'

And then looked at:

  # cat /sys/kernel/tracing/enabled_functions  |grep clock | wc -l
  176
  # cat /sys/kernel/tracing/enabled_functions  |grep time | wc -l
  37

Which means those functions are still having callbacks even though nothing
is tracing them.

What needs to be done is to filter out the filter ops from the notrace ops
before adding them to the main ops.

The main ops shouldn't need any notrace hash unless all the subops hashes
are the empty set.

What needs to be done when adding a new subops is to:

Copy subops filter hash:

If subops filter hash is not empty:

1) Remove all the nohash functions from the copy.

2) If the main ops notrace hash is not empty, remove any of the functions
   in the copy from it.

If subops filter hash is empty

1) intersect the notrace ops with the current notrace ops

I'll write up a patch on top of this one.

-- Steve



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ