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>] [day] [month] [year] [list]
Message-ID: <20140806083927.GA31721@dhcp-16-198.nay.redhat.com>
Date:	Wed, 6 Aug 2014 16:39:27 +0800
From:	Dave Young <dyoung@...hat.com>
To:	a.zummo@...ertech.it, rtc-linux@...glegroups.com,
	linux-kernel@...r.kernel.org, msalter@...hat.com
Subject: [PATCH 2/2] efi_rtc: probe function error out in case no efi runtime
 enabled


efi rtc depends on efi runtime services, so if efi runtime services are not
usable it should error out.

Without this patch rtc-efi will panic with 'noefi' boot

Signed-off-by: Dave Young <dyoung@...hat.com>
---
 drivers/rtc/rtc-efi.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6/drivers/rtc/rtc-efi.c
===================================================================
--- linux-2.6.orig/drivers/rtc/rtc-efi.c
+++ linux-2.6/drivers/rtc/rtc-efi.c
@@ -191,6 +191,9 @@ static int __init efi_rtc_probe(struct p
 {
 	struct rtc_device *rtc;
 
+	if (!efi_enabled(EFI_RUNTIME_SERVICES))
+		return -ENODEV;
+
 	rtc = devm_rtc_device_register(&dev->dev, "rtc-efi", &efi_rtc_ops,
 					THIS_MODULE);
 	if (IS_ERR(rtc))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ