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]
Date:   Fri, 13 Jan 2023 21:14:15 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Shradha Gupta <shradhagupta@...ux.microsoft.com>
Cc:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Dexuan Cui <decui@...rosoft.com>,
        Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [PATCH] kernel: power: swap: Suppress expected 'Image not found'
 error on Ubuntu

On Thu, Dec 15, 2022 at 7:20 AM Shradha Gupta
<shradhagupta@...ux.microsoft.com> wrote:
>
> In 'systemctl hibernate' if resume device is written to the sysfs
> resume parameter, a software_resume() call is triggerred. This call
> is expected to fail in swsusp_check() call with -EBUSY error and an
> 'Image not found' error message. This fix suppresses the expected
> failure message from getting logged in Ubuntu setups where
> CONFIG_DYNAMIC_DEBUG is enabled by default.

I see what you mean, so what about this change instead (modulo
GMail-induced white-space breakage):

---
 kernel/power/swap.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Index: linux-pm/kernel/power/swap.c
===================================================================
--- linux-pm.orig/kernel/power/swap.c
+++ linux-pm/kernel/power/swap.c
@@ -1546,17 +1546,16 @@ int swsusp_check(void)
         }

 put:
-        if (error)
+        if (error) {
             blkdev_put(hib_resume_bdev, FMODE_READ | FMODE_EXCL);
-        else
+            pr_debug("Image not found (code %d)\n", error);
+        } else {
             pr_debug("Image signature found, resuming\n");
+        }
     } else {
         error = PTR_ERR(hib_resume_bdev);
     }

-    if (error)
-        pr_debug("Image not found (code %d)\n", error);
-
     return error;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ