<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/power/pm-graph, branch v6.3.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-14T17:51:59+00:00</updated>
<entry>
<title>pm-graph: sleepgraph: Avoid crashing on binary data in device names</title>
<updated>2023-03-14T17:51:59+00:00</updated>
<author>
<name>Todd Brandt</name>
<email>todd.e.brandt@linux.intel.com</email>
</author>
<published>2023-03-13T22:26:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6fa7f537351c8fad0e43e9279efe76dbc942bea0'/>
<id>urn:sha1:6fa7f537351c8fad0e43e9279efe76dbc942bea0</id>
<content type='text'>
A regression has occurred in the hid-sensor code where a device
name string has not been initialized to 0, and ends up without
a NULL char and is printed with %s. This includes random binary
data in the device name, which makes its way into the ftrace output
and ends up crashing sleepgraph because it expects the ftrace output
to be ASCII only.

For example: "HID-SENSOR-INT-020b?.39.auto" ends up in ftrace instead
of "HID-SENSOR-INT-020b.39.auto". It causes this crash in sleepgraph:

  File "/usr/bin/sleepgraph", line 5579, in executeSuspend
    for line in fp:
  File "/usr/lib/python3.10/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position
1568: invalid start byte

The issue is present in 6.3-rc1 and is described in full here:
https://bugzilla.kernel.org/show_bug.cgi?id=217169

A separate fix has been submitted to have this issue repaired, but
it has also exposed a larger bug in sleepgraph, since nothing should
make sleepgraph crash. Sleepgraph needs to be able to handle binary
data showing up in ftrace gracefully.

Modify the ftrace processing code to treat it as potentially binary
and to filter out binary data and leave just the ASCII.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217169
Fixes: 98c062e82451 ("HID: hid-sensor-custom: Allow more custom iio sensors")
Signed-off-by: Todd Brandt &lt;todd.e.brandt@linux.intel.com&gt;
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: tools: use canonical ftrace path</title>
<updated>2023-02-02T14:45:35+00:00</updated>
<author>
<name>Ross Zwisler</name>
<email>zwisler@chromium.org</email>
</author>
<published>2023-01-30T18:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf3e0251868c56b10ccb3e0b3628fcfb0c9c4ec5'/>
<id>urn:sha1:cf3e0251868c56b10ccb3e0b3628fcfb0c9c4ec5</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

A few scripts in tools/power still refer to this older debugfs path, so
let's update them to avoid confusion.

Signed-off-by: Ross Zwisler &lt;zwisler@google.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: sleep: Refine error message in try_to_freeze_tasks()</title>
<updated>2022-12-06T11:04:34+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2022-12-01T18:34:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96d4b8e1ad8a34711ef416dd61e6b60df9e12d30'/>
<id>urn:sha1:96d4b8e1ad8a34711ef416dd61e6b60df9e12d30</id>
<content type='text'>
A previous change amended try_to_freeze_tasks() with the "what"
variable pointing to a string describing the group of tasks subject to
the freezing which may be used in the error message in there too, so
make that happen.

Accordingly, update sleepgraph.py to catch the modified error message
as appropriate.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
</entry>
<entry>
<title>pm-graph v5.10</title>
<updated>2022-10-25T15:46:15+00:00</updated>
<author>
<name>Todd Brandt</name>
<email>todd.e.brandt@intel.com</email>
</author>
<published>2022-10-20T09:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9bfb09774ea40937b6c6d6e07858e0f7ad1991ec'/>
<id>urn:sha1:9bfb09774ea40937b6c6d6e07858e0f7ad1991ec</id>
<content type='text'>
sleepgraph:
- add -wifitrace argument for tracing all the way to wifi reconnect
- include more data in ftrace to mark the end of kernel resume
- add async_synchronize_full to the list of funcs to chart
- add thermal zone info to the log data
- include a check for s0ix support (s2idle is the default mem_sleep)
- if s2idle does not support s0ix, remove the SYS%LPI turbostat var
- fix -dev crash when kprobe caller is just an address (not a symbol)
- fix the cpuexec data in -proc to display in resume

sleepgraph.8:
- add -wifitrace documentation

README:
- change links from 01.org to developer.intel.com

Signed-off-by: Todd Brandt &lt;todd.e.brandt@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>pm-graph v5.9</title>
<updated>2022-07-15T17:31:58+00:00</updated>
<author>
<name>Todd Brandt</name>
<email>todd.e.brandt@intel.com</email>
</author>
<published>2022-07-07T22:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3f6c43d008c5ab103e00361671c456d45012547'/>
<id>urn:sha1:b3f6c43d008c5ab103e00361671c456d45012547</id>
<content type='text'>
bootgraph:
 - fix parsing of /proc/version to be much more flexible
 - check kernel version to disallow ftrace on anything older than 4.10

sleepgraph:
 - include fix to bugzilla 212761 in case it regresses
 - fix for -proc bug: https://github.com/intel/pm-graph/pull/20
 - add -debugtiming arg to get timestamps on prints
 - allow use of the netfix tool hosted in the github repo
 - read s0ix data from pmc_core for better debug
 - include more system data in the output log
 - Do a better job testing input files useability
 - flag more error data from dmesg in the timeline
 - pre-parse the trace log to fix any ordering issues
 - add new parser to process dmesg only timelines
 - remove superflous sleep(5) in multitest mode

config/custom-timeline-functions.cfg:
 - change some names to keep up to date

README:
 - new version, small wording changes

Signed-off-by: Todd Brandt &lt;todd.e.brandt@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>pm-graph: Fix typo "accesible"</title>
<updated>2021-03-22T14:27:17+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2021-03-18T20:22:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7e23e54a9c7e9fc4aa177bfc3c73a29325614ad'/>
<id>urn:sha1:b7e23e54a9c7e9fc4aa177bfc3c73a29325614ad</id>
<content type='text'>
Trivial fix.

Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>pm-graph v5.8</title>
<updated>2020-11-23T17:20:28+00:00</updated>
<author>
<name>Todd Brandt</name>
<email>todd.e.brandt@linux.intel.com</email>
</author>
<published>2020-11-11T02:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d23e95c09067618eabd6d0e8cff372f0ce517c84'/>
<id>urn:sha1:d23e95c09067618eabd6d0e8cff372f0ce517c84</id>
<content type='text'>
 - if wakeups occur in s2idle: "freeze time: N (-x ms waking y times) ms"

 - change FREEZELOOP and FREEZEWAKE to S2LOOP and S2WAKE for brevity

 - returns all sysfs vals to their initial state after testing

 - use the dmesg log for debugging until the test is completed,
   instrument the executeSuspend process to have a full trace,
   if test completes, formal dmesg log overwrites the debug log

 - fix CPU_ON and CPU_OFF devices in the timeline, should include [n]

Signed-off-by: Todd Brandt &lt;todd.e.brandt@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>notifier: Fix broken error handling pattern</title>
<updated>2020-09-01T07:58:03+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-08-18T13:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=70d932985757fbe978024db313001218e9f8fe5c'/>
<id>urn:sha1:70d932985757fbe978024db313001218e9f8fe5c</id>
<content type='text'>
The current notifiers have the following error handling pattern all
over the place:

	int err, nr;

	err = __foo_notifier_call_chain(&amp;chain, val_up, v, -1, &amp;nr);
	if (err &amp; NOTIFIER_STOP_MASK)
		__foo_notifier_call_chain(&amp;chain, val_down, v, nr-1, NULL)

And aside from the endless repetition thereof, it is broken. Consider
blocking notifiers; both calls take and drop the rwsem, this means
that the notifier list can change in between the two calls, making @nr
meaningless.

Fix this by replacing all the __foo_notifier_call_chain() functions
with foo_notifier_call_chain_robust() that embeds the above pattern,
but ensures it is inside a single lock region.

Note: I switched atomic_notifier_call_chain_robust() to use
      the spinlock, since RCU cannot provide the guarantee
      required for the recovery.

Note: software_resume() error handling was broken afaict.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://lore.kernel.org/r/20200818135804.325626653@infradead.org
</content>
</entry>
<entry>
<title>pm-graph v5.7 - important s2idle fixes</title>
<updated>2020-07-27T11:03:36+00:00</updated>
<author>
<name>Todd Brandt</name>
<email>todd.e.brandt@linux.intel.com</email>
</author>
<published>2020-07-21T01:02:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68f9b22842897087895230964776083e168415de'/>
<id>urn:sha1:68f9b22842897087895230964776083e168415de</id>
<content type='text'>
Important fixes:

 - in s2idle, use timekeeping_freeze trace mark instead of
   machine_suspend to denote entry into s2idle mode.

 - in s2idle, use machine_suspend trace mark to create a new virtual
   device called "s2idle_enter_&lt;n&gt;x". It denotes an s2idle_enter call
   loop of &lt;n&gt; iterations where s2idle was never actually achieved.
   It isn't counted as "freeze time" in the header.

 - in s2idle, only show multiple freeze times if s2idle went in and
   out of resume_noirq. Otherwise multiple freezes are shown with
   "waking" time subtracted (waking time is time spent outside s2idle
   dealing with wakeups).

 - in s2idle summaries, include "FREEZEWAKE" as an issue when at
   least 1ms is spent waking from s2idle. A clean run should only
   wake for the rtc timer.

 - add support for device callbacks with matching names in the same
   phase. In rare cases some devices register multiple callbacks from
   separate drivers using the same name. Without this fix only one is
   shown.

 - add kparamsfmt string back to fix bootgraph

General updates:

 - when suspend_machine is missing, error says "failed in
   suspend_machine"

 - extract target count/time and add to summary title if -multi
   used

 - include any instances of "timeout" in dmesg as issues to be
   logged.

 - fix ftrace parse to handle any number of flags (instead of
   just 4).

 - remove sync/async_device string from device detail, remains in
   hover.

 - when using callgraph (-f) add driver name to callgraph titles.

Signed-off-by: Todd Brandt &lt;todd.e.brandt@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'smp-core-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2020-06-01T20:38:55+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-06-01T20:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d861f6e6829ce586bcf5823ab7d348f09be3c8fb'/>
<id>urn:sha1:d861f6e6829ce586bcf5823ab7d348f09be3c8fb</id>
<content type='text'>
Pull SMP updates from Ingo Molnar:
 "Misc cleanups in the SMP hotplug and cross-call code"

* tag 'smp-core-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  cpu/hotplug: Remove __freeze_secondary_cpus()
  cpu/hotplug: Remove disable_nonboot_cpus()
  cpu/hotplug: Fix a typo in comment "broadacasted"-&gt;"broadcasted"
  smp: Use smp_call_func_t in on_each_cpu()
</content>
</entry>
</feed>
