search for: sock_net

Displaying 20 results from an estimated 55 matches for "sock_net".

Did you mean: sock_len
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2019 Oct 23
0
[PATCH net-next 08/14] vsock: add vsock_create_connected() called by transports
...sk; } -EXPORT_SYMBOL_GPL(__vsock_create); static void __vsock_release(struct sock *sk, int level) { @@ -705,6 +704,13 @@ static int vsock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) return err; } +struct sock *vsock_create_connected(struct sock *parent) +{ + return __vsock_create(sock_net(parent), NULL, parent, GFP_KERNEL, + parent->sk_type, 0); +} +EXPORT_SYMBOL_GPL(vsock_create_connected); + s64 vsock_stream_has_data(struct vsock_sock *vsk) { return vsk->transport->stream_has_data(vsk); diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_trans...
2012 Dec 07
3
[Bridge] [PATCH net-next v4] bridge: export multicast database via netlink
...} + } + nla_nest_end(skb, nest2); + skip: + idx++; + } + } + +out: + cb->args[1] = idx; + cb->args[2] = mdb->seq; + nla_nest_end(skb, nest); + return err; +} + +static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb) +{ + struct net_device *dev; + struct net *net = sock_net(skb->sk); + struct nlmsghdr *nlh; + int idx = 0, s_idx; + + s_idx = cb->args[0]; + + rcu_read_lock(); + + for_each_netdev_rcu(net, dev) { + if (dev->priv_flags & IFF_EBRIDGE) { + struct br_port_msg *bpm; + + if (idx < s_idx) + goto skip; + + nlh = nlmsg_put(skb, NETLINK_CB...
2017 Oct 26
0
BUG: unable to handle kernel paging request in vsock_diag_dump
...1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is attached > syzkaller reproducer is attached. See https://goo.gl/kgGztJ > for information about syzkaller reproducers > > > IP: read_pnet include/net/net_namespace.h:269 [inline] > IP: sock_net include/net/sock.h:2299 [inline] > IP: vsock_diag_dump+0x290/0xa80 net/vmw_vsock/diag.c:87 Feel free to ignore my previous reply, Cong Wang <xiyou.wangcong at gmail.com> has already found the root cause. Thank you! Stefan
2012 Nov 27
3
[Bridge] [RFC PATCH 1/2] bridge: export port_no and port_id via IFA_INFO_DATA
Based on net-next. This patch exports port->port_no port->port_id in the end of IFA_INFO_DATA. Cc: Herbert Xu <herbert at gondor.apana.org.au> Cc: Stephen Hemminger <shemminger at vyatta.com> Cc: "David S. Miller" <davem at davemloft.net> Cc: Thomas Graf <tgraf at suug.ch> Cc: Jesper Dangaard Brouer <brouer at redhat.com> Signed-off-by: Cong Wang
2018 Jan 04
9
[Bug 1210] New: nftables gets confused by user namespaces when meta skuid is used
https://bugzilla.netfilter.org/show_bug.cgi?id=1210 Bug ID: 1210 Summary: nftables gets confused by user namespaces when meta skuid is used Product: nftables Version: unspecified Hardware: All OS: All Status: NEW Severity: critical Priority: P5 Component: nft
2012 Dec 07
3
[Bridge] [PATCH net-next v5] bridge: export multicast database via netlink
...; + goto out; + } + } + } + nla_nest_end(skb, nest2); + skip: + idx++; + } + } + +out: + cb->args[1] = idx; + nla_nest_end(skb, nest); + return err; +} + +static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb) +{ + struct net_device *dev; + struct net *net = sock_net(skb->sk); + struct nlmsghdr *nlh = NULL; + int idx = 0, s_idx; + + s_idx = cb->args[0]; + + rcu_read_lock(); + + /* TODO: in case of rehashing, we need to check + * consistency for dumping. + */ + cb->seq = net->dev_base_seq; + + for_each_netdev_rcu(net, dev) { + if (dev->priv_fla...
2012 Dec 05
2
[Bridge] [PATCH net-next v3] bridge: export multicast database via netlink
...} + } + nla_nest_end(skb, nest2); + skip: + idx++; + } + } + +out: + cb->args[1] = idx; + cb->args[2] = mdb->seq; + nla_nest_end(skb, nest); + return err; +} + +static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb) +{ + struct net_device *dev; + struct net *net = sock_net(skb->sk); + struct nlmsghdr *nlh; + int idx = 0, s_idx; + + s_idx = cb->args[0]; + + rcu_read_lock(); + + for_each_netdev_rcu(net, dev) { + if (dev->priv_flags & IFF_EBRIDGE) { + struct br_port_msg *bpm; + + if (idx < s_idx) + goto cont; + + nlh = nlmsg_put(skb, NETLINK_CB...
2019 Nov 14
15
[PATCH net-next v2 00/15] vsock: add multi-transports support
Most of the patches are reviewed by Dexuan, Stefan, and Jorgen. The following patches need reviews: - [11/15] vsock: add multi-transports support - [12/15] vsock/vmci: register vmci_transport only when VMCI guest/host are active - [15/15] vhost/vsock: refuse CID assigned to the guest->host transport RFC: https://patchwork.ozlabs.org/cover/1168442/ v1:
2017 Oct 24
4
BUG: unable to handle kernel paging request in vsock_diag_dump
...em/net-next.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached. C reproducer is attached syzkaller reproducer is attached. See https://goo.gl/kgGztJ for information about syzkaller reproducers IP: read_pnet include/net/net_namespace.h:269 [inline] IP: sock_net include/net/sock.h:2299 [inline] IP: vsock_diag_dump+0x290/0xa80 net/vmw_vsock/diag.c:87 PGD 21fff4067 P4D 21fff4067 PUD 21fff3067 PMD 21fff2067 PTE 0 Oops: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 2986 Comm: syzkaller165749 Not tainted 4.1...
2017 Oct 24
4
BUG: unable to handle kernel paging request in vsock_diag_dump
...em/net-next.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached. C reproducer is attached syzkaller reproducer is attached. See https://goo.gl/kgGztJ for information about syzkaller reproducers IP: read_pnet include/net/net_namespace.h:269 [inline] IP: sock_net include/net/sock.h:2299 [inline] IP: vsock_diag_dump+0x290/0xa80 net/vmw_vsock/diag.c:87 PGD 21fff4067 P4D 21fff4067 PUD 21fff3067 PMD 21fff2067 PTE 0 Oops: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 2986 Comm: syzkaller165749 Not tainted 4.1...
2014 Aug 20
0
[PATCH] vhost: Add polling mode
...e, "Stop continuous polling of virtqueue after this many jiffies of no work."); > > enum { > VHOST_MEMORY_MAX_NREGIONS = 64, So how does one know whether the heuristic works? We need some kind of counter here. E.g. sk_busy_loop uses NET_ADD_STATS_BH(sock_net(sk), LINUX_MIB_BUSYPOLLRXPACKETS, rc); > @@ -58,27 +66,28 @@ static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync, > return 0; > } > > -void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn) > +void vho...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...+ pr_debug("%s: sk->sk_ack_backlog=%d\n", __func__, > + sk->sk_ack_backlog); > + virtio_transport_send_reset(vsk, pkt); > + return -ECONNREFUSED; > + } > + > + /* So no pending socket are responsible for this pkt, create one */ > + pending = __vsock_create(sock_net(sk), NULL, sk, GFP_KERNEL, > + sk->sk_type); > + if (!pending) { > + virtio_transport_send_reset(vsk, pkt); > + return -ENOMEM; > + } > + pr_debug("virtio_transport_recv_listen: create pending\n"); > + > + vpending = vsock_sk(pending); > + vsock_addr_in...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...+ pr_debug("%s: sk->sk_ack_backlog=%d\n", __func__, > + sk->sk_ack_backlog); > + virtio_transport_send_reset(vsk, pkt); > + return -ECONNREFUSED; > + } > + > + /* So no pending socket are responsible for this pkt, create one */ > + pending = __vsock_create(sock_net(sk), NULL, sk, GFP_KERNEL, > + sk->sk_type); > + if (!pending) { > + virtio_transport_send_reset(vsk, pkt); > + return -ENOMEM; > + } > + pr_debug("virtio_transport_recv_listen: create pending\n"); > + > + vpending = vsock_sk(pending); > + vsock_addr_in...
2017 Oct 26
0
BUG: unable to handle kernel paging request in vsock_diag_dump
...1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is attached > syzkaller reproducer is attached. See https://goo.gl/kgGztJ > for information about syzkaller reproducers > > > IP: read_pnet include/net/net_namespace.h:269 [inline] > IP: sock_net include/net/sock.h:2299 [inline] > IP: vsock_diag_dump+0x290/0xa80 net/vmw_vsock/diag.c:87 [ 41.303353] BUG: unable to handle kernel paging request at fffffbffffffff70 Unfortunately the reproducer doesn't hit the issue on my machine (even after multiple runs). Is it possible to get the...
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...to_cpu(pkt->hdr.op) != VIRTIO_VSOCK_OP_REQUEST) { + virtio_transport_send_reset(vsk, pkt); + return -EINVAL; + } + + if (sk_acceptq_is_full(sk)) { + virtio_transport_send_reset(vsk, pkt); + return -ENOMEM; + } + + pr_debug("%s: create pending\n", __func__); + child = __vsock_create(sock_net(sk), NULL, sk, GFP_KERNEL, + sk->sk_type, 0); + if (!child) { + virtio_transport_send_reset(vsk, pkt); + return -ENOMEM; + } + + sk->sk_ack_backlog++; + + lock_sock(child); + + child->sk_state = SS_CONNECTED; + + vchild = vsock_sk(child); + vsock_addr_init(&vchild->local_...
2013 Jun 27
0
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...>= sk->sk_max_ack_backlog) { + pr_debug("%s: sk->sk_ack_backlog=%d\n", __func__, + sk->sk_ack_backlog); + virtio_transport_send_reset(vsk, pkt); + return -ECONNREFUSED; + } + + /* So no pending socket are responsible for this pkt, create one */ + pending = __vsock_create(sock_net(sk), NULL, sk, GFP_KERNEL, + sk->sk_type); + if (!pending) { + virtio_transport_send_reset(vsk, pkt); + return -ENOMEM; + } + pr_debug("virtio_transport_recv_listen: create pending\n"); + + vpending = vsock_sk(pending); + vsock_addr_init(&vpending->local_addr, pkt->hdr....
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
This series adds the multi-transports support to vsock, following this proposal: https://www.spinics.net/lists/netdev/msg575792.html With the multi-transports support, we can use VSOCK with nested VMs (using also different hypervisors) loading both guest->host and host->guest transports at the same time. Before this series, vmci-transport supported this behavior but only using VMware
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
This series adds the multi-transports support to vsock, following this proposal: https://www.spinics.net/lists/netdev/msg575792.html With the multi-transports support, we can use VSOCK with nested VMs (using also different hypervisors) loading both guest->host and host->guest transports at the same time. Before this series, vmci-transport supported this behavior but only using VMware