<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/char/hangcheck-timer.c, branch v4.18.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.18.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.18.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-11-21T23:57:05Z</updated>
<entry>
<title>treewide: Switch DEFINE_TIMER callbacks to struct timer_list *</title>
<updated>2017-11-21T23:57:05Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-08-28T18:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=24ed960abf1d50cb7834e99a0cfc081bc0656712'/>
<id>urn:sha1:24ed960abf1d50cb7834e99a0cfc081bc0656712</id>
<content type='text'>
This changes all DEFINE_TIMER() callbacks to use a struct timer_list
pointer instead of unsigned long. Since the data argument has already been
removed, none of these callbacks are using their argument currently, so
this renames the argument to "unused".

Done using the following semantic patch:

@match_define_timer@
declarer name DEFINE_TIMER;
identifier _timer, _callback;
@@

 DEFINE_TIMER(_timer, _callback);

@change_callback depends on match_define_timer@
identifier match_define_timer._callback;
type _origtype;
identifier _origarg;
@@

 void
-_callback(_origtype _origarg)
+_callback(struct timer_list *unused)
 { ... }

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>timer: Remove expires and data arguments from DEFINE_TIMER</title>
<updated>2017-10-05T13:01:20Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-10-04T23:27:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1d27e3e2252ba9d949ca82fbdb73cde102cb2067'/>
<id>urn:sha1:1d27e3e2252ba9d949ca82fbdb73cde102cb2067</id>
<content type='text'>
Drop the arguments from the macro and adjust all callers with the
following script:

  perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \
    $(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h)

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt; # for m68k parts
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt; # for watchdog parts
Acked-by: David S. Miller &lt;davem@davemloft.net&gt; # for networking parts
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Kalle Valo &lt;kvalo@codeaurora.org&gt; # for wireless parts
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: linux-mips@linux-mips.org
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Cc: Sebastian Reichel &lt;sre@kernel.org&gt;
Cc: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: linux1394-devel@lists.sourceforge.net
Cc: Chris Metcalf &lt;cmetcalf@mellanox.com&gt;
Cc: linux-s390@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: "James E.J. Bottomley" &lt;jejb@linux.vnet.ibm.com&gt;
Cc: Wim Van Sebroeck &lt;wim@iguana.be&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: Harish Patil &lt;harish.patil@cavium.com&gt;
Cc: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Michael Reed &lt;mdr@sgi.com&gt;
Cc: Manish Chopra &lt;manish.chopra@cavium.com&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: linux-pm@vger.kernel.org
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: linux-watchdog@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@rjwysocki.net&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: netdev@vger.kernel.org
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lkml.kernel.org/r/1507159627-127660-11-git-send-email-keescook@chromium.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>hangcheck-timer: Fix typo in comment</title>
<updated>2017-04-08T16:08:54Z</updated>
<author>
<name>Shile Zhang</name>
<email>shile.zhang@nokia.com</email>
</author>
<published>2017-03-23T21:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8b932edfb8788862f10434c1018ad8a6078e0115'/>
<id>urn:sha1:8b932edfb8788862f10434c1018ad8a6078e0115</id>
<content type='text'>
Fix the typo "alloted" -&gt; "allotted" in comment.

Signed-off-by: Shile Zhang &lt;shile.zhang@nokia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2016-12-24T19:46:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba'/>
<id>urn:sha1:7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>hangcheck-timer: cleanup casting in hangcheck_init()</title>
<updated>2014-11-07T19:24:01Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-10-29T08:42:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d0439a5442cf43434d87faf34f4d2c19d3aba88a'/>
<id>urn:sha1:d0439a5442cf43434d87faf34f4d2c19d3aba88a</id>
<content type='text'>
The 32 bit addition "(hangcheck_margin + hangcheck_tick)" could
potentially overflow.  It triggers a static checker warning to have an
overflowed addition followed by a no-op cast.  I have moved the cast so
that the addition can't overflow.

Also I removed the unneeded cast on the following line since both
"hangcheck_tsc_margin" and "TIMER_FREQ" are already 64 bit types.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hangcheck-timer: Use ktime_get_ns()</title>
<updated>2014-07-23T22:01:49Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2014-07-16T21:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2044fdb03eb4e511d5028be0917899931f17461f'/>
<id>urn:sha1:2044fdb03eb4e511d5028be0917899931f17461f</id>
<content type='text'>
There is no point in having a S390 private implementation and there is
no point in using the raw monotonic time. The NTP freqeuency
adjustment of CLOCK_MONOTONIC is really not doing any harm for the
hang check timer.

Use ktime_get_ns() for everything and get rid of the timespec
conversions.

V2: Drop the raw monotonic and the S390 special case

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>Input: sysrq - drop tty argument form handle_sysrq()</title>
<updated>2010-08-21T07:34:45Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-18T04:15:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f335397d177c906256ee1bba28e8c49e8ec63817'/>
<id>urn:sha1:f335397d177c906256ee1bba28e8c49e8ec63817</id>
<content type='text'>
Sysrq operations do not accept tty argument anymore so no need to pass
it to us.

[Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;: fix build breakage in drm code
 caused by sysrq using bool but not including linux/types.h]

[Sachin Sant &lt;sachinp@in.ibm.com&gt;: fix build breakage in s390 keyboadr
 driver]

Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>hangcheck-timer: fix x86_32 bugs</title>
<updated>2010-05-25T15:07:02Z</updated>
<author>
<name>Yury Polyanskiy</name>
<email>ypolyans@princeton.edu</email>
</author>
<published>2010-05-24T21:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=940370fc86b920b51a34217a1facc3e9e97c2456'/>
<id>urn:sha1:940370fc86b920b51a34217a1facc3e9e97c2456</id>
<content type='text'>
drivers/char/hangcheck-timer.c is doubly broken.  When the overflown value
of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT
messages "Hangcheck: hangcheck value past margin!" But whether it happens
or not depends on HZ and lpj in a complex way.  People have hit it
occasionally as far as google search can tell.

First, the following line overflows unsigned long:

# define TIMER_FREQ (HZ*loops_per_jiffy)

Second, and more importantly, loops_per_jiffy has little to do with the
con= version from the the time scale of get_cycles() (aka rdtsc) to the
time scale of jiffies.

The attached patch resolves both of the problems.

Acked-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Cc: Jan Glauber &lt;jan.glauber@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/char/: Spelling fixes</title>
<updated>2008-02-03T15:11:42Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2008-02-03T15:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8dfba4d71b77bca83a6f9943fc8e53439310cffd'/>
<id>urn:sha1:8dfba4d71b77bca83a6f9943fc8e53439310cffd</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
</content>
</entry>
<entry>
<title>Detach sched.h from mm.h</title>
<updated>2007-05-21T16:18:19Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2007-05-20T21:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e8edc6e03a5c8562dc70a6d969f732bdb355a7e7'/>
<id>urn:sha1:e8edc6e03a5c8562dc70a6d969f732bdb355a7e7</id>
<content type='text'>
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
