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] [day] [month] [year] [list]
Date:	Thu, 31 Jan 2013 13:21:18 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	anish singh <anish198519851985@...il.com>
Cc:	Jan Kara <jack@...e.cz>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>, jslaby@...e.cz
Subject: Re: [PATCH] printk: Avoid softlockups in console_unlock()

On Thu, 31 Jan 2013 13:14:05 +0530
anish singh <anish198519851985@...il.com> wrote:

> > If it does need ratelimiting, I'd worry about using jiffies for that.
> > If the kernel is spending a long time with interrupts disabled, jiffies
> > might not be incrementing.  Using the CPU timestamp would be better
> > (eg, sched_clock()).
> 
> http://lxr.free-electrons.com/source/kernel/sched/clock.c#L75
> I am puzzled because of this definition(above link).Sched_clock is
> dependent on jiffies and jiffies is blocked so how sched_clock would
> be better(I am 100% missing something very obvious)?
> 
> Is it that sched_clock is not dependent on jiffies?

yes, I think sched_clock is dependent on jiffies for some architectures.

I was really using sched_clock as a place-filler for "some timer which
keeps running when interrupts are disabled" ;) I'm not really sure what
that would be nowadays - even get_cycles() isn't implemented on some
architectures.  I guess some architectures will need a lame fallback or
some sort.


--
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