All of lore.kernel.org
 help / color / mirror / Atom feed
From: joshc@eso.teric.us (Josh Cartwright)
To: kernelnewbies@lists.kernelnewbies.org
Subject: "Time police" - best way to submit?
Date: Fri, 18 Apr 2014 15:51:30 -0500	[thread overview]
Message-ID: <20140418205129.GO526@kryptos> (raw)
In-Reply-To: <CAAxKAv+GRTHesYwkK0F7Umq1Vpnqm104oNuTxt_VRfC7yD0_Ng@mail.gmail.com>

On Wed, Apr 16, 2014 at 02:27:50PM -0700, Henry Hallam wrote:
> Hi, my name is Henry and I'm a kernel newbie.

Hello, Henry.

> Recently plagued by a perplexing issue where *something* would step
> the clock on an important server by exactly 5 minutes at infrequent,
> unpredictable intervals, I put together my first kernel module - a
> trivial hook into do_settimeofday via a jprobe, that prints the PID,
> process name and time adjustment to the kernel message log.
> 
> Here's what I have so far:
> https://github.com/henryhallam/timepolice
> 
> Questions:
> 
> 1. Is a module using kprobes/jprobes the right way to do it, vs adding
> printks to linux/time/timekeeping.c?

Have you taken a look at the various kernel tracing features?  I suspect
you could do exactly what you want without modifying the kernel at all
using the function tracer.

  Josh

  parent reply	other threads:[~2014-04-18 20:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 21:27 "Time police" - best way to submit? Henry Hallam
2014-04-16 23:27 ` Valdis.Kletnieks at vt.edu
2014-04-16 23:37   ` Henry Hallam
2014-04-18 20:51 ` Josh Cartwright [this message]
2014-04-23 23:00   ` Henry Hallam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140418205129.GO526@kryptos \
    --to=joshc@eso.teric.us \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.