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:	Fri, 18 Apr 2014 10:18:09 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Jamal Hadi Salim <jhs@...atatu.com>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Cong Wang <cwang@...pensource.com>
Subject: Re: [Patch net] sched, cls: check if we could overwrite actions when
 changing a filter

On Fri, Apr 18, 2014 at 7:26 AM, Jamal Hadi Salim <jhs@...atatu.com> wrote:
> Ok, let provide a slightly complex graph, sorry it is hard to do ascii
> diagram for this, so i will illustrate programmatically:
>
> if (icmp) {
>     mark with tag 11 //mark index 7
>     if (rate < 10kbs) { //policer index 1
>        return
>     } else {
>        mark with tag 12  //mark index 3
>        if (rate2 < 20kbs) {//policer index 2
>           return
>       } else {
>           mirror to dummy0 //mirred index 8
>       }
>    }
> }
>
> What does adding/deleting even mean in this case?

In this case, all the statements inside if (icmp) {} are actions, right?
Sorry, I still fail to see why not allowing to change them *together*?

IOW, what's wrong with changing if (icmp) { A } to if (icmp) { B } ?
where A and B could be any complex combination of actions.
RTNL lock guarantees this is transactional.

Users are responsible to ensure the logic of A or B is correct, not
the kernel. Kernel should allow even a wrong combination,
since there is no way to check the correctness in kernel.

I never mean to only add or remove one of them inside, although
my specific case is just for appending, my patch should allow to
overwrite all the actions together.

[...]

>
> If you really really really insist i has to be done in the kernel;
> then i would hope youd do it in some form of pseudo transacational
> approach as i described is done today in user space.
> I hope avoidance of a fat approach like 2PC as well is in order.
> Again as i said I am extremely leary of optimizing for such
> corner case since you can achieve all that in user space.
>


It is not a corner case, it is a very basic functionality we need:

We mirror icmp packets to every vethX device, when one of them
is gone, we just remove the action; when a new one comes up,
we append an action. So simple...
--
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