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]
Date:	Tue, 20 Nov 2012 17:21:06 +0900
From:	Seiichi Ikarashi <s.ikarashi@...fujitsu.com>
To:	John Stultz <johnstul@...ibm.com>,
	John Stultz <john.stultz@...aro.org>
CC:	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] ntp: fix return value of adjtimex() calling for STA_INS/DEL

Hi,

Since commit 6b43ae8a619d17c4935c3320d2ef9e92bdeed05d,
adjtimex() system call returns TIME_OK even if STA_INS/DEL calling.
But the man page says it should be TIME_INS/TIME_DEL, respectively.

I have no idea except for such an ad-hoc fix.

Signed-off-by: Seiichi Ikarashi <s.ikarashi@...fujitsu.com>

--- a/kernel/time/ntp.c	2012-11-20 17:09:08.000000000 +0900
+++ b/kernel/time/ntp.c	2012-11-20 17:13:18.000000000 +0900
@@ -684,6 +684,10 @@ int do_adjtimex(struct timex *txc)
 	}
 
 	result = time_state;	/* mostly `TIME_OK' */
+	if (time_status & STA_INS)
+		result = TIME_INS;
+	else if (time_status & STA_DEL)
+		result = TIME_DEL;
 	/* check for errors */
 	if (is_error_status(time_status))
 		result = TIME_ERROR;
--
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