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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1671085226-21347-1-git-send-email-shradhagupta@linux.microsoft.com>
Date:   Wed, 14 Dec 2022 22:20:26 -0800
From:   Shradha Gupta <shradhagupta@...ux.microsoft.com>
To:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Cc:     Shradha Gupta <shradhagupta@...ux.microsoft.com>,
        "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: [PATCH] kernel: power: swap: Suppress expected 'Image not found'  error on Ubuntu

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.

Signed-off-by: Shradha Gupta <shradhagupta@...ux.microsoft.com>
---
 kernel/power/swap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 277434b6c0bf..9cbd3edc8339 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -1552,6 +1552,14 @@ int swsusp_check(void)
 			pr_debug("Image signature found, resuming\n");
 	} else {
 		error = PTR_ERR(hib_resume_bdev);
+		/*
+		 * If this call is triggered by `systemctl hibernate`, the
+		 * call is expected to fail with -EBUSY error.
+		 * TODO: Figure out a better way to suppress the error msg
+		 * in this case.
+		 */
+		if (error == -EBUSY)
+			return error;
 	}
 
 	if (error)
-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ