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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0in+bXXqJO-EWa6LsDCdKzQHR_q2XfgHEPJbJjK2P_-Gg@mail.gmail.com>
Date: Fri, 16 May 2025 22:25:21 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Paul Menzel <pmenzel@...gen.mpg.de>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Pavel Machek <pavel@...nel.org>, Len Brown <len.brown@...el.com>, 
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] PM: thaw_processes: Rewrite restarting tasks log to
 remove stray *done.*

On Mon, May 12, 2025 at 4:48 PM Paul Menzel <pmenzel@...gen.mpg.de> wrote:
>
> [add change-log]
>
> Am 11.05.25 um 19:46 schrieb Paul Menzel:
> > `pr_cont()` unfortunately does not work here, as other parts of the
> > Linux kernel log between the two log lines:
> >
> >      [18445.295056] r8152-cfgselector 4-1.1.3: USB disconnect, device number 5
> >      [18445.295112] OOM killer enabled.
> >      [18445.295115] Restarting tasks ...
> >      [18445.295185] usb 3-1: USB disconnect, device number 2
> >      [18445.295193] usb 3-1.1: USB disconnect, device number 3
> >      [18445.296262] usb 3-1.5: USB disconnect, device number 4
> >      [18445.297017] done.
> >      [18445.297029] random: crng reseeded on system resumption
> >
> > `pr_cont()` also uses the default log level, normally warning, if the
> > corresponding log line is interrupted.
> >
> > Therefore, replace the `pr_cont()`, and explicitly log it as a separate
> > line with log level info:
> >
> >      Restarting tasks: Starting
> >      […]
> >      Restarting tasks: Done
> >
> > Signed-off-by: Paul Menzel <pmenzel@...gen.mpg.de>
> > ---
>
> v2: Use log message texts suggested by Rafael.
>
> >   kernel/power/process.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/power/process.c b/kernel/power/process.c
> > index 66ac067d9ae6..1938fafa9172 100644
> > --- a/kernel/power/process.c
> > +++ b/kernel/power/process.c
> > @@ -189,7 +189,7 @@ void thaw_processes(void)
> >
> >       oom_killer_enable();
> >
> > -     pr_info("Restarting tasks ... ");
> > +     pr_info("Restarting tasks: Starting\n");
> >
> >       __usermodehelper_set_disable_depth(UMH_FREEZING);
> >       thaw_workqueues();
> > @@ -208,7 +208,7 @@ void thaw_processes(void)
> >       usermodehelper_enable();
> >
> >       schedule();
> > -     pr_cont("done.\n");
> > +     pr_info("Restarting tasks: Done\n");
> >       trace_suspend_resume(TPS("thaw_processes"), 0, false);
> >   }
> >

An analogous change, which I have forgotten about, has been made
already in this cycle, but I prefer the way the messages look after
your changes, so I've rebased your patch on top of the other one and
applied it for 6.16.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ