Re: [PATCH] net: geneve: Fix a possible null-pointer dereference in geneve_link_config()

2019-07-29 Thread Jiri Benc
On Mon, 29 Jul 2019 12:30:55 +0200, Jiri Benc wrote: > Are you sure rt6_lookup can never return a non-NULL rt with rt->dst.dev > being NULL? You'd leak the reference in such case. In fact, you're introducing a bug, not fixing one. ip6_rt_put does accept NULL parameter. And i

Re: [PATCH] net: geneve: Fix a possible null-pointer dereference in geneve_link_config()

2019-07-29 Thread Jiri Benc
On Mon, 29 Jul 2019 18:26:11 +0800, Jia-Ju Bai wrote: > --- a/drivers/net/geneve.c > +++ b/drivers/net/geneve.c > @@ -1521,9 +1521,10 @@ static void geneve_link_config(struct net_device *dev, > rt = rt6_lookup(geneve->net, &info->key.u.ipv6.dst, NULL, 0, >

Re: [PATCH AUTOSEL 5.2 226/249] selftests: bpf: fix inlines in test_lwt_seg6local

2019-07-19 Thread Jiri Benc
On Thu, 18 Jul 2019 11:55:34 -0700 (PDT), David Miller wrote: > It has a significant impact on automated testing which lots of > individuals and entities perform, therefore I think it very much is > -stable material. Okay. Thanks, Jiri

Re: [PATCH AUTOSEL 5.2 226/249] selftests: bpf: fix inlines in test_lwt_seg6local

2019-07-18 Thread Jiri Benc
On Wed, 17 Jul 2019 19:47:57 -0400, Sasha Levin wrote: > It fixes a bug, right? A bug in selftests. And quite likely, it probably happens only with some compiler versions. I don't think patches only touching tools/testing/selftests/ qualify for stable in general. They don't affect the end users.

Re: [PATCH AUTOSEL 5.2 226/249] selftests: bpf: fix inlines in test_lwt_seg6local

2019-07-17 Thread Jiri Benc
On Mon, 15 Jul 2019 09:46:31 -0400, Sasha Levin wrote: > From: Jiri Benc > > [ Upstream commit 11aca65ec4db09527d3e9b6b41a0615b7da4386b ] > > Selftests are reporting this failure in test_lwt_seg6local.sh: I don't think this is critical in any way and I don't think

Re: [PATCH net 1/1 v4] rtnetlink: require unique netns identifier

2018-02-07 Thread Jiri Benc
se of passing multiple netns identifying properties into > the same request EINVAL seems the perfect candidate and the error > message seems instructive to userspace programs. Agreed. Acked-by: Jiri Benc Thanks, Jiri

Re: [PATCH net 1/1 v3] rtnetlink: require unique netns identifier

2018-02-07 Thread Jiri Benc
On Tue, 6 Feb 2018 14:19:02 +0100, Christian Brauner wrote: > +/* Verify that rtnetlink requests supporting network namespace ids > + * do not pass additional properties potentially referring to different > + * network namespaces. > + */ > +static int rtnl_ensure_unique_netns(struct nlattr *tb[],

Re: [PATCH net 1/1 v2] rtnetlink: require unique netns identifier

2018-02-07 Thread Jiri Benc
On Tue, 06 Feb 2018 16:31:29 -0600, Eric W. Biederman wrote: > Frankly. If we are talking precedence it should be: > fds > netnsids > pids The current order is 1. pids, 2. fds, though. Not that it matters much, see below. > I do think it makes a lot of sense to error if someone passes in > dupli

Re: [PATCH net-next 0/3 V1] rtnetlink: enable IFLA_IF_NETNSID for RTM_{DEL,SET}LINK

2018-01-26 Thread Jiri Benc
On Fri, 26 Jan 2018 00:34:51 +0100, Nicolas Dichtel wrote: > Why meaningful? The user knows that the answer is like if if was done in > another > netns. It enables to have only one netlink socket instead of one per netns. > But > the code using it will be the same. Because you can't use it to

Re: [PATCH net-next 0/3 V1] rtnetlink: enable IFLA_IF_NETNSID for RTM_{DEL,SET}LINK

2018-01-25 Thread Jiri Benc
On Thu, 25 Jan 2018 15:20:59 +0100, Nicolas Dichtel wrote: > Hmm, I don't agree. For me, it would be the correct answer. If user has a > socket > in ns_a and targets a RTM_GETLINK in ns_b, the answer he gets should be like > if > it was done in ns_b. But that information would be useless for the

Re: [PATCH net-next 0/3 V1] rtnetlink: enable IFLA_IF_NETNSID for RTM_{DEL,SET}LINK

2018-01-24 Thread Jiri Benc
On Wed, 24 Jan 2018 16:24:34 +0100, Nicolas Dichtel wrote: > I wonder if it would be possible to do something in the netlink framework, > like > NETLINK_LISTEN_ALL_NSID. > Having some ancillary data at the netlink socket level and a function like > nlsock_net() (instead of sock_net()) to get the c

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-24 Thread Jiri Benc
On Wed, 24 Jan 2018 11:53:11 +0100, Nicolas Dichtel wrote: > Le 23/01/2018 à 18:08, Jiri Benc a écrit : > > It would be much better if the whole (ifindex, netnsid) pair was > > returned. I think it could be added. > Sure. Do you plan to send a patch? I can do that but it will

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
On Tue, 23 Jan 2018 17:37:11 +0100, Nicolas Dichtel wrote: > When a virtual interface moves to another netns, the netlink RTM_DELLINK > message > contains the attribute IFLA_NEW_NETNSID, which identifies where the interface > moves. The nsid may be allocated if needed. The problem is that ifindex

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
On Tue, 23 Jan 2018 11:26:58 +0100, Wolfgang Bumiller wrote: > Even if you know the netnsid, do the mentioned watches work for > nested/child namespaces if eg. a container creates new namespace before > and/or after the watch was established and moves interfaces to these > child namespaces, would y

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
On Mon, 22 Jan 2018 23:25:41 +0100, Christian Brauner wrote: > This is not necessarily true in scenarios where I move a network device > via RTM_NEWLINK + IFLA_NET_NS_PID into a network namespace I haven't > created. Here is an example: > > nlmsghdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; > nlms

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-22 Thread Jiri Benc
On Mon, 22 Jan 2018 22:23:54 +0100, Christian Brauner wrote: > That is certainly a good idea and I'm happy to send a follow-up patch > for that! Note that I haven't looked into that and I don't know whether it is easily possible. I'll appreciate if you could try that. > But there's still value in

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-22 Thread Jiri Benc
On Thu, 18 Jan 2018 21:55:53 +0100, Christian Brauner wrote: > A more concrete scenario is creating a network namespace, moving a > device into it via RTM_SETLINK which also supports IFLA_NET_NS_{FD,PID} > and then wanting to query the device. This would be very easy to do if > one could reuse the

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-18 Thread Jiri Benc
On Thu, 18 Jan 2018 21:21:24 +0100, Christian Brauner wrote: > In such scenarios setting a netns id property is > not really wanted Why? I think that's what you should do if you want to avoid setns. Just use netnsid. I don't see any problem with that and you didn't provide any explanation. Jiri

Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-06 Thread Jiri Benc
On Mon, 6 Nov 2017 15:04:54 +, Colin King wrote: > The size for IFLA_IF_NETNSID is missing from the size calculation > because the proceeding semicolon was not removed. Fix this by removing > the semicolon. Acked-by: Jiri Benc Thanks for spotting this! Looking at my initial co

Re: [PATCH net-next 2/2] vxlan: add back error messages to vxlan_config_validate() as extended netlink acks

2017-06-28 Thread Jiri Benc
On Tue, 27 Jun 2017 22:47:58 +0200, Matthias Schiffer wrote: > if ((conf->flags & ~VXLAN_F_ALLOWED_GPE) || > !(conf->flags & VXLAN_F_COLLECT_METADATA)) { > + NL_SET_ERR_MSG(extack, > +"unsupported combination of

Re: [PATCH net-next 1/2] vxlan: change vxlan_validate() to use netlink_ext_ack for error reporting

2017-06-28 Thread Jiri Benc
On Tue, 27 Jun 2017 22:47:57 +0200, Matthias Schiffer wrote: > if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) { > - pr_debug("invalid all zero ethernet address\n"); > + NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_ADDRESS], > +

Re: [PATCH net-next v3 1/6] vxlan: refactor verification and application of configuration

2017-06-23 Thread Jiri Benc
This patchset looks good overall (would send my Acked-by for most of this but I'm late). On Mon, 19 Jun 2017 10:03:55 +0200, Matthias Schiffer wrote: > Log messages in these > functions are removed, as it is generally unexpected to find error output > for netlink requests in the kernel log. Usersp

Re: [PATCH net v2] openvswitch: Fix ovs_flow_key_update()

2017-03-30 Thread Jiri Benc
ixes: 329f45bc4f19 ("openvswitch: add mac_proto field to the flow key") > Signed-off-by: Yi-Hung Wei Acked-by: Jiri Benc Thanks! Jiri

Re: [PATCH net] openvswitch: Fix ovs_flow_key_update()

2017-03-30 Thread Jiri Benc
On Thu, 30 Mar 2017 11:39:35 -0700, Yi-Hung Wei wrote: > If we invalidate a flow key of a L3 packet, the flow's mac_proto is like this > (MAC_PROTO_NONE | SW_FLOW_KEY_INVALID), then key_extract() will > process the link layer of this L3 packet since mac_proto !=MAC_PROTO_NONE? > > In this case, sh

Re: [PATCH net] openvswitch: Fix ovs_flow_key_update()

2017-03-30 Thread Jiri Benc
On Wed, 29 Mar 2017 17:14:10 -0700, Yi-Hung Wei wrote: > ovs_flow_key_update() is called when the flow key is invalid, and it is > used to update and revalidate the flow key. Commit 329f45bc4f19 > ("openvswitch: add mac_proto field to the flow key") introduces mac_proto > field to flow key and use

Re: [PATCH net-next 3/3] vxlan: allow multiple VXLANs with same VNI for IPv6 link-local addresses

2017-03-15 Thread Jiri Benc
On Wed, 15 Mar 2017 15:29:29 +0100, Matthias Schiffer wrote: > While ensuring that the destination address is link-local iff the source > address is would also be an option, it didn't seem too useful as the > destination address will be a multicast address anyways in "normal" VXLAN > configurations

Re: [PATCH net-next 3/3] vxlan: allow multiple VXLANs with same VNI for IPv6 link-local addresses

2017-03-14 Thread Jiri Benc
On Fri, 10 Mar 2017 23:39:44 +0100, Matthias Schiffer wrote: > @@ -233,17 +234,30 @@ static struct vxlan_dev *vxlan_vs_find_vni(struct > vxlan_sock *vs, __be32 vni) > vni = 0; > > hlist_for_each_entry_rcu(vxlan, vni_head(vs, vni), hlist) { > - if (vxlan->default_d

Re: [PATCH net-next 2/3] vxlan: fix snooping for link-local IPv6 addresses

2017-03-14 Thread Jiri Benc
On Fri, 10 Mar 2017 23:39:43 +0100, Matthias Schiffer wrote: > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -941,16 +941,24 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct > netlink_callback *cb, > */ > static bool vxlan_snoop(struct net_device *dev, >

Re: [PATCH net-next 1/3] vxlan: don't allow link-local IPv6 local/remote addresses without interface

2017-03-14 Thread Jiri Benc
On Fri, 10 Mar 2017 23:39:42 +0100, Matthias Schiffer wrote: > Signed-off-by: Matthias Schiffer Acked-by: Jiri Benc

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-09 Thread Jiri Benc
On Wed, 07 Dec 2016 23:34:21 -0500, Daniel Kahn Gillmor wrote: > fwiw, i'm not convinced that "most protocols of the IETF follow this > mantra". we've had multiple discussions in different protocol groups > about shaving or bloating by a few bytes here or there in different > protocols, and i don'

Re: [PATCH v2] vxlan: fix a potential issue when create a new vxlan fdb entry.

2016-11-29 Thread Jiri Benc
On Tue, 29 Nov 2016 09:59:36 +0800, Haishuang Yan wrote: > vxlan_fdb_append may return error, so add the proper check, > otherwise it will cause memory leak. > > Signed-off-by: Haishuang Yan > > Changes in v2: > - Unnecessary to initialize rc to zero. Acked-by: Jiri Benc

Re: [PATCH] vxlan: fix a potential issue when create a new vxlan fdb entry.

2016-11-28 Thread Jiri Benc
On Mon, 28 Nov 2016 15:02:23 +0800, Haishuang Yan wrote: > vxlan_fdb_append may return error, so add the proper check, > otherwise it will cause memory leak. > > Signed-off-by: Haishuang Yan > --- > drivers/net/vxlan.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff

Re: [PATCH] vxlan: hide unused local variable

2016-11-09 Thread Jiri Benc
ned-off-by: Arnd Bergmann I think this should be applied instead of Pravin's patch. It fixes just the one problem, contains the proper Fixes: tag and addresses net.git. Acked-by: Jiri Benc

Re: [PATCH net-next 4/6] net: use core MTU range checking in core net infra

2016-10-19 Thread Jiri Benc
On Tue, 18 Oct 2016 22:33:31 -0400, Jarod Wilson wrote: > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -2367,43 +2367,31 @@ static void vxlan_set_multicast_list(struct > net_device *dev) > { > } > > -static int __vxlan_change_mtu(struct net_device *dev, > -

Re: [PATCH net v2] L2TP:Adjust intf MTU,factor underlay L3,overlay L2

2016-09-29 Thread Jiri Benc
On Wed, 28 Sep 2016 19:36:45 -0700 (PDT), R. Parameswaran wrote: > I'd like to point out one difference with VXLAN - in VXLAN, the > local physical interface is directly specified at the time of > creation of the tunnel, and the data structure seems to have the ifindex > of the local interface w

Re: [PATCH v2 0/2] make POSIX timers optional

2016-09-21 Thread Jiri Benc
On Wed, 21 Sep 2016 10:38:52 +0200, Richard Cochran wrote: > Embedded people like to optimize their systems. One pattern I have > more than once is that a multihomed design designates a special PTP > interface, often with a different HW than the other ports. PTP > support adds extra code into the

Re: [PATCH v2 0/2] make POSIX timers optional

2016-09-21 Thread Jiri Benc
On Tue, 20 Sep 2016 23:09:52 +0200 (CEST), Thomas Gleixner wrote: > Now if you want to distangle PTP from a driver then you split it at the > driver level and not at the PTP level: > > DRIVER_X > tristate "Driver X" > > DRIVER_X_PTP > bool "Enable PTP suppo

Re: [PATCH 1/2] ptp_clock: allow for it to be optional

2016-09-19 Thread Jiri Benc
On Mon, 19 Sep 2016 10:10:21 -0400 (EDT), Nicolas Pitre wrote: > --- a/include/linux/ptp_clock_kernel.h > +++ b/include/linux/ptp_clock_kernel.h > @@ -207,7 +207,16 @@ int ptp_find_pin(struct ptp_clock *ptp, > #else > static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info > *in

Re: [PATCH 1/2] ptp_clock: allow for it to be optional

2016-09-19 Thread Jiri Benc
On Sun, 18 Sep 2016 23:51:09 -0400, Nicolas Pitre wrote: > And to make it possible for PTP to be configured out, the select statement > in the Kconfig entry for those ethernet drivers is changed from selecting > PTP_1588_CLOCK to PTP_1588_CLOCK_SELECTED whose purpose is to indicate the > default Kc

Re: [PATCH] [RFC] proc connector: add namespace events

2016-09-14 Thread Jiri Benc
On Tue, 13 Sep 2016 16:42:43 +0200, Alban Crequy wrote: > Note that I will probably not have the chance to spend more time on > this patch soon because Iago will explore other methods with > eBPF+kprobes instead. eBPF+kprobes would not have the same API > stability though. I was curious to see if a

Re: [PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err.

2016-09-04 Thread Jiri Benc
flags, udp_sum); > if (err < 0) { > dst_release(ndst); > + dev->stats.tx_errors++; > return; > } > udp_tunnel6_xmit_skb(ndst, sk, skb, dev, Acked-by: Jiri Benc The error path in vxlan_xmit_one deserves complete rework, though. Jiri

Re: [PATCH 0746/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Jiri Benc
On Tue, 2 Aug 2016 19:42:14 +0800, Baole Ni wrote: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access permission. > As we know, these numeric value for access permission have had the > corresponding macro, > and

[PATCH] virtio: silence compiler warning

2016-04-27 Thread Jiri Benc
gcc 4.8.5 emits the following false positive: drivers/virtio/virtio_ring.c: In function 'vring_create_virtqueue': drivers/virtio/virtio_ring.c:1032:5: warning: 'queue' may be used uninitialized in this function [-Wmaybe-uninitialized] Silence it. Signed-off-by: Jiri Benc

Re: [PATCH] vxlan: Refactor vxlan_udp_encap_recv() to kill compiler warning

2015-09-04 Thread Jiri Benc
y > getting rid of the pointer intermediary and referring directly to the > ip_tunnel_info structure. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Jiri Benc -- Jiri Benc -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mess

Re: [PATCH] route: put lwstate before freeing dst to avoid use after free

2015-08-26 Thread Jiri Benc
uot;route: move lwtunnel state to dst_entry") > Signed-off-by: Sasha Levin Already fixed by e252b3d1a174 in net-next. Jiri -- Jiri Benc -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: Network drivers that don't suspend on interface down

2006-12-20 Thread Jiri Benc
rted yet by any wireless driver/stack, unfortunately. Thanks, Jiri -- Jiri Benc SUSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC] rfkill - Add support for input key to control wireless radio

2006-12-06 Thread Jiri Benc
onfig option > > indicates that > > userspace wants to handle the event. > > I don't think a config option is a good idea unless by config option > you mean a sysfs attribute. What about using EVIOCGRAB ioctl for this? Jiri -- Jiri Benc SUSE Labs - To unsubscribe fr

Re: [BUG] Tulip for ULi M5263: No packets transmitted

2005-07-25 Thread Jiri Benc
uess the driver thinks the card is screwed up and can't transmit. Does tulip-fixes-for-uli5261.patch from -mm tree help? http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc3/2.6.13-rc3-mm1/broken-out/tulip-fixes-for-uli5261.patch -- Jiri Benc SUSE Labs - To unsubscribe fr