<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/leaking_addresses.pl, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-29T10:52:08+00:00</updated>
<entry>
<title>leaking_addresses: also skip canonical ftrace path</title>
<updated>2023-03-29T10:52:08+00:00</updated>
<author>
<name>Ross Zwisler</name>
<email>zwisler@google.com</email>
</author>
<published>2023-03-13T21:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d1c27c55427e3fe54c1bc22bd4d40fc21ff5406c'/>
<id>urn:sha1:d1c27c55427e3fe54c1bc22bd4d40fc21ff5406c</id>
<content type='text'>
The canonical location for the tracefs filesystem is at /sys/kernel/tracing.

But, from Documentation/trace/ftrace.rst:

  Before 4.1, all ftrace tracing control files were within the debugfs
  file system, which is typically located at /sys/kernel/debug/tracing.
  For backward compatibility, when mounting the debugfs file system,
  the tracefs file system will be automatically mounted at:

  /sys/kernel/debug/tracing

scripts/leaking_addresses.pl only skipped this older debugfs path, so
let's add the canonical path as well.

Link: https://lkml.kernel.org/r/20230313211746.1541525-2-zwisler@kernel.org

Cc: "Tobin C. Harding" &lt;me@tobin.cc&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Acked-by: Tycho Andersen &lt;tycho@tycho.pizza&gt;
Reviewed-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Ross Zwisler &lt;zwisler@google.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: Always print a trailing newline</title>
<updated>2021-10-15T09:25:13+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2021-09-29T22:02:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf2a85efdade117e2169d6e26641016cbbf03ef0'/>
<id>urn:sha1:cf2a85efdade117e2169d6e26641016cbbf03ef0</id>
<content type='text'>
For files that lack trailing newlines and match a leaking address (e.g.
wchan[1]), the leaking_addresses.pl report would run together with the
next line, making things look corrupted.

Unconditionally remove the newline on input, and write it back out on
output.

[1] https://lore.kernel.org/all/20210103142726.GC30643@xsang-OptiPlex-9020/

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20211008111626.151570317@infradead.org
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166</title>
<updated>2019-05-30T18:26:39+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f19048fd0a0036e02443237952db5bfa5b5cdf0'/>
<id>urn:sha1:4f19048fd0a0036e02443237952db5bfa5b5cdf0</id>
<content type='text'>
Based on 1 normalized pattern(s):

  licensed under the terms of the gnu gpl license version 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 62 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.929121379@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: Completely remove --version flag</title>
<updated>2019-03-06T21:53:18+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2018-10-23T00:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ac060a708e054233265f8febfcef009ac3da826'/>
<id>urn:sha1:9ac060a708e054233265f8febfcef009ac3da826</id>
<content type='text'>
Recently attempt to remove the '--version' flag was made, badly.  We
failed to remove mention of it from the help output.  And we (me) failed
to actually remove the flag from the options list.

_Completely_ remove --version flag.
</content>
</entry>
<entry>
<title>leaking_addresses: Fix calls to dprint</title>
<updated>2019-03-06T21:53:18+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2018-10-22T23:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f2994333315f004265571eab787474b73d72ed6'/>
<id>urn:sha1:0f2994333315f004265571eab787474b73d72ed6</id>
<content type='text'>
Currently calls to function dprint() are non uniform and at times
incorrect.

Use uniform _correct_ call to function dprint().

Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: check if file name contains address</title>
<updated>2018-04-06T22:50:34+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>me@tobin.cc</email>
</author>
<published>2018-03-01T21:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c73dff595f259736a90f52b38cf5798abeae4a3c'/>
<id>urn:sha1:c73dff595f259736a90f52b38cf5798abeae4a3c</id>
<content type='text'>
Sometimes files may be created by using output from printk.  As the scan
traverses the directory tree we should parse each path name and check if
it is leaking an address.

Add check for leaking address on each path name.

Suggested-by: Tycho Andersen &lt;tycho@tycho.ws&gt;
Acked-by: Tycho Andersen &lt;tycho@tycho.ws&gt;
Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: explicitly name variable used in regex</title>
<updated>2018-04-06T22:50:34+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>me@tobin.cc</email>
</author>
<published>2018-03-01T21:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2306a67745ebdf3f98bc954248b74a3f1d57cdc2'/>
<id>urn:sha1:2306a67745ebdf3f98bc954248b74a3f1d57cdc2</id>
<content type='text'>
Currently sub routine may_leak_address() is checking regex against Perl
special variable $_ which is _fortunately_ being set correctly in a loop
before this sub routine is called.  We already have declared a variable
to hold this value '$line' we should use it.

Use $line in regex match instead of implicit $_

Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: remove version number</title>
<updated>2018-04-06T22:50:34+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>me@tobin.cc</email>
</author>
<published>2018-02-27T04:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34827374492580b27c3cba29d493dab28c8c25d3'/>
<id>urn:sha1:34827374492580b27c3cba29d493dab28c8c25d3</id>
<content type='text'>
We have git now, we don't need a version number.  This was originally
added because leaking_addresses.pl shamelessly (and mindlessly) copied
checkpatch.pl

Remove version number from script.

Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: skip '/proc/1/syscall'</title>
<updated>2018-04-06T22:50:34+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>me@tobin.cc</email>
</author>
<published>2018-02-27T03:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ad742939283ed0613be654ad0aaf29b797f9905'/>
<id>urn:sha1:2ad742939283ed0613be654ad0aaf29b797f9905</id>
<content type='text'>
The pointers listed in /proc/1/syscall are user pointers, and negative
syscall args will show up like kernel addresses.

For example

/proc/31808/syscall: 0 0x3 0x55b107a38180 0x2000 0xffffffffffffffb0 \
0x55b107a302d0 0x55b107a38180 0x7fffa313b8e8 0x7ff098560d11

Skip parsing /proc/1/syscall

Suggested-by: Tycho Andersen &lt;tycho@tycho.ws&gt;
Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
</content>
</entry>
<entry>
<title>leaking_addresses: skip all /proc/PID except /proc/1</title>
<updated>2018-04-06T22:50:34+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>me@tobin.cc</email>
</author>
<published>2018-02-27T04:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=472c9e1085f20de71fc482500c8f1e4e45dff651'/>
<id>urn:sha1:472c9e1085f20de71fc482500c8f1e4e45dff651</id>
<content type='text'>
When the system is idle it is likely that most files under /proc/PID
will be identical for various processes.  Scanning _all_ the PIDs under
/proc is unnecessary and implies that we are thoroughly scanning /proc.
This is _not_ the case because there may be ways userspace can trigger
creation of /proc files that leak addresses but were not present during
a scan.  For these two reasons we should exclude all PID directories
under /proc except '1/'

Exclude all /proc/PID except /proc/1.

Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
</content>
</entry>
</feed>
