lkml.org 
[lkml]   [2017]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC V1 net-next 1/6] net: Add a new socket option for a future transmit time.
From
Date
On Mon, 2017-09-18 at 09:41 +0200, Richard Cochran wrote:

> + case SO_TXTIME:
> + if (!sock_flag(sk, SOCK_TXTIME))
> + return -EINVAL;
> + sockc->transmit_time = *(u64 *)CMSG_DATA(cmsg);

1) No guarantee the CMSG is properly aligned on arches that might trap
on unaligned access.

2) No guarantee user provided 8 bytes here.

Also, what would be the time base here ?

> + break;
> /* SCM_RIGHTS and SCM_CREDENTIALS are semantically in SOL_UNIX. */
> case SCM_RIGHTS:
> case SCM_CREDENTIALS:


\
 
 \ /
  Last update: 2017-09-18 17:19    [W:0.099 / U:0.144 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site