Re: [PATCH 2/5] net: add bind/listen ranges to net cgroup

2016-08-16 Thread Alexei Starovoitov
On Mon, Aug 15, 2016 at 12:05:40PM -0700, Mahesh Bandewar wrote: > On Fri, Aug 12, 2016 at 9:29 PM, Alexei Starovoitov > wrote: > [...] > >> +static bool range_in_ranges(struct net_range *r, struct net_ranges *rs) > >> +{ > >> + int ri; > >> + > >> + for (ri

Re: [PATCH 2/5] net: add bind/listen ranges to net cgroup

2016-08-15 Thread Mahesh Bandewar
On Fri, Aug 12, 2016 at 9:29 PM, Alexei Starovoitov wrote: [...] >> +static bool range_in_ranges(struct net_range *r, struct net_ranges *rs) >> +{ >> + int ri; >> + >> + for (ri = 0; ri < rs->num_entries; ri++) >> + if (r->min_value >=

Re: [PATCH 2/5] net: add bind/listen ranges to net cgroup

2016-08-12 Thread Alexei Starovoitov
On Wed, Aug 10, 2016 at 05:53:15PM -0700, Anoop Naravaram wrote: > bind port ranges > > This property controls which ports the processes in a cgroup are allowed > to bind to. If a process in a cgroup tries to bind a socket to a port > that is not within the range(s) permitted by

[PATCH 2/5] net: add bind/listen ranges to net cgroup

2016-08-10 Thread Anoop Naravaram
bind port ranges This property controls which ports the processes in a cgroup are allowed to bind to. If a process in a cgroup tries to bind a socket to a port that is not within the range(s) permitted by the cgroup, it will receive an EACCES error. >From userspace, you can get