Re: [PATCH v2] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 23, 2017 at 11:39:22AM -0400, Tim Hansen wrote: >Mark hlist nodes in sk rcu iterator as protected by the rcu. >hlist_next_rcu accomplishes this and silences the warnings >sparse throws for net/ipv4/udp.c and net/ipv6/udp.c. > >Found with make C=1 net/ipv4/udp.o on linux-next tag

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 04:23:57PM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 11:15:40PM +0000, Levin, Alexander (Sasha Levin) wrote: >> On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: >> >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alex

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 08:26:34PM +0000, Levin, Alexander (Sasha Levin) wrote: >> On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: >> >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wr

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: >> Fix BUG() calls to use BUG_ON(conditional) macros. >> >> This was found using make coccicheck M=net/core on linux next >> tag next-2017092 >> >> Signed-off-by: Tim

[PATCH v3] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
From: "Levin, Alexander (Sasha Levin)" <alexander.le...@one.verizon.com> This is useful for directly looking up a task based on class id rather than having to scan through all open file descriptors. Signed-off-by: Sasha Levin <alexander.le...@verizon.com> --- include/uapi/

Re: [PATCH v2] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
On Wed, Aug 16, 2017 at 01:15:57PM -0700, Cong Wang wrote: >On Wed, Aug 16, 2017 at 1:13 PM, Levin, Alexander (Sasha Levin) ><alexander.le...@verizon.com> wrote: >> Ping? > >I guess you missed the comment saying you need to check >the return value of nla_put_u32(). Ind

Re: [PATCH v2] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
Ping? On Thu, Jul 27, 2017 at 02:13:52PM -0400, Sasha Levin wrote: >This is useful for directly looking up a task based on class id rather than >having to scan through all open file descriptors. > >Signed-off-by: Sasha Levin >--- > >Changes in V2: > - Addressed

Re: [net-next PATCH 11/12] net: add notifier hooks for devmap bpf map

2017-07-30 Thread Levin, Alexander (Sasha Levin)
On Mon, Jul 17, 2017 at 09:30:02AM -0700, John Fastabend wrote: >@@ -341,9 +368,11 @@ static int dev_map_update_elem(struct bpf_map *map, void >*key, void *value, >* Remembering the driver side flush operation will happen before the >* net device is removed. >*/ >+

[PATCH v2] net: inet: diag: expose sockets cgroup classid

2017-07-27 Thread Levin, Alexander (Sasha Levin)
This is useful for directly looking up a task based on class id rather than having to scan through all open file descriptors. Signed-off-by: Sasha Levin --- Changes in V2: - Addressed comments from Cong Wang (use nla_put_u32()) include/uapi/linux/inet_diag.h | 1

Re: [PATCH] net: inet: diag: expose sockets cgroup classid

2017-07-26 Thread Levin, Alexander (Sasha Levin)
On Wed, Jul 26, 2017 at 03:01:32PM -0700, Cong Wang wrote: >On Wed, Jul 26, 2017 at 10:22 AM, Levin, Alexander (Sasha Levin) ><alexander.le...@verizon.com> wrote: >> + if (ext & (1 << (INET_DIAG_CLASS_ID - 1))) { >> + u32 classid = 0; >&

[PATCH] net: inet: diag: expose sockets cgroup classid

2017-07-26 Thread Levin, Alexander (Sasha Levin)
This is useful for directly looking up a task based on class id rather than having to scan through all open file descriptors. Signed-off-by: Sasha Levin --- include/uapi/linux/inet_diag.h | 1 + net/ipv4/inet_diag.c | 10 ++ 2 files changed, 11

[PATCH] wireless: wext: terminate ifr name coming from userspace

2017-07-17 Thread Levin, Alexander (Sasha Levin)
ifr name is assumed to be a valid string by the kernel, but nothing was forcing username to pass a valid string. In turn, this would cause panics as we tried to access the string past it's valid memory. Signed-off-by: Sasha Levin --- net/core/dev_ioctl.c | 2 ++

Re: [PATCH 00/17] v3 net generic subsystem refcount conversions

2017-07-08 Thread Levin, Alexander (Sasha Levin)
On Mon, Jul 03, 2017 at 02:28:56AM -0700, Eric Dumazet wrote: >On Fri, 2017-06-30 at 13:07 +0300, Elena Reshetova wrote: >> Changes in v3: >> Rebased on top of the net-next tree. >> >> Changes in v2: >> No changes in patches apart from rebases, but now by >> default refcount_t = atomic_t (*) and

Re: [PATCH v3 net-next 1/4] tcp: ULP infrastructure

2017-06-26 Thread Levin, Alexander (Sasha Levin)
On Mon, Jun 26, 2017 at 07:30:19AM -0700, Dave Watson wrote: >On 06/25/17 02:42 AM, Levin, Alexander (Sasha Levin) wrote: >> On Wed, Jun 14, 2017 at 11:37:14AM -0700, Dave Watson wrote: >> >Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP >> >

Re: [PATCH v3 net-next 1/4] tcp: ULP infrastructure

2017-06-24 Thread Levin, Alexander (Sasha Levin)
On Wed, Jun 14, 2017 at 11:37:14AM -0700, Dave Watson wrote: >Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP >sockets. Based on a similar infrastructure in tcp_cong. The idea is that any >ULP can add its own logic by changing the TCP proto_ops structure to its own

net: icmp vs udp_poll race?

2017-06-02 Thread Levin, Alexander (Sasha Levin)
Hi all, On the latest linux-next I'm seeing issues that look like an icmp socket destruction racing with poll(). It manifests in two ways, first: BUG: KASAN: slab-out-of-bounds in skb_queue_empty include/linux/skbuff.h:1197 [inline] BUG: KASAN: slab-out-of-bounds in udp_poll+0x5fb/0x6f0