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: <CAHA+R7M8EFF=y7LOqsiHMsT+Q1e+3wxAE93njkSk3p9nYc2gTA@mail.gmail.com>
Date:	Wed, 11 Mar 2015 13:46:12 -0700
From:	Cong Wang <cwang@...pensource.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev <netdev@...r.kernel.org>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	David Miller <davem@...emloft.net>
Subject: Re: Why do we prefer skb->priority to tc filters?

On Wed, Mar 11, 2015 at 1:09 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Wed, 2015-03-11 at 12:18 -0700, Cong Wang wrote:
>> This is exactly why I am asking, kernel respects user's choice so much
>> that it could override even both cgroup prio and tc filters, I don't know
>> what is the reason behind, but this means our tc filters can not work
>> with an application which sets skb->priority. For example, our tc filters
>> classify the packets from this socket into flow 1:1, but application
>> sets 1:2 by itself...
>
> Application cannot set whatever skb->priority, unless it really knows
> better than kernel.
>
>         case SO_PRIORITY:
>                 if ((val >= 0 && val <= 6) ||
>                     ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
>                         sk->sk_priority = val;
>                 else
>                         ret = -EPERM;
>                 break;
>

That is just a permission check when val > 6, given the fact most
daemons have root permission, I doubt your argument makes a difference
for discussion. At least with userns having root permission is more common.
--
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