Thread (16 messages) flat view 16 messages, 7 authors, 2013-06-13

Re: [PATCH net-next 2/2] net:add socket option for low latency polling

From: Eliezer Tamir <hidden>
Date: 2013-06-12 06:39:19
Also in: lkml

On 11/06/2013 23:24, Ben Hutchings wrote:
On Tue, 2013-06-11 at 17:24 +0300, Eliezer Tamir wrote:
quoted
adds a socket option for low latency polling.
This allows overriding the global sysctl value with a per-socket one.
[...]
quoted
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -913,6 +913,23 @@ set_rcvbuf:
  		sock_valbool_flag(sk, SOCK_SELECT_ERR_QUEUE, valbool);
  		break;

+#ifdef CONFIG_NET_LL_RX_POLL
+	case SO_LL:
+		if (!capable(CAP_NET_ADMIN))
+			ret = -EACCES;
[...]

Failed capability checks normally result in EPERM whereas EACCES usually
results from a file permission/ACL/label check.
OK
Perhaps unprivileged users should be allowed to set a value as long as
it's less than or equal to the global value?
I thought of allowing to disable even if you are not privileged, but 
this sounds better.

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help