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]
Message-ID: <1329846350.18384.25.camel@edumazet-laptop>
Date:	Tue, 21 Feb 2012 18:45:50 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Pavel Emelyanov <xemul@...allels.com>
Cc:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH 4/6] sock: Introduce the SO_PEEK_OFF sock option

Le mardi 21 février 2012 à 21:31 +0400, Pavel Emelyanov a écrit :
> This one specifies where to start MSG_PEEK-ing queue data from. When
> set to negative value means that MSG_PEEK works as ususally -- peeks
> from the head of the queue always.
> 
> When some bytes are peeked from queue and the peeking offset is non
> negative it is moved forward so that the next peek will return next
> portion of data.
> 
> When non-peeking recvmsg occurs and the peeking offset is non negative
> is is moved backward so that the next peek will still peek the proper
> data (i.e. the one that would have been picked if there were no non
> peeking recv in between).
> 
> The offset is set using per-proto opteration to let the protocol handle
> the locking issues and to check whether the peeking offset feature is
> supported by the protocol the socket belongs to.
> 
> Signed-off-by: Pavel Emelyanov <xemul@...allels.com>
> 
> ---
>  include/asm-generic/socket.h |    1 +
>  include/linux/net.h          |    1 +
>  include/net/sock.h           |   25 +++++++++++++++++++++++++
>  net/core/sock.c              |   13 +++++++++++++
>  4 files changed, 40 insertions(+), 0 deletions(-)
> 
> diff --git a/include/asm-generic/socket.h b/include/asm-generic/socket.h
> index 49c1704..832c270 100644
> --- a/include/asm-generic/socket.h
> +++ b/include/asm-generic/socket.h
> @@ -66,5 +66,6 @@
>  #define SO_RXQ_OVFL             40
>  
>  #define SO_WIFI_STATUS		41
> +#define SO_PEEK_OFF		42
>  #define SCM_WIFI_STATUS	SO_WIFI_STATUS

small note : should be moved down by one line, after SCM_WIFI_STATUS

Other than that, 


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