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: <20120628184731.GK735@spo001.leaseweb.com>
Date:	Thu, 28 Jun 2012 20:47:32 +0200
From:	Wim Van Sebroeck <wim@...ana.be>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux Watchdog Mailing List <linux-watchdog@...r.kernel.org>,
	Thomas Mingarelli <Thomas.Mingarelli@...com>,
	Jan Beulich <JBeulich@...e.com>,
	Guenter Roeck <linux@...ck-us.net>
Subject: [GIT PULL REQUEST] watchdog - v3.5-rc4 Fixes

Hi Linus,

Please pull from 'master' branch of
	git://www.linux-watchdog.org/linux-watchdog.git

It will fix:
* the WDIOC_GETSTATUS return value
* the unregister of all NMI events on exit
* the loading of the iTCO_wdt driver after the conversion to the lpc_ich mfd model.

This will update the following files:

 hpwdt.c        |    4 +++-
 iTCO_wdt.c     |    1 +
 watchdog_dev.c |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

with these Changes:

commit 8b9468d496abd357cc797b27a79d4402f5e0e94d
Author: Wim Van Sebroeck <wim@...ana.be>
Date:   Tue Jun 26 20:07:21 2012 +0200

    watchdog: core: fix WDIOC_GETSTATUS return value
    
    In commit 7a87982420e5e126bfefeb42232d1fd92052794e we added
    a wrapper for the WDIOC_GETSTATUS ioctl call. The code results
    however in a different behaviour: it returns an error if the
    driver doesn't support the status operation. This is not
    according to the API that says that when we don't support
    the status operation, that we just should return a 0 value.
    Only when the device isn't there anymore, we should return an
    error.
    
    Signed-off-by: Wim Van Sebroeck <wim@...ana.be>

commit a089361cf5f1d6a5295aa5385238bd044998e1e9
Author: Mingarelli, Thomas <Thomas.Mingarelli@...com>
Date:   Tue Jun 26 10:27:00 2012 +0200

    watchdog: hpwdt: Unregister NMI events on exit.
    
    This patch is to unregister for NMI events upon exit. Also we are now
    making the default setting for allow_kdump enabled.
    
    Signed-off-by: Thomas Mingarelli <thomas.mingarelli@...com>
    Signed-off-by: Wim Van Sebroeck <wim@...ana.be>

commit e5de32e3ec9d4d5a355659760d5045b80c0a05d8
Author: Jan Beulich <JBeulich@...e.com>
Date:   Fri Jun 22 16:41:00 2012 +0100

    watchdog: iTCO_wdt: add platform driver module alias
    
    The recent conversion of iTCO_wdt resulted in the driver no longer
    getting loaded automatically, since it no longer has a
    MODULE_DEVICE_TABLE() included. As the lpc_ich driver now creates a
    platform device, auto-loading can easily be done by having a respective
    module alias in place.
    
    Signed-off-by: Jan Beulich <jbeulich@...e.com>
    Cc: Aaron Sierra <asierra@...-inc.com>
    Acked-by: Guenter Roeck <linux@...ck-us.net>
    Cc: Samuel Ortiz <sameo@...ux.intel.com>
    Signed-off-by: Wim Van Sebroeck <wim@...ana.be>

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 2b76381..1eff743 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -146,7 +146,7 @@ struct cmn_registers {
 }  __attribute__((packed));
 
 static unsigned int hpwdt_nmi_decoding;
-static unsigned int allow_kdump;
+static unsigned int allow_kdump = 1;
 static unsigned int is_icru;
 static DEFINE_SPINLOCK(rom_lock);
 static void *cru_rom_addr;
@@ -756,6 +756,8 @@ error:
 static void hpwdt_exit_nmi_decoding(void)
 {
 	unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
+	unregister_nmi_handler(NMI_SERR, "hpwdt");
+	unregister_nmi_handler(NMI_IO_CHECK, "hpwdt");
 	if (cru_rom_addr)
 		iounmap(cru_rom_addr);
 }
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index bc47e90..9c2c27c 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -699,3 +699,4 @@ MODULE_DESCRIPTION("Intel TCO WatchDog Timer Driver");
 MODULE_VERSION(DRV_VERSION);
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 672d169..ef8edec 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -349,7 +349,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
 			sizeof(struct watchdog_info)) ? -EFAULT : 0;
 	case WDIOC_GETSTATUS:
 		err = watchdog_get_status(wdd, &val);
-		if (err)
+		if (err == -ENODEV)
 			return err;
 		return put_user(val, p);
 	case WDIOC_GETBOOTSTATUS:
--
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