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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Feb 2007 14:37:49 +0100
From:	John <linux.kernel@...e.fr>
To:	linux-net@...r.kernel.org
CC:	netdev@...r.kernel.org, linux.kernel@...e.fr
Subject: Re: CLOCK_MONOTONIC datagram timestamps by the kernel

John wrote:

> I know it's possible to have Linux timestamp incoming datagrams as soon
> as they are received, then for one to retrieve this timestamp later with
> an ioctl command or a recvmsg call.

Has it ever been proposed to modify struct skb_timeval to hold 
nanosecond stamps instead of just microsecond stamps? Then make the 
improved precision somehow available to user space.

On a related note, the comment for skb_set_timestamp() states:

/**
  * skb_set_timestamp - set timestamp of a skb
  * @skb: skb to set stamp of
  * @stamp: pointer to struct timeval to get stamp from
  *
  * Timestamps are stored in the skb as offsets to a base timestamp.
  * This function converts a struct timeval to an offset and stores
  * it in the skb.
  */

But there is no mention of an offset in the code:

static inline void skb_set_timestamp(
   struct sk_buff *skb, const struct timeval *stamp)
{
   skb->tstamp.off_sec  = stamp->tv_sec;
   skb->tstamp.off_usec = stamp->tv_usec;
}

Likewise for skb_get_timestamp:

/**
  * skb_get_timestamp - get timestamp from a skb
  * @skb: skb to get stamp from
  * @stamp: pointer to struct timeval to store stamp in
  *
  * Timestamps are stored in the skb as offsets to a base timestamp.
  * This function converts the offset back to a struct timeval and stores
  * it in stamp.
  */

static inline void skb_get_timestamp(
   const struct sk_buff *skb, struct timeval *stamp)
{
   stamp->tv_sec  = skb->tstamp.off_sec;
   stamp->tv_usec = skb->tstamp.off_usec;
}

Are the comments related to code that has since been modified?

Regards.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ