Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next 0/5] net: remove trans_start from struct net_device
From: David Miller @ 2016-05-04 18:17 UTC (permalink / raw)
  To: fw; +Cc: netdev, linux-kernel
In-Reply-To: <1462285862-30946-1-git-send-email-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Tue,  3 May 2016 16:30:57 +0200

> We currently have two instances for trans_start, once in
> net_device and once in netdev_queue.
> 
> This series removes trans_start from net_device.
> Updates to dev->trans_start are replaced with updates to netdev queue 0.

Series applied, of course sans patch #1 which you resubmitted separately.

Thanks.

^ permalink raw reply

* Re: [PATCH] tcp: ensure non-empty connection request queue
From: Eric Dumazet @ 2016-05-04 18:18 UTC (permalink / raw)
  To: Rick Jones; +Cc: Peter Wu, David S . Miller, netdev, Eric Dumazet, Kui Zhang
In-Reply-To: <572A39E6.1020001@hpe.com>

On Wed, 2016-05-04 at 11:05 -0700, Rick Jones wrote:

> Assuming Peter's assertion about just drops when syncookies are not 
> enabled is accurate, should there be some one-time message in that case too?

We have plenty of drop points in the kernel without a message in syslog,
but proper SNMP counter updates.

Look at my recent commit 
9caad864151e525 ("tcp: increment sk_drops for listeners")

"ss -tm state listening" will show you the drop count per listener.

^ permalink raw reply

* Re: pull request [net]: batman-adv 20160430
From: Antonio Quartulli @ 2016-05-04 18:18 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <20160504.141350.1935086155659300721.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

On Wed, May 04, 2016 at 02:13:50PM -0400, David Miller wrote:
> 
> Just FYI I did this last night.

Thanks a lot for letting me know David.

Cheers,

-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATC net-next] tcp: must block bh in __inet_twsk_hashdance()
From: Eric Dumazet @ 2016-05-04 18:22 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20160504.005450.32648328658519474.davem@davemloft.net>

On Wed, 2016-05-04 at 00:54 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Tue, 03 May 2016 17:10:50 -0700
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > __inet_twsk_hashdance() might be called from process context,
> > better block BH before acquiring bind hash and established locks
> > 
> > Fixes: c10d9310edf5 ("tcp: do not assume TCP code is non preemptible")
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> Applied.

David, I do not see these two patches in net-next ?

(This one, and the "tcp: fix lockdep splat in tcp_snd_una_update()" one)

Thanks

^ permalink raw reply

* [RESEND PATCH 2/3] fs: poll/select/recvmmsg: use timespec64 for timeout events
From: Deepa Dinamani @ 2016-05-04 19:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: arnd, y2038, netdev, john.stultz, Alexander Viro, linux-fsdevel,
	tglx, David S. Miller
In-Reply-To: <1461947989-21926-3-git-send-email-deepa.kernel@gmail.com>

struct timespec is not y2038 safe.
Even though timespec might be sufficient to represent
timeouts, use struct timespec64 here as the plan is to
get rid of all timespec reference in the kernel.

The patch transitions the common functions:
poll_select_set_timeout() and select_estimate_accuracy()
to use timespec64. And, all the syscalls that use these
functions are transitioned in the same patch.

The restart block parameters for poll uses monotonic time.
Use timespec64 here as well to assign timeout value. This
parameter in the restart block need not change because
this only holds the monotonic timestamp at which timeout
should occur. And, unsigned long data type should be big
enough for this timestamp.

The system call interfaces will be handled in a separate
series.

Compat interfaces need not change as timespec64 is an
alias to struct timespec on a 64 bit system.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
Resending to include John and Thomas on this patch as well.
This is to include this patch also in John's tree.
This will let all 3 patches in the series to merged through the same tree.
 
 fs/eventpoll.c       | 12 +++++-----
 fs/select.c          | 67 +++++++++++++++++++++++++++++-----------------------
 include/linux/poll.h | 11 +++++----
 net/socket.c         |  8 ++++---
 4 files changed, 54 insertions(+), 44 deletions(-)

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 8a74a2a..10db912 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1583,15 +1583,15 @@ static int ep_send_events(struct eventpoll *ep,
 	return ep_scan_ready_list(ep, ep_send_events_proc, &esed, 0, false);
 }
 
-static inline struct timespec ep_set_mstimeout(long ms)
+static inline struct timespec64 ep_set_mstimeout(long ms)
 {
-	struct timespec now, ts = {
+	struct timespec64 now, ts = {
 		.tv_sec = ms / MSEC_PER_SEC,
 		.tv_nsec = NSEC_PER_MSEC * (ms % MSEC_PER_SEC),
 	};
 
-	ktime_get_ts(&now);
-	return timespec_add_safe(now, ts);
+	ktime_get_ts64(&now);
+	return timespec64_add_safe(now, ts);
 }
 
 /**
@@ -1621,11 +1621,11 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
 	ktime_t expires, *to = NULL;
 
 	if (timeout > 0) {
-		struct timespec end_time = ep_set_mstimeout(timeout);
+		struct timespec64 end_time = ep_set_mstimeout(timeout);
 
 		slack = select_estimate_accuracy(&end_time);
 		to = &expires;
-		*to = timespec_to_ktime(end_time);
+		*to = timespec64_to_ktime(end_time);
 	} else if (timeout == 0) {
 		/*
 		 * Avoid the unnecessary trip to the wait queue loop, if the
diff --git a/fs/select.c b/fs/select.c
index 8692939..8ed9da5 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -47,7 +47,7 @@
 
 #define MAX_SLACK	(100 * NSEC_PER_MSEC)
 
-static long __estimate_accuracy(struct timespec *tv)
+static long __estimate_accuracy(struct timespec64 *tv)
 {
 	long slack;
 	int divfactor = 1000;
@@ -70,10 +70,10 @@ static long __estimate_accuracy(struct timespec *tv)
 	return slack;
 }
 
-u64 select_estimate_accuracy(struct timespec *tv)
+u64 select_estimate_accuracy(struct timespec64 *tv)
 {
 	u64 ret;
-	struct timespec now;
+	struct timespec64 now;
 
 	/*
 	 * Realtime tasks get a slack of 0 for obvious reasons.
@@ -82,8 +82,8 @@ u64 select_estimate_accuracy(struct timespec *tv)
 	if (rt_task(current))
 		return 0;
 
-	ktime_get_ts(&now);
-	now = timespec_sub(*tv, now);
+	ktime_get_ts64(&now);
+	now = timespec64_sub(*tv, now);
 	ret = __estimate_accuracy(&now);
 	if (ret < current->timer_slack_ns)
 		return current->timer_slack_ns;
@@ -260,7 +260,7 @@ EXPORT_SYMBOL(poll_schedule_timeout);
 
 /**
  * poll_select_set_timeout - helper function to setup the timeout value
- * @to:		pointer to timespec variable for the final timeout
+ * @to:		pointer to timespec64 variable for the final timeout
  * @sec:	seconds (from user space)
  * @nsec:	nanoseconds (from user space)
  *
@@ -269,26 +269,28 @@ EXPORT_SYMBOL(poll_schedule_timeout);
  *
  * Returns -EINVAL if sec/nsec are not normalized. Otherwise 0.
  */
-int poll_select_set_timeout(struct timespec *to, long sec, long nsec)
+int poll_select_set_timeout(struct timespec64 *to, time64_t sec, long nsec)
 {
-	struct timespec ts = {.tv_sec = sec, .tv_nsec = nsec};
+	struct timespec64 ts = {.tv_sec = sec, .tv_nsec = nsec};
 
-	if (!timespec_valid(&ts))
+	if (!timespec64_valid(&ts))
 		return -EINVAL;
 
 	/* Optimize for the zero timeout value here */
 	if (!sec && !nsec) {
 		to->tv_sec = to->tv_nsec = 0;
 	} else {
-		ktime_get_ts(to);
-		*to = timespec_add_safe(*to, ts);
+		ktime_get_ts64(to);
+		*to = timespec64_add_safe(*to, ts);
 	}
 	return 0;
 }
 
-static int poll_select_copy_remaining(struct timespec *end_time, void __user *p,
+static int poll_select_copy_remaining(struct timespec64 *end_time,
+				      void __user *p,
 				      int timeval, int ret)
 {
+	struct timespec64 rts64;
 	struct timespec rts;
 	struct timeval rtv;
 
@@ -302,16 +304,18 @@ static int poll_select_copy_remaining(struct timespec *end_time, void __user *p,
 	if (!end_time->tv_sec && !end_time->tv_nsec)
 		return ret;
 
-	ktime_get_ts(&rts);
-	rts = timespec_sub(*end_time, rts);
-	if (rts.tv_sec < 0)
-		rts.tv_sec = rts.tv_nsec = 0;
+	ktime_get_ts64(&rts64);
+	rts64 = timespec64_sub(*end_time, rts64);
+	if (rts64.tv_sec < 0)
+		rts64.tv_sec = rts64.tv_nsec = 0;
+
+	rts = timespec64_to_timespec(rts64);
 
 	if (timeval) {
 		if (sizeof(rtv) > sizeof(rtv.tv_sec) + sizeof(rtv.tv_usec))
 			memset(&rtv, 0, sizeof(rtv));
-		rtv.tv_sec = rts.tv_sec;
-		rtv.tv_usec = rts.tv_nsec / NSEC_PER_USEC;
+		rtv.tv_sec = rts64.tv_sec;
+		rtv.tv_usec = rts64.tv_nsec / NSEC_PER_USEC;
 
 		if (!copy_to_user(p, &rtv, sizeof(rtv)))
 			return ret;
@@ -396,7 +400,7 @@ static inline void wait_key_set(poll_table *wait, unsigned long in,
 		wait->_key |= POLLOUT_SET;
 }
 
-int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
+int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time)
 {
 	ktime_t expire, *to = NULL;
 	struct poll_wqueues table;
@@ -522,7 +526,7 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
 		 * pointer to the expiry value.
 		 */
 		if (end_time && !to) {
-			expire = timespec_to_ktime(*end_time);
+			expire = timespec64_to_ktime(*end_time);
 			to = &expire;
 		}
 
@@ -545,7 +549,7 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
  * I'm trying ERESTARTNOHAND which restart only when you want to.
  */
 int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
-			   fd_set __user *exp, struct timespec *end_time)
+			   fd_set __user *exp, struct timespec64 *end_time)
 {
 	fd_set_bits fds;
 	void *bits;
@@ -622,7 +626,7 @@ out_nofds:
 SYSCALL_DEFINE5(select, int, n, fd_set __user *, inp, fd_set __user *, outp,
 		fd_set __user *, exp, struct timeval __user *, tvp)
 {
-	struct timespec end_time, *to = NULL;
+	struct timespec64 end_time, *to = NULL;
 	struct timeval tv;
 	int ret;
 
@@ -648,15 +652,17 @@ static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp,
 		       const sigset_t __user *sigmask, size_t sigsetsize)
 {
 	sigset_t ksigmask, sigsaved;
-	struct timespec ts, end_time, *to = NULL;
+	struct timespec ts;
+	struct timespec64 ts64, end_time, *to = NULL;
 	int ret;
 
 	if (tsp) {
 		if (copy_from_user(&ts, tsp, sizeof(ts)))
 			return -EFAULT;
+		ts64 = timespec_to_timespec64(ts);
 
 		to = &end_time;
-		if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
+		if (poll_select_set_timeout(to, ts64.tv_sec, ts64.tv_nsec))
 			return -EINVAL;
 	}
 
@@ -779,7 +785,7 @@ static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait,
 }
 
 static int do_poll(struct poll_list *list, struct poll_wqueues *wait,
-		   struct timespec *end_time)
+		   struct timespec64 *end_time)
 {
 	poll_table* pt = &wait->pt;
 	ktime_t expire, *to = NULL;
@@ -854,7 +860,7 @@ static int do_poll(struct poll_list *list, struct poll_wqueues *wait,
 		 * pointer to the expiry value.
 		 */
 		if (end_time && !to) {
-			expire = timespec_to_ktime(*end_time);
+			expire = timespec64_to_ktime(*end_time);
 			to = &expire;
 		}
 
@@ -868,7 +874,7 @@ static int do_poll(struct poll_list *list, struct poll_wqueues *wait,
 			sizeof(struct pollfd))
 
 int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
-		struct timespec *end_time)
+		struct timespec64 *end_time)
 {
 	struct poll_wqueues table;
  	int err = -EFAULT, fdcount, len, size;
@@ -936,7 +942,7 @@ static long do_restart_poll(struct restart_block *restart_block)
 {
 	struct pollfd __user *ufds = restart_block->poll.ufds;
 	int nfds = restart_block->poll.nfds;
-	struct timespec *to = NULL, end_time;
+	struct timespec64 *to = NULL, end_time;
 	int ret;
 
 	if (restart_block->poll.has_timeout) {
@@ -957,7 +963,7 @@ static long do_restart_poll(struct restart_block *restart_block)
 SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds,
 		int, timeout_msecs)
 {
-	struct timespec end_time, *to = NULL;
+	struct timespec64 end_time, *to = NULL;
 	int ret;
 
 	if (timeout_msecs >= 0) {
@@ -993,7 +999,8 @@ SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,
 		size_t, sigsetsize)
 {
 	sigset_t ksigmask, sigsaved;
-	struct timespec ts, end_time, *to = NULL;
+	struct timespec ts;
+	struct timespec64 end_time, *to = NULL;
 	int ret;
 
 	if (tsp) {
diff --git a/include/linux/poll.h b/include/linux/poll.h
index 9fb4f40..37b057b 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -96,7 +96,7 @@ extern void poll_initwait(struct poll_wqueues *pwq);
 extern void poll_freewait(struct poll_wqueues *pwq);
 extern int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
 				 ktime_t *expires, unsigned long slack);
-extern u64 select_estimate_accuracy(struct timespec *tv);
+extern u64 select_estimate_accuracy(struct timespec64 *tv);
 
 
 static inline int poll_schedule(struct poll_wqueues *pwq, int state)
@@ -153,12 +153,13 @@ void zero_fd_set(unsigned long nr, unsigned long *fdset)
 
 #define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1)
 
-extern int do_select(int n, fd_set_bits *fds, struct timespec *end_time);
+extern int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time);
 extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds,
-		       struct timespec *end_time);
+		       struct timespec64 *end_time);
 extern int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
-			   fd_set __user *exp, struct timespec *end_time);
+			   fd_set __user *exp, struct timespec64 *end_time);
 
-extern int poll_select_set_timeout(struct timespec *to, long sec, long nsec);
+extern int poll_select_set_timeout(struct timespec64 *to, time64_t sec,
+				   long nsec);
 
 #endif /* _LINUX_POLL_H */
diff --git a/net/socket.c b/net/socket.c
index 5dbb0bb..bdfe115 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2171,7 +2171,8 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
 	struct mmsghdr __user *entry;
 	struct compat_mmsghdr __user *compat_entry;
 	struct msghdr msg_sys;
-	struct timespec end_time;
+	struct timespec64 end_time;
+	struct timespec64 timeout64;
 
 	if (timeout &&
 	    poll_select_set_timeout(&end_time, timeout->tv_sec,
@@ -2223,8 +2224,9 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
 			flags |= MSG_DONTWAIT;
 
 		if (timeout) {
-			ktime_get_ts(timeout);
-			*timeout = timespec_sub(end_time, *timeout);
+			ktime_get_ts64(&timeout64);
+			*timeout = timespec64_to_timespec(
+					timespec64_sub(end_time, timeout64));
 			if (timeout->tv_sec < 0) {
 				timeout->tv_sec = timeout->tv_nsec = 0;
 				break;
-- 
1.9.1

_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

^ permalink raw reply related

* Re: [RESEND PATCH 2/3] fs: poll/select/recvmmsg: use timespec64 for timeout events
From: John Stultz @ 2016-05-04 20:04 UTC (permalink / raw)
  To: Deepa Dinamani
  Cc: Arnd Bergmann, y2038 Mailman List, netdev, lkml, Alexander Viro,
	linux-fsdevel@vger.kernel.org, Thomas Gleixner, David S. Miller
In-Reply-To: <1462389899-2480-1-git-send-email-deepa.kernel@gmail.com>

On Wed, May 4, 2016 at 12:24 PM, Deepa Dinamani <deepa.kernel@gmail.com> wrote:
> struct timespec is not y2038 safe.
> Even though timespec might be sufficient to represent
> timeouts, use struct timespec64 here as the plan is to
> get rid of all timespec reference in the kernel.
>
> The patch transitions the common functions:
> poll_select_set_timeout() and select_estimate_accuracy()
> to use timespec64. And, all the syscalls that use these
> functions are transitioned in the same patch.
>
> The restart block parameters for poll uses monotonic time.
> Use timespec64 here as well to assign timeout value. This
> parameter in the restart block need not change because
> this only holds the monotonic timestamp at which timeout
> should occur. And, unsigned long data type should be big
> enough for this timestamp.
>
> The system call interfaces will be handled in a separate
> series.
>
> Compat interfaces need not change as timespec64 is an
> alias to struct timespec on a 64 bit system.
>
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: netdev@vger.kernel.org
> ---
> Resending to include John and Thomas on this patch as well.
> This is to include this patch also in John's tree.
> This will let all 3 patches in the series to merged through the same tree.
>
>  fs/eventpoll.c       | 12 +++++-----
>  fs/select.c          | 67 +++++++++++++++++++++++++++++-----------------------
>  include/linux/poll.h | 11 +++++----
>  net/socket.c         |  8 ++++---
>  4 files changed, 54 insertions(+), 44 deletions(-)


So with the other two patches, I'm more comfortable queueing and
sending through to Thomas.

But I'm less comfortable making the call on this one. It looks
relatively straight forward, but it would be good to have maintainer
acks before I add it to my tree.

thanks
-john
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

^ permalink raw reply

* Re: [PATCH net-next v2] macvtap: add namespace support to the sysfs device class
From: David Miller @ 2016-05-04 20:04 UTC (permalink / raw)
  To: marc; +Cc: netdev, ebiederm
In-Reply-To: <1462300254-22273-1-git-send-email-marc@arista.com>

From: Marc Angel <marc@arista.com>
Date: Tue,  3 May 2016 20:30:54 +0200

> @@ -1274,6 +1285,7 @@ static int macvtap_device_event(struct notifier_block *unused,
>  				unsigned long event, void *ptr)
>  {
>  	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
> +	const char *tap_name = kasprintf(GFP_KERNEL, "tap%d", dev->ifindex);
>  	struct macvlan_dev *vlan;
>  	struct device *classdev;
>  	dev_t devt;

This 'tap_name' buffer seems to be leaked in several code paths.

^ permalink raw reply

* Re: [PATCH] mdio_bus: don't return NULL from mdiobus_scan()
From: David Miller @ 2016-05-04 20:14 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, f.fainelli
In-Reply-To: <4702228.vWmKBZLz6G@wasted.cogentembedded.com>

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Tue, 03 May 2016 23:14:41 +0300

> I've finally noticed that mdiobus_scan() also returns either NULL or error
> value on failure.  Return ERR_PTR(-ENODEV) instead of NULL since this is
> the  error value  already filtered out by the callers that want to ignore
> the  MDIO address scan failure...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Applied.

^ permalink raw reply

* Re: [PATCH] fix infoleak in llc
From: David Miller @ 2016-05-04 20:20 UTC (permalink / raw)
  To: kangjielu; +Cc: acme, netdev, linux-kernel, taesoo, insu, kjlu
In-Reply-To: <1462307705-5882-1-git-send-email-kjlu@gatech.edu>

From: Kangjie Lu <kangjielu@gmail.com>
Date: Tue,  3 May 2016 16:35:05 -0400

> The stack object “info” has a total size of 12 bytes. Its last byte
> is padding which is not initialized and leaked via “put_cmsg”.
> 
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>

Applied.

^ permalink raw reply

* Re: [PATCH] fix infoleak in rtnetlink
From: David Miller @ 2016-05-04 20:20 UTC (permalink / raw)
  To: kangjielu; +Cc: sfeldma, roopa, jiri, netdev, linux-kernel, taesoo, insu, kjlu
In-Reply-To: <1462308384-6315-1-git-send-email-kjlu@gatech.edu>

From: Kangjie Lu <kangjielu@gmail.com>
Date: Tue,  3 May 2016 16:46:24 -0400

> The stack object “map” has a total size of 32 bytes. Its last 4
> bytes are padding generated by compiler. These padding bytes are
> not initialized and sent out via “nla_put”.
> 
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>

Applied.

^ permalink raw reply

* Re: pull request: batman-adv 20160504
From: David Miller @ 2016-05-04 20:30 UTC (permalink / raw)
  To: a
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1462314230-16257-1-git-send-email-a-2CpIooy/SPIKlTDg6p0iyA@public.gmane.org>

From: Antonio Quartulli <a@unstable.cc>
Date: Wed,  4 May 2016 06:23:35 +0800

> this is a pull request intended for net-next.
> 
> In this batch you don't have any patch that depends on our fixes,
> therefore you can safely merge it even if the net tree has not been
> merged yet.
> 
> In this patchset you basically have some cleanup work, code refactoring,
> style fixes and two updates for the MAINTAINERS file.
> 
> Please pull or let me know of any problem!

Pulled, thanks Antonio.

^ permalink raw reply

* Re: pull request (net): ipsec 2016-05-04
From: David Miller @ 2016-05-04 20:48 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <1462340454-27922-1-git-send-email-steffen.klassert@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Wed, 4 May 2016 07:40:51 +0200

> 1) The flowcache can hit an OOM condition if too
>    many entries are in the gc_list. Fix this by
>    counting the entries in the gc_list and refuse
>    new allocations if the value is too high.
> 
> 2) The inner headers are invalid after a xfrm transformation,
>    so reset the skb encapsulation field to ensure nobody tries
>    access the inner headers. Otherwise tunnel devices stacked
>    on top of xfrm may build the outer headers based on wrong
>    informations.
> 
> 3) Add pmtu handling to vti, we need it to report
>    pmtu informations for local generated packets.
> 
> Please pull or let me know if there are problems.

Pulled, thanks Steffen.

While build testing this I was worried that it might be possible
to create a situation where IP_VTI=y yet IPV6=m and therefore have
a unresolvable reference to icmpv6_send().

However I was not able to create such a configuration, as hard as
I tried. :-)

^ permalink raw reply

* [PATCH next] bonding: update documentation section after dev->trans_start removal
From: Florian Westphal @ 2016-05-04 20:51 UTC (permalink / raw)
  To: netdev; +Cc: Florian Westphal

Drivers that use LLTX need to update trans_start of the netdev_queue.
(Most drivers don't use LLTX; stack does this update if .ndo_start_xmit
 returned TX_OK).

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 Documentation/networking/bonding.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 334b49e..57f52cd 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -1880,8 +1880,8 @@ or more peers on the local network.
 
 	The ARP monitor relies on the device driver itself to verify
 that traffic is flowing.  In particular, the driver must keep up to
-date the last receive time, dev->last_rx, and transmit start time,
-dev->trans_start.  If these are not updated by the driver, then the
+date the last receive time, dev->last_rx.  Drivers that use NETIF_F_LLTX
+flag must also update netdev_queue->trans_start.  If they do not, then the
 ARP monitor will immediately fail any slaves using that driver, and
 those slaves will stay down.  If networking monitoring (tcpdump, etc)
 shows the ARP requests and replies on the network, then it may be that
-- 
2.7.3

^ permalink raw reply related

* [PATCH next] drivers: fix dev->trans_start removal fallout
From: Florian Westphal @ 2016-05-04 20:56 UTC (permalink / raw)
  To: netdev; +Cc: Florian Westphal

kbuild test robot reported a build failure on s390.
While at it, also fix missing conversion in the tilera driver.

Fixes: 9b36627acecd5792 ("net: remove dev->trans_start")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c
index 0bb98bc..922a443 100644
--- a/drivers/net/ethernet/tile/tilepro.c
+++ b/drivers/net/ethernet/tile/tilepro.c
@@ -2026,7 +2026,7 @@ static void tile_net_tx_timeout(struct net_device *dev)
 {
 	PDEBUG("tile_net_tx_timeout()\n");
 	PDEBUG("Transmit timeout at %ld, latency %ld\n", jiffies,
-	       jiffies - dev->trans_start);
+	       jiffies - dev_trans_start(dev));
 
 	/* XXX: ISSUE: This doesn't seem useful for us. */
 	netif_wake_queue(dev);
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 7871537..b7b7477 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3481,7 +3481,7 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index,
 		}
 	}
 
-	queue->card->dev->trans_start = jiffies;
+	netif_trans_update(queue->card->dev);
 	if (queue->card->options.performance_stats) {
 		queue->card->perf_stats.outbound_do_qdio_cnt++;
 		queue->card->perf_stats.outbound_do_qdio_start_time =
-- 
2.7.3

^ permalink raw reply related

* [PATCH net 0/2] bnxt_en: 2 bug fixes.
From: Michael Chan @ 2016-05-04 20:56 UTC (permalink / raw)
  To: davem; +Cc: netdev

Fix crash on ppc64 due to missing memory barrier and restore multicast
after reset.

Michael Chan (2):
  bnxt_en: Need memory barrier when processing the completion ring.
  bnxt_en: Setup multicast properly after resetting device.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

-- 
1.8.3.1

^ permalink raw reply

* [PATCH net 2/2] bnxt_en: Setup multicast properly after resetting device.
From: Michael Chan @ 2016-05-04 20:56 UTC (permalink / raw)
  To: davem; +Cc: netdev
In-Reply-To: <1462395404-21875-1-git-send-email-michael.chan@broadcom.com>

The multicast/all-multicast internal flags are not properly restored
after device reset.  This could lead to unreliable multicast operations
after an ethtool configuration change for example.

Call bnxt_mc_list_updated() and setup the vnic->mask in bnxt_init_chip()
to fix the issue.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index f33ff20..9d4e8e1 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -4042,9 +4042,11 @@ static int bnxt_alloc_rfs_vnics(struct bnxt *bp)
 }
 
 static int bnxt_cfg_rx_mode(struct bnxt *);
+static bool bnxt_mc_list_updated(struct bnxt *, u32 *);
 
 static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
 {
+	struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
 	int rc = 0;
 
 	if (irq_re_init) {
@@ -4100,13 +4102,22 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
 		netdev_err(bp->dev, "HWRM vnic filter failure rc: %x\n", rc);
 		goto err_out;
 	}
-	bp->vnic_info[0].uc_filter_count = 1;
+	vnic->uc_filter_count = 1;
 
-	bp->vnic_info[0].rx_mask = CFA_L2_SET_RX_MASK_REQ_MASK_BCAST;
+	vnic->rx_mask = CFA_L2_SET_RX_MASK_REQ_MASK_BCAST;
 
 	if ((bp->dev->flags & IFF_PROMISC) && BNXT_PF(bp))
-		bp->vnic_info[0].rx_mask |=
-				CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS;
+		vnic->rx_mask |= CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS;
+
+	if (bp->dev->flags & IFF_ALLMULTI) {
+		vnic->rx_mask |= CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST;
+		vnic->mc_list_count = 0;
+	} else {
+		u32 mask = 0;
+
+		bnxt_mc_list_updated(bp, &mask);
+		vnic->rx_mask |= mask;
+	}
 
 	rc = bnxt_cfg_rx_mode(bp);
 	if (rc)
-- 
1.8.3.1

^ permalink raw reply related

* [PATCH net 1/2] bnxt_en: Need memory barrier when processing the completion ring.
From: Michael Chan @ 2016-05-04 20:56 UTC (permalink / raw)
  To: davem; +Cc: netdev
In-Reply-To: <1462395404-21875-1-git-send-email-michael.chan@broadcom.com>

The code determines if the next ring entry is valid before proceeding
further to read the rest of the entry.  The CPU can re-order and read
the rest of the entry first, possibly reading a stale entry, if DMA
of a new entry happens right after reading it.  This issue can be
readily seen on a ppc64 system, causing it to crash.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 72eb29e..f33ff20 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1388,6 +1388,10 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
 		if (!TX_CMP_VALID(txcmp, raw_cons))
 			break;
 
+		/* The valid test of the entry must be done first before
+		 * reading any further.
+		 */
+		rmb();
 		if (TX_CMP_TYPE(txcmp) == CMP_TYPE_TX_L2_CMP) {
 			tx_pkts++;
 			/* return full budget so NAPI will complete. */
-- 
1.8.3.1

^ permalink raw reply related

* Re: [patch] usbnet/smsc75xx: silence uninitialized variable warning
From: David Miller @ 2016-05-04 20:59 UTC (permalink / raw)
  To: dan.carpenter; +Cc: steve.glendinning, netdev, linux-usb
In-Reply-To: <20160504062102.GE22064@mwanda>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 4 May 2016 09:21:02 +0300

> If the fn() calls fail then "buf" is uninitialized.  Just return early
> in that situation.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

^ permalink raw reply

* Re: [patch] usbnet: smsc95xx: silence an uninitialized variable warning
From: David Miller @ 2016-05-04 21:00 UTC (permalink / raw)
  To: dan.carpenter; +Cc: steve.glendinning, netdev, linux-usb
In-Reply-To: <20160504062201.GF22064@mwanda>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 4 May 2016 09:22:01 +0300

> If the call to fn() fails then "buf" is uninitialized.  Just return the
> error code in that case.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

Please, in the future, use a consistent subsystem prefixing scheme.  In these
two patches you used "x/y:"" and "x: y:"

Thanks.

^ permalink raw reply

* Re: [PATC net-next] tcp: must block bh in __inet_twsk_hashdance()
From: David Miller @ 2016-05-04 21:06 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1462386131.5535.353.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 04 May 2016 11:22:11 -0700

> On Wed, 2016-05-04 at 00:54 -0400, David Miller wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Tue, 03 May 2016 17:10:50 -0700
>> 
>> > From: Eric Dumazet <edumazet@google.com>
>> > 
>> > __inet_twsk_hashdance() might be called from process context,
>> > better block BH before acquiring bind hash and established locks
>> > 
>> > Fixes: c10d9310edf5 ("tcp: do not assume TCP code is non preemptible")
>> > Signed-off-by: Eric Dumazet <edumazet@google.com>
>> 
>> Applied.
> 
> David, I do not see these two patches in net-next ?
> 
> (This one, and the "tcp: fix lockdep splat in tcp_snd_una_update()" one)

I pushed them in by hand, they should really be there now.

Thanks for letting me know.

^ permalink raw reply

* Re: [PATCH next] bonding: update documentation section after dev->trans_start removal
From: David Miller @ 2016-05-04 21:07 UTC (permalink / raw)
  To: fw; +Cc: netdev
In-Reply-To: <1462395107-18703-1-git-send-email-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Wed,  4 May 2016 22:51:47 +0200

> Drivers that use LLTX need to update trans_start of the netdev_queue.
> (Most drivers don't use LLTX; stack does this update if .ndo_start_xmit
>  returned TX_OK).
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied.

^ permalink raw reply

* Re: [PATCH next] drivers: fix dev->trans_start removal fallout
From: David Miller @ 2016-05-04 21:07 UTC (permalink / raw)
  To: fw; +Cc: netdev
In-Reply-To: <1462395367-16704-1-git-send-email-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Wed,  4 May 2016 22:56:07 +0200

> kbuild test robot reported a build failure on s390.
> While at it, also fix missing conversion in the tilera driver.
> 
> Fixes: 9b36627acecd5792 ("net: remove dev->trans_start")
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied.

^ permalink raw reply

* Re: [Y2038] [RESEND PATCH 2/3] fs: poll/select/recvmmsg: use timespec64 for timeout events
From: Arnd Bergmann @ 2016-05-04 21:08 UTC (permalink / raw)
  To: y2038
  Cc: John Stultz, Deepa Dinamani, netdev, lkml, Alexander Viro,
	linux-fsdevel@vger.kernel.org, Thomas Gleixner, David S. Miller,
	Linus Torvalds, Andrew Morton, Eliezer Tamir, Arjan van de Ven,
	Oleg Nesterov
In-Reply-To: <CALAqxLVB8XiRrFKxK3GzBxw-CfEmC=Dh-CrTOEqT144ngZg-Dw@mail.gmail.com>

On Wednesday 04 May 2016 13:04:37 John Stultz wrote:
> On Wed, May 4, 2016 at 12:24 PM, Deepa Dinamani <deepa.kernel@gmail.com> wrote:
> > struct timespec is not y2038 safe.
> > Even though timespec might be sufficient to represent
> > timeouts, use struct timespec64 here as the plan is to
> > get rid of all timespec reference in the kernel.
> >
> > The patch transitions the common functions:
> > poll_select_set_timeout() and select_estimate_accuracy()
> > to use timespec64. And, all the syscalls that use these
> > functions are transitioned in the same patch.
> >
> > The restart block parameters for poll uses monotonic time.
> > Use timespec64 here as well to assign timeout value. This
> > parameter in the restart block need not change because
> > this only holds the monotonic timestamp at which timeout
> > should occur. And, unsigned long data type should be big
> > enough for this timestamp.
> >
> > The system call interfaces will be handled in a separate
> > series.
> >
> > Compat interfaces need not change as timespec64 is an
> > alias to struct timespec on a 64 bit system.
> >
> > Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
> > Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: netdev@vger.kernel.org
> > ---
> > Resending to include John and Thomas on this patch as well.
> > This is to include this patch also in John's tree.
> > This will let all 3 patches in the series to merged through the same tree.
> >
> >  fs/eventpoll.c       | 12 +++++-----
> >  fs/select.c          | 67 +++++++++++++++++++++++++++++-----------------------
> >  include/linux/poll.h | 11 +++++----
> >  net/socket.c         |  8 ++++---
> >  4 files changed, 54 insertions(+), 44 deletions(-)
> 
> 
> So with the other two patches, I'm more comfortable queueing and
> sending through to Thomas.

Note that of course patch 3 depends on patch 2, otherwise it would
be a simple rename.

> But I'm less comfortable making the call on this one. It looks
> relatively straight forward, but it would be good to have maintainer
> acks before I add it to my tree.

Agreed. Feel free to add my

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

at least (whoever picks it up). The file hasn't changed much in the past
decade, these are all the people who did more than 1 patch for fs/select.c
in git history:

      7 Al Viro
      6 Eliezer Tamir
      6 Arjan van de Ven
      4 Andrew Morton
      3 Linus Torvalds
      3 Heiko Carstens
      2 Vadim Lobanov
      2 Roland McGrath
      2 Oleg Nesterov
      2 Jiri Slaby
      2 Guillaume Knispel
      2 Eric Dumazet
      2 Dipankar Sarma
      2 Alexey Dobriyan

adding a few more to Cc, maybe someone else finds the time to take a
second look.

	Arnd

^ permalink raw reply

* Re: [PATCH net 0/2] bnxt_en: 2 bug fixes.
From: David Miller @ 2016-05-04 21:12 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev
In-Reply-To: <1462395404-21875-1-git-send-email-michael.chan@broadcom.com>

From: Michael Chan <michael.chan@broadcom.com>
Date: Wed,  4 May 2016 16:56:42 -0400

> Fix crash on ppc64 due to missing memory barrier and restore multicast
> after reset.

Looks good, series applied, thanks.

^ permalink raw reply

* Re: [net-next 00/14][pull request] 10GbE Intel Wired LAN Driver Updates 2016-05-04
From: David Miller @ 2016-05-04 21:48 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene, john.ronciak
In-Reply-To: <1462379208-3997-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed,  4 May 2016 09:26:34 -0700

> This series contains updates to ixgbe, ixgbevf and traffic class helpers.

Pulled, thanks Jeff.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox