Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac
From: Alexey Roslyakov @ 2018-03-19 14:10 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Andrew Lunn, kvalo, robh+dt, mark.rutland, franky.lin,
	hante.meuleman, chi-hsien.lin, wright.feng, netdev,
	linux-wireless, devicetree, linux-kernel, brcm80211-dev-list.pdl,
	brcm80211-dev-list
In-Reply-To: <5AAF838D.2030105@broadcom.com>

Hi Arend,
I appreciate your response. In my opinion, it has nothing to do with
SDIO host, because it defines "quirks" in the driver itself.
If I get it right, you mean something like this:

mmc3: mmc@1c12000 {
...
        broken-sg-support;
        sd-head-align = 4;
        sd-sgentry-align = 512;

        brcmf: wifi@1 {
                ...
        };
};

Where dt: bindings documentation for these entries should reside?
In generic MMC bindings? Well, this is the very special case and
mmc-linux maintainer will unlikely to accept these changes.
Also, extra kernel code modification might be required. It could make
quite trivial change much more complex.

>Also I am not sure if the broken-sg-support is still needed. We added that for omap_hsmmc, but that has since changed to scatter-gather emulation so it might not be needed anymore.

I've experienced the problem with rk3288 (dw-mmc host) and sdio
settings like above solved it.
Frankly, I haven't investigated any deeper which one of the settings
helped in my case yet...
I will try to get rid of broken-sg-support first and let you know if
it does make any difference.

All the best,
  Alex.

On 19 March 2018 at 16:31, Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On 3/19/2018 2:40 AM, Alexey Roslyakov wrote:
>>
>> In case if the host has higher align requirements for SG items, allow
>> setting device-specific aligns for scatterlist items.
>>
>> Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>
>> ---
>>   Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 5
>> +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git
>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>> index 86602f264dce..187b8c1b52a7 100644
>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>> @@ -17,6 +17,11 @@ Optional properties:
>>         When not specified the device will use in-band SDIO interrupts.
>>    - interrupt-names : name of the out-of-band interrupt, which must be
>> set
>>         to "host-wake".
>> + - brcm,broken-sg-support : boolean flag to indicate that the SDIO host
>> +       controller has higher align requirement than 32 bytes for each
>> +       scatterlist item.
>> + - brcm,sd-head-align : alignment requirement for start of data buffer.
>> + - brcm,sd-sgentry-align : length alignment requirement for each sg
>> entry.
>
>
> Hi Alexey,
>
> Thanks for the patch. However, the problem with these is that they are
> characterizing the host controller and not the wireless device. So from
> device tree perspective , which is to describe the hardware, these
> properties should be SDIO host controller properties. Also I am not sure if
> the broken-sg-support is still needed. We added that for omap_hsmmc, but
> that has since changed to scatter-gather emulation so it might not be needed
> anymore.
>
> Regards,
> Arend



-- 
With best regards,
  Alexey Roslyakov
Email: alexey.roslyakov@gmail.com

^ permalink raw reply

* [PATCH net-next] rds: tcp: remove register_netdevice_notifier infrastructure.
From: Sowmini Varadhan @ 2018-03-19 13:52 UTC (permalink / raw)
  To: netdev, sowmini.varadhan
  Cc: davem, sowmini.varadhan, santosh.shilimkar, ktkhai

The netns deletion path does not need to wait for all net_devices
to be unregistered before dismantling rds_tcp state for the netns
(we are able to dismantle this state on module unload even when
all net_devices are active so there is no dependency here).

This patch removes code related to netdevice notifiers and
refactors all the code needed to dismantle rds_tcp state
into a ->exit callback for the pernet_operations used with
register_pernet_device().

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
 net/rds/tcp.c |   93 ++++++++++++++-------------------------------------------
 1 files changed, 23 insertions(+), 70 deletions(-)

diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 08ea9cd..4f3a32c 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -485,40 +485,6 @@ static __net_init int rds_tcp_init_net(struct net *net)
 	return err;
 }
 
-static void __net_exit rds_tcp_exit_net(struct net *net)
-{
-	struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
-
-	if (rtn->rds_tcp_sysctl)
-		unregister_net_sysctl_table(rtn->rds_tcp_sysctl);
-
-	if (net != &init_net && rtn->ctl_table)
-		kfree(rtn->ctl_table);
-
-	/* If rds_tcp_exit_net() is called as a result of netns deletion,
-	 * the rds_tcp_kill_sock() device notifier would already have cleaned
-	 * up the listen socket, thus there is no work to do in this function.
-	 *
-	 * If rds_tcp_exit_net() is called as a result of module unload,
-	 * i.e., due to rds_tcp_exit() -> unregister_pernet_subsys(), then
-	 * we do need to clean up the listen socket here.
-	 */
-	if (rtn->rds_tcp_listen_sock) {
-		struct socket *lsock = rtn->rds_tcp_listen_sock;
-
-		rtn->rds_tcp_listen_sock = NULL;
-		rds_tcp_listen_stop(lsock, &rtn->rds_tcp_accept_w);
-	}
-}
-
-static struct pernet_operations rds_tcp_net_ops = {
-	.init = rds_tcp_init_net,
-	.exit = rds_tcp_exit_net,
-	.id = &rds_tcp_netid,
-	.size = sizeof(struct rds_tcp_net),
-	.async = true,
-};
-
 static void rds_tcp_kill_sock(struct net *net)
 {
 	struct rds_tcp_connection *tc, *_tc;
@@ -546,40 +512,38 @@ static void rds_tcp_kill_sock(struct net *net)
 		rds_conn_destroy(tc->t_cpath->cp_conn);
 }
 
-void *rds_tcp_listen_sock_def_readable(struct net *net)
+static void __net_exit rds_tcp_exit_net(struct net *net)
 {
 	struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
-	struct socket *lsock = rtn->rds_tcp_listen_sock;
 
-	if (!lsock)
-		return NULL;
+	rds_tcp_kill_sock(net);
 
-	return lsock->sk->sk_user_data;
+	if (rtn->rds_tcp_sysctl)
+		unregister_net_sysctl_table(rtn->rds_tcp_sysctl);
+
+	if (net != &init_net && rtn->ctl_table)
+		kfree(rtn->ctl_table);
 }
 
-static int rds_tcp_dev_event(struct notifier_block *this,
-			     unsigned long event, void *ptr)
+static struct pernet_operations rds_tcp_net_ops = {
+	.init = rds_tcp_init_net,
+	.exit = rds_tcp_exit_net,
+	.id = &rds_tcp_netid,
+	.size = sizeof(struct rds_tcp_net),
+	.async = true,
+};
+
+void *rds_tcp_listen_sock_def_readable(struct net *net)
 {
-	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+	struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
+	struct socket *lsock = rtn->rds_tcp_listen_sock;
 
-	/* rds-tcp registers as a pernet subys, so the ->exit will only
-	 * get invoked after network acitivity has quiesced. We need to
-	 * clean up all sockets  to quiesce network activity, and use
-	 * the unregistration of the per-net loopback device as a trigger
-	 * to start that cleanup.
-	 */
-	if (event == NETDEV_UNREGISTER_FINAL &&
-	    dev->ifindex == LOOPBACK_IFINDEX)
-		rds_tcp_kill_sock(dev_net(dev));
+	if (!lsock)
+		return NULL;
 
-	return NOTIFY_DONE;
+	return lsock->sk->sk_user_data;
 }
 
-static struct notifier_block rds_tcp_dev_notifier = {
-	.notifier_call        = rds_tcp_dev_event,
-	.priority = -10, /* must be called after other network notifiers */
-};
-
 /* when sysctl is used to modify some kernel socket parameters,this
  * function  resets the RDS connections in that netns  so that we can
  * restart with new parameters.  The assumption is that such reset
@@ -625,9 +589,7 @@ static void rds_tcp_exit(void)
 	rds_tcp_set_unloading();
 	synchronize_rcu();
 	rds_info_deregister_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
-	unregister_pernet_subsys(&rds_tcp_net_ops);
-	if (unregister_netdevice_notifier(&rds_tcp_dev_notifier))
-		pr_warn("could not unregister rds_tcp_dev_notifier\n");
+	unregister_pernet_device(&rds_tcp_net_ops);
 	rds_tcp_destroy_conns();
 	rds_trans_unregister(&rds_tcp_transport);
 	rds_tcp_recv_exit();
@@ -651,24 +613,15 @@ static int rds_tcp_init(void)
 	if (ret)
 		goto out_slab;
 
-	ret = register_pernet_subsys(&rds_tcp_net_ops);
+	ret = register_pernet_device(&rds_tcp_net_ops);
 	if (ret)
 		goto out_recv;
 
-	ret = register_netdevice_notifier(&rds_tcp_dev_notifier);
-	if (ret) {
-		pr_warn("could not register rds_tcp_dev_notifier\n");
-		goto out_pernet;
-	}
-
 	rds_trans_register(&rds_tcp_transport);
 
 	rds_info_register_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
 
 	goto out;
-
-out_pernet:
-	unregister_pernet_subsys(&rds_tcp_net_ops);
 out_recv:
 	rds_tcp_recv_exit();
 out_slab:
-- 
1.7.1

^ permalink raw reply related

* Re: 4.14.2[6-7] tcp_push NULL pointer
From: Eric Dumazet @ 2018-03-19 14:16 UTC (permalink / raw)
  To: David Miller; +Cc: tc, netdev
In-Reply-To: <20180319.100324.216342275297966542.davem@davemloft.net>



On 03/19/2018 07:03 AM, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 19 Mar 2018 05:17:37 -0700
> 
>> We have sent a fix last week, I am not sure if David took it.
>>
>> https://patchwork.ozlabs.org/patch/886324/
> 
> I thought I submitted that in my last round of -stable submissions,
> but I have re-added this to my stable queue and will make sure it
> really gets there if not.
> 

Thanks David !

^ permalink raw reply

* [RFC PATCH 0/3] kernel: add support for 256-bit IO access
From: Rahul Lakkireddy @ 2018-03-19 14:20 UTC (permalink / raw)
  To: x86, linux-kernel, netdev
  Cc: tglx, mingo, hpa, davem, akpm, torvalds, ganeshgr, nirranjan,
	indranil, Rahul Lakkireddy

This series of patches add support for 256-bit IO read and write.
The APIs are readqq and writeqq (quad quadword - 4 x 64), that read
and write 256-bits at a time from IO, respectively.

Patch 1 adds u256 type and adds necessary non-atomic accessors.  Also
adds byteorder conversion APIs.

Patch 2 adds 256-bit read and write to x86 via VMOVDQU AVX CPU
instructions.

Patch 3 updates cxgb4 driver to use the readqq API to speed up
reading on-chip memory 256-bits at a time.

Feedback and suggestions will be much appreciated.

Thanks,
Rahul

Rahul Lakkireddy (3):
  include/linux: add 256-bit IO accessors
  x86/io: implement 256-bit IO read and write
  cxgb4: read on-chip memory 256-bits at a time

 arch/x86/include/asm/io.h                      | 57 ++++++++++++++++++++++++-
 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 16 +++----
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h     |  6 +++
 include/linux/byteorder/generic.h              | 48 +++++++++++++++++++++
 include/linux/io-64-nonatomic-hi-lo.h          | 59 ++++++++++++++++++++++++++
 include/linux/io-64-nonatomic-lo-hi.h          | 59 ++++++++++++++++++++++++++
 include/linux/types.h                          |  7 +++
 7 files changed, 243 insertions(+), 9 deletions(-)

-- 
2.14.1

^ permalink raw reply

* [RFC PATCH 1/3] include/linux: add 256-bit IO accessors
From: Rahul Lakkireddy @ 2018-03-19 14:20 UTC (permalink / raw)
  To: x86, linux-kernel, netdev
  Cc: tglx, mingo, hpa, davem, akpm, torvalds, ganeshgr, nirranjan,
	indranil, Rahul Lakkireddy
In-Reply-To: <cover.1521469118.git.rahul.lakkireddy@chelsio.com>

Add readqq and writeqq (quad quadword - 4 x 64) IO non-atomic
accessors.  Also add byteorder conversions for 256-bit.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
 include/linux/byteorder/generic.h     | 48 ++++++++++++++++++++++++++++
 include/linux/io-64-nonatomic-hi-lo.h | 59 +++++++++++++++++++++++++++++++++++
 include/linux/io-64-nonatomic-lo-hi.h | 59 +++++++++++++++++++++++++++++++++++
 include/linux/types.h                 |  7 +++++
 4 files changed, 173 insertions(+)

diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h
index 451aaa0786ae..c6c936818a3a 100644
--- a/include/linux/byteorder/generic.h
+++ b/include/linux/byteorder/generic.h
@@ -187,4 +187,52 @@ static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
 		dst[i] = be32_to_cpu(src[i]);
 }
 
+static inline __le256 cpu_to_le256(u256 val)
+{
+	__le256 ret;
+
+	ret.a = cpu_to_le64(val.a);
+	ret.b = cpu_to_le64(val.b);
+	ret.c = cpu_to_le64(val.c);
+	ret.d = cpu_to_le64(val.d);
+
+	return ret;
+}
+
+static inline u256 le256_to_cpu(__le256 val)
+{
+	u256 ret;
+
+	ret.a = le64_to_cpu(val.a);
+	ret.b = le64_to_cpu(val.b);
+	ret.c = le64_to_cpu(val.c);
+	ret.d = le64_to_cpu(val.d);
+
+	return ret;
+}
+
+static inline __be256 cpu_to_be256(u256 val)
+{
+	__be256 ret;
+
+	ret.a = cpu_to_be64(val.d);
+	ret.b = cpu_to_be64(val.c);
+	ret.c = cpu_to_be64(val.b);
+	ret.d = cpu_to_be64(val.a);
+
+	return ret;
+}
+
+static inline u256 be256_to_cpu(__be256 val)
+{
+	u256 ret;
+
+	ret.a = be64_to_cpu(val.d);
+	ret.b = be64_to_cpu(val.c);
+	ret.c = be64_to_cpu(val.b);
+	ret.d = be64_to_cpu(val.a);
+
+	return ret;
+}
+
 #endif /* _LINUX_BYTEORDER_GENERIC_H */
diff --git a/include/linux/io-64-nonatomic-hi-lo.h b/include/linux/io-64-nonatomic-hi-lo.h
index 862d786a904f..9bdc42132020 100644
--- a/include/linux/io-64-nonatomic-hi-lo.h
+++ b/include/linux/io-64-nonatomic-hi-lo.h
@@ -55,4 +55,63 @@ static inline void hi_lo_writeq_relaxed(__u64 val, volatile void __iomem *addr)
 #define writeq_relaxed hi_lo_writeq_relaxed
 #endif
 
+static inline __u256 hi_lo_readqq(const volatile void __iomem *addr)
+{
+	const volatile u64 __iomem *p = addr;
+	__u256 ret;
+
+	ret.d = readq(p + 3);
+	ret.c = readq(p + 2);
+	ret.b = readq(p + 1);
+	ret.a = readq(p);
+
+	return ret;
+}
+
+static inline void hi_lo_writeqq(__u256 val, volatile void __iomem *addr)
+{
+	writeq(val.d, addr + 24);
+	writeq(val.c, addr + 16);
+	writeq(val.b, addr + 8);
+	writeq(val.a, addr);
+}
+
+static inline __u256 hi_lo_readqq_relaxed(const volatile void __iomem *addr)
+{
+	const volatile u64 __iomem *p = addr;
+	__u256 ret;
+
+	ret.d = readq_relaxed(p + 3);
+	ret.c = readq_relaxed(p + 2);
+	ret.b = readq_relaxed(p + 1);
+	ret.a = readq_relaxed(p);
+
+	return ret;
+}
+
+static inline void hi_lo_writeqq_relaxed(__u256 val,
+					 volatile void __iomem *addr)
+{
+	writeq_relaxed(val.d, addr + 24);
+	writeq_relaxed(val.c, addr + 16);
+	writeq_relaxed(val.b, addr + 8);
+	writeq_relaxed(val.a, addr);
+}
+
+#ifndef readqq
+#define readqq hi_lo_readqq
+#endif
+
+#ifndef writeqq
+#define writeqq hi_lo_writeqq
+#endif
+
+#ifndef readqq_relaxed
+#define readqq_relaxed hi_lo_readqq_relaxed
+#endif
+
+#ifndef writeqq_relaxed
+#define writeqq_relaxed hi_lo_writeqq_relaxed
+#endif
+
 #endif	/* _LINUX_IO_64_NONATOMIC_HI_LO_H_ */
diff --git a/include/linux/io-64-nonatomic-lo-hi.h b/include/linux/io-64-nonatomic-lo-hi.h
index d042e7bb5adb..8aaf734e1d51 100644
--- a/include/linux/io-64-nonatomic-lo-hi.h
+++ b/include/linux/io-64-nonatomic-lo-hi.h
@@ -55,4 +55,63 @@ static inline void lo_hi_writeq_relaxed(__u64 val, volatile void __iomem *addr)
 #define writeq_relaxed lo_hi_writeq_relaxed
 #endif
 
+static inline __u256 lo_hi_readqq(const volatile void __iomem *addr)
+{
+	const volatile u64 __iomem *p = addr;
+	__u256 ret;
+
+	ret.a = readq(p);
+	ret.b = readq(p + 1);
+	ret.c = readq(p + 2);
+	ret.d = readq(p + 3);
+
+	return ret;
+}
+
+static inline void lo_hi_writeqq(__u256 val, volatile void __iomem *addr)
+{
+	writeq(val.a, addr);
+	writeq(val.b, addr + 8);
+	writeq(val.c, addr + 16);
+	writeq(val.d, addr + 24);
+}
+
+static inline __u256 lo_hi_readqq_relaxed(const volatile void __iomem *addr)
+{
+	const volatile u64 __iomem *p = addr;
+	__u256 ret;
+
+	ret.a = readq_relaxed(p);
+	ret.b = readq_relaxed(p + 1);
+	ret.c = readq_relaxed(p + 2);
+	ret.d = readq_relaxed(p + 3);
+
+	return ret;
+}
+
+static inline void lo_hi_writeqq_relaxed(__u256 val,
+					 volatile void __iomem *addr)
+{
+	writeq_relaxed(val.a, addr);
+	writeq_relaxed(val.b, addr + 8);
+	writeq_relaxed(val.c, addr + 16);
+	writeq_relaxed(val.d, addr + 24);
+}
+
+#ifndef readqq
+#define readqq lo_hi_readqq
+#endif
+
+#ifndef writeqq
+#define writeqq lo_hi_writeqq
+#endif
+
+#ifndef readqq_relaxed
+#define readqq_relaxed lo_hi_readqq_relaxed
+#endif
+
+#ifndef writeqq_relaxed
+#define writeqq_relaxed lo_hi_writeqq_relaxed
+#endif
+
 #endif	/* _LINUX_IO_64_NONATOMIC_LO_HI_H_ */
diff --git a/include/linux/types.h b/include/linux/types.h
index c94d59ef96cc..f4ee2857d253 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -114,6 +114,13 @@ typedef		__u64		u_int64_t;
 typedef		__s64		int64_t;
 #endif
 
+typedef struct {
+	__u64 a, b, c, d;
+} __u256;
+typedef __u256 u256;
+typedef __u256 __le256;
+typedef __u256 __be256;
+
 /* this is a special 64bit data type that is 8-byte aligned */
 #define aligned_u64 __u64 __attribute__((aligned(8)))
 #define aligned_be64 __be64 __attribute__((aligned(8)))
-- 
2.14.1

^ permalink raw reply related

* [RFC PATCH 2/3] x86/io: implement 256-bit IO read and write
From: Rahul Lakkireddy @ 2018-03-19 14:20 UTC (permalink / raw)
  To: x86, linux-kernel, netdev
  Cc: tglx, mingo, hpa, davem, akpm, torvalds, ganeshgr, nirranjan,
	indranil, Rahul Lakkireddy
In-Reply-To: <cover.1521469118.git.rahul.lakkireddy@chelsio.com>

Use VMOVDQU AVX CPU instruction when available to do 256-bit
IO read and write.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
 arch/x86/include/asm/io.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 95e948627fd0..b04f417b3374 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -109,7 +109,62 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
 #define readq			readq
 #define writeq			writeq
 
-#endif
+#ifdef CONFIG_AS_AVX
+#include <asm/fpu/api.h>
+
+static inline u256 __readqq(const volatile void __iomem *addr)
+{
+	u256 ret;
+
+	kernel_fpu_begin();
+	asm volatile("vmovdqu %0, %%ymm0" :
+		     : "m" (*(volatile u256 __force *)addr));
+	asm volatile("vmovdqu %%ymm0, %0" : "=m" (ret));
+	kernel_fpu_end();
+	return ret;
+}
+
+static inline u256 readqq(const volatile void __iomem *addr)
+{
+	u256 ret;
+
+	kernel_fpu_begin();
+	asm volatile("vmovdqu %0, %%ymm0" :
+		     : "m" (*(volatile u256 __force *)addr));
+	asm volatile("vmovdqu %%ymm0, %0" : "=m" (ret) : : "memory");
+	kernel_fpu_end();
+	return ret;
+}
+
+#define __raw_readqq __readqq
+#define readqq_relaxed(a) __readqq(a)
+#define readqq readqq
+
+static inline void __writeqq(u256 val, volatile void __iomem *addr)
+{
+	kernel_fpu_begin();
+	asm volatile("vmovdqu %0, %%ymm0" : : "m" (val));
+	asm volatile("vmovdqu %%ymm0, %0"
+		     : "=m" (*(volatile u256 __force *)addr));
+	kernel_fpu_end();
+}
+
+static inline void writeqq(u256 val, volatile void __iomem *addr)
+{
+	kernel_fpu_begin();
+	asm volatile("vmovdqu %0, %%ymm0" : : "m" (val));
+	asm volatile("vmovdqu %%ymm0, %0"
+		     : "=m" (*(volatile u256 __force *)addr)
+		     : : "memory");
+	kernel_fpu_end();
+}
+
+#define __raw_writeqq __writeqq
+#define writeqq_relaxed(a) __writeqq(a)
+#define writeqq writeqq
+#endif /* CONFIG_AS_AVX */
+
+#endif /* CONFIG_X86_64 */
 
 #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
 extern int valid_phys_addr_range(phys_addr_t addr, size_t size);
-- 
2.14.1

^ permalink raw reply related

* [RFC PATCH 3/3] cxgb4: read on-chip memory 256-bits at a time
From: Rahul Lakkireddy @ 2018-03-19 14:20 UTC (permalink / raw)
  To: x86, linux-kernel, netdev
  Cc: tglx, mingo, hpa, davem, akpm, torvalds, ganeshgr, nirranjan,
	indranil, Rahul Lakkireddy
In-Reply-To: <cover.1521469118.git.rahul.lakkireddy@chelsio.com>

Use readqq() to read on-chip memory 256-bits at a time.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 16 ++++++++--------
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h     |  6 ++++++
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
index 9da6f57901a9..3a319b16c8a3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
@@ -885,7 +885,7 @@ static int cudbg_memory_read(struct cudbg_init *pdbg_init, int win,
 	struct adapter *adap = pdbg_init->adap;
 	u32 pos, offset, resid;
 	u32 *res_buf;
-	u64 *buf;
+	u256 *buf;
 	int ret;
 
 	/* Argument sanity checks ...
@@ -893,10 +893,10 @@ static int cudbg_memory_read(struct cudbg_init *pdbg_init, int win,
 	if (addr & 0x3 || (uintptr_t)hbuf & 0x3)
 		return -EINVAL;
 
-	buf = (u64 *)hbuf;
+	buf = (u256 *)hbuf;
 
-	/* Try to do 64-bit reads.  Residual will be handled later. */
-	resid = len & 0x7;
+	/* Try to do 256-bit reads.  Residual will be handled later. */
+	resid = len & 0x1f;
 	len -= resid;
 
 	ret = t4_memory_rw_init(adap, win, mtype, &memoffset, &mem_base,
@@ -917,10 +917,10 @@ static int cudbg_memory_read(struct cudbg_init *pdbg_init, int win,
 
 	/* Transfer data from the adapter */
 	while (len > 0) {
-		*buf++ = le64_to_cpu((__force __le64)
-				     t4_read_reg64(adap, mem_base + offset));
-		offset += sizeof(u64);
-		len -= sizeof(u64);
+		*buf++ = le256_to_cpu((__force __le256)
+				      t4_read_reg256(adap, mem_base + offset));
+		offset += sizeof(u256);
+		len -= sizeof(u256);
 
 		/* If we've reached the end of our current window aperture,
 		 * move the PCI-E Memory Window on to the next.
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index a5c0a649f3c7..0035ed0a2ec9 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -51,6 +51,7 @@
 #include <linux/ptp_clock_kernel.h>
 #include <linux/ptp_classify.h>
 #include <asm/io.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include "t4_chip_type.h"
 #include "cxgb4_uld.h"
 
@@ -1234,6 +1235,11 @@ static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr)
 	return readq(adap->regs + reg_addr);
 }
 
+static inline u256 t4_read_reg256(struct adapter *adap, u32 reg_addr)
+{
+	return readqq(adap->regs + reg_addr);
+}
+
 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val)
 {
 	writeq(val, adap->regs + reg_addr);
-- 
2.14.1

^ permalink raw reply related

* Re: [PATCH RFC v2 net-next 00/21] net/ipv6: Separate data structures for FIB and data path
From: David Miller @ 2018-03-19 14:23 UTC (permalink / raw)
  To: dsahern; +Cc: netdev, idosch, roopa, eric.dumazet, weiwan, kafai, yoshfuji
In-Reply-To: <20180319033622.16693-1-dsahern@gmail.com>

From: David Ahern <dsahern@gmail.com>
Date: Sun, 18 Mar 2018 20:36:01 -0700

> RFC v2 changes
> - improved commit messages
> - move common metrics code from dst.c to net/ipv4/metrics.c (comment
>   from DaveM)
> - address comments from Wei Wang and Martin KaFai Lau (let me know if
>   I missed something)
> - fixes detected by kernel test robots
>   + added fib6_metric_set to change metric on a FIB entry which could
>     be pointing to read-only dst_default_metrics
>   + 0day testing found a problem with an intermediate patch; added
>     dst_hold_safe on rt->from. Code is removed 3 patches later
> - allow cacheinfo to handle NULL dst; means only expires is pushed to
>   userspace

Series looks great to me.

Nice work David.

^ permalink raw reply

* Re: NETDEV WATCHDOG: eth2 (e1000e): transmit queue 0 timed out
From: Marco Berizzi @ 2018-03-19 14:26 UTC (permalink / raw)
  To: netdev
In-Reply-To: <2010687872.1476663.1521462338714@mail.libero.it>

> Marco Berizzi wrote:

> I'm getting the same error messages, after hardware
> replacement and kernel upgrade to 4.16-rc5.

for completeness, same error with 4.16-rc6

[    0.000000] Linux version 4.16.0-rc6 (root@Pleiadi) (gcc version 5.5.0 (GCC)) #1 SMP Mon Mar 19 12:52:22 CET 2018
[    0.000000] Command line: auto BOOT_IMAGE=Linux ro root=805 vt.default_utf8=0
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000020200000-0x0000000040003fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040004000-0x0000000040004fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040005000-0x00000000d4176fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000d4177000-0x00000000d4622fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000d4623000-0x00000000d463cfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000d463d000-0x00000000d6609fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000d660a000-0x00000000d67d2fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000d67d3000-0x00000000d67d3fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000d67d4000-0x00000000d6816fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000d6817000-0x00000000d6ffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000d7000000-0x00000000df9fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011e5fffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] random: fast init done
[    0.000000] SMBIOS 2.7 present.
[    0.000000] DMI: LENOVO 3220A11/MAHOBAY, BIOS 9SKT99AUS 06/30/2017
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] e820: last_pfn = 0x11e600 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-CFFFF write-protect
[    0.000000]   D0000-E7FFF uncachable
[    0.000000]   E8000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask F00000000 write-back
[    0.000000]   1 base 100000000 mask FE0000000 write-back
[    0.000000]   2 base 0E0000000 mask FE0000000 uncachable
[    0.000000]   3 base 0D8000000 mask FF8000000 uncachable
[    0.000000]   4 base 0D7800000 mask FFF800000 uncachable
[    0.000000]   5 base 11F000000 mask FFF000000 uncachable
[    0.000000]   6 base 11E800000 mask FFF800000 uncachable
[    0.000000]   7 base 11E600000 mask FFFE00000 uncachable
[    0.000000]   8 disabled
[    0.000000]   9 disabled
[    0.000000] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[    0.000000] e820: update [mem 0xd7800000-0xffffffff] usable ==> reserved
[    0.000000] e820: last_pfn = 0xd7000 max_arch_pfn = 0x400000000
[    0.000000] Base memory trampoline at [        (ptrval)] 97000 size 24576
[    0.000000] BRK [0x01cbd000, 0x01cbdfff] PGTABLE
[    0.000000] BRK [0x01cbe000, 0x01cbefff] PGTABLE
[    0.000000] BRK [0x01cbf000, 0x01cbffff] PGTABLE
[    0.000000] BRK [0x01cc0000, 0x01cc0fff] PGTABLE
[    0.000000] BRK [0x01cc1000, 0x01cc1fff] PGTABLE
[    0.000000] BRK [0x01cc2000, 0x01cc2fff] PGTABLE
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000F0450 000024 (v02 LENOVO)
[    0.000000] ACPI: XSDT 0x00000000D4628080 000084 (v01 LENOVO TC-9S    00001620 AMI  00010013)
[    0.000000] ACPI: FACP 0x00000000D463A638 00010C (v05 LENOVO TC-9S    00001620 AMI  00010013)
[    0.000000] ACPI: DSDT 0x00000000D4628198 01249E (v02 LENOVO TC-9S    00001620 INTL 20051117)
[    0.000000] ACPI: FACS 0x00000000D65F7080 000040
[    0.000000] ACPI: APIC 0x00000000D463A748 000072 (v03 LENOVO TC-9S    00001620 AMI  00010013)
[    0.000000] ACPI: FPDT 0x00000000D463A7C0 000044 (v01 LENOVO TC-9S    00001620 AMI  00010013)
[    0.000000] ACPI: MCFG 0x00000000D463A808 00003C (v01 LENOVO TC-9S    00001620 MSFT 00000097)
[    0.000000] ACPI: SLIC 0x00000000D463A848 000176 (v01 LENOVO TC-9S    00001620 AMI  00010013)
[    0.000000] ACPI: HPET 0x00000000D463A9C0 000038 (v01 LENOVO TC-9S    00001620 AMI. 00000005)
[    0.000000] ACPI: SSDT 0x00000000D463A9F8 00036D (v01 LENOVO TC-9S    00001620 INTL 20091112)
[    0.000000] ACPI: SSDT 0x00000000D463AD68 0009AA (v01 LENOVO TC-9S    00001620 INTL 20051117)
[    0.000000] ACPI: SSDT 0x00000000D463B718 000B22 (v01 LENOVO TC-9S    00001620 INTL 20051117)
[    0.000000] ACPI: ASF! 0x00000000D463C240 0000A5 (v32 LENOVO TC-9S    00001620 TFSM 000F4240)
[    0.000000] ACPI: BGRT 0x00000000D463C2E8 000038 (v00 LENOVO TC-9S    00001620 AMI  00010013)
[    0.000000] ACPI: TCPA 0x00000000D463C320 000032 (v02 LENOVO TC-9S    00001620 MSFT 01000013)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000011e5fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009cfff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000001fffffff]
[    0.000000]   node   0: [mem 0x0000000020200000-0x0000000040003fff]
[    0.000000]   node   0: [mem 0x0000000040005000-0x00000000d4176fff]
[    0.000000]   node   0: [mem 0x00000000d67d3000-0x00000000d67d3fff]
[    0.000000]   node   0: [mem 0x00000000d6817000-0x00000000d6ffffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x000000011e5fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000011e5fffff]
[    0.000000] On node 0 totalpages: 994556
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA zone: 21 pages reserved
[    0.000000]   DMA zone: 3996 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 13534 pages used for memmap
[    0.000000]   DMA32 zone: 866144 pages, LIFO batch:31
[    0.000000]   Normal zone: 1944 pages used for memmap
[    0.000000]   Normal zone: 124416 pages, LIFO batch:31
[    0.000000] Reserved but unavailable: 100 pages
[    0.000000] Reserving Intel graphics memory at [mem 0xd7a00000-0xdf9fffff]
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.000000] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[    0.000000] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.000000] setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[    0.000000] percpu: Embedded 41 pages/cpu @        (ptrval) s129944 r8192 d29800 u524288
[    0.000000] pcpu-alloc: s129944 r8192 d29800 u524288 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 2 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 978993
[    0.000000] Kernel command line: auto BOOT_IMAGE=Linux ro root=805 vt.default_utf8=0
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Memory: 3828752K/3978224K available (6152K kernel code, 333K rwdata, 1220K rodata, 764K init, 460K bss, 149472K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Kernel/User page tables isolation: enabled
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 4352, nr_irqs: 456, preallocated irqs: 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] ACPI: Core revision 20180105
[    0.000000] ACPI: 4 ACPI AML tables successfully acquired and loaded
[    0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484882848 ns
[    0.000000] hpet clockevent registered
[    0.000000] APIC: Switch to symmetric I/O mode setup
[    0.000000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
[    0.005000] tsc: Fast TSC calibration using PIT
[    0.006000] tsc: Detected 3192.794 MHz processor
[    0.006000] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2e05b2c1dde, max_idle_ns: 440795275151 ns
[    0.006000] Calibrating delay loop (skipped), value calculated using timer frequency.. 6385.58 BogoMIPS (lpj=3192794)
[    0.006000] pid_max: default: 32768 minimum: 301
[    0.006000] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.006000] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.006000] CPU: Physical Processor ID: 0
[    0.006000] CPU: Processor Core ID: 0
[    0.006000] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.006000] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.006000] process: using mwait in idle threads
[    0.007003] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8
[    0.007074] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0
[    0.007142] Spectre V2 : Mitigation: Full generic retpoline
[    0.007276] Freeing SMP alternatives memory: 20K
[    0.008040] TSC deadline timer enabled
[    0.008042] smpboot: CPU0: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (family: 0x6, model: 0x3a, stepping: 0x9)
[    0.008190] Performance Events: PEBS fmt1+, IvyBridge events, 16-deep LBR, full-width counters, Intel PMU driver.
[    0.008326] ... version:                3
[    0.008393] ... bit width:              48
[    0.008459] ... generic registers:      8
[    0.008526] ... value mask:             0000ffffffffffff
[    0.008594] ... max period:             00007fffffffffff
[    0.008660] ... fixed-purpose events:   3
[    0.008727] ... event mask:             00000007000000ff
[    0.008818] Hierarchical SRCU implementation.
[    0.008944] smp: Bringing up secondary CPUs ...
[    0.009008] x86: Booting SMP configuration:
[    0.009077] .... node  #0, CPUs:      #1 #2 #3
[    0.012018] smp: Brought up 1 node, 4 CPUs
[    0.012138] smpboot: Max logical packages: 1
[    0.012205] smpboot: Total of 4 processors activated (25542.35 BogoMIPS)
[    0.013071] devtmpfs: initialized
[    0.013157] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.013157] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.013232] xor: automatically using best checksumming function   avx       
[    0.013341] NET: Registered protocol family 16
[    0.013486] cpuidle: using governor ladder
[    0.013486] cpuidle: using governor menu
[    0.013486] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.014002] ACPI: bus type PCI registered
[    0.014080] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.014196] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.014272] pmd_set_huge: Cannot satisfy [mem 0xf8000000-0xf8200000] with a huge-page mapping due to MTRR override.
[    0.014421] PCI: Using configuration type 1 for base access
[    0.014512] core: PMU erratum BJ122, BV98, HSD29 workaround disabled, HT off
[    0.031067] raid6: sse2x1   gen()  8730 MB/s
[    0.048072] raid6: sse2x1   xor()  6357 MB/s
[    0.065072] raid6: sse2x2   gen() 10878 MB/s
[    0.082081] raid6: sse2x2   xor()  7568 MB/s
[    0.099086] raid6: sse2x4   gen() 12601 MB/s
[    0.116090] raid6: sse2x4   xor()  9439 MB/s
[    0.116160] raid6: using algorithm sse2x4 gen() 12601 MB/s
[    0.116230] raid6: .... xor() 9439 MB/s, rmw enabled
[    0.116299] raid6: using ssse3x2 recovery algorithm
[    0.117002] ACPI: Added _OSI(Module Device)
[    0.117002] ACPI: Added _OSI(Processor Device)
[    0.117002] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.117002] ACPI: Added _OSI(Processor Aggregator Device)
[    0.117002] ACPI: Executed 1 blocks of module-level executable AML code
[    0.122306] ACPI: Dynamic OEM Table Load:
[    0.122382] ACPI: SSDT 0xFFFF880119A54000 00083B (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
[    0.123161] ACPI: Dynamic OEM Table Load:
[    0.123233] ACPI: SSDT 0xFFFF880119BF2400 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
[    0.123473] ACPI: Dynamic OEM Table Load:
[    0.123473] ACPI: SSDT 0xFFFF880119A1FC00 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
[    0.123881] ACPI: Interpreter enabled
[    0.123953] ACPI: (supports S0 S5)
[    0.124001] ACPI: Using IOAPIC for interrupt routing
[    0.125000] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.125000] ACPI: Enabled 17 GPEs in block 00 to 3F
[    0.131007] ACPI: Power Resource [FN00] (off)
[    0.132050] ACPI: Power Resource [FN01] (off)
[    0.132167] ACPI: Power Resource [FN02] (off)
[    0.132281] ACPI: Power Resource [FN03] (off)
[    0.132401] ACPI: Power Resource [FN04] (off)
[    0.133006] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.133034] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    0.133108] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.133338] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug PME]
[    0.133497] acpi PNP0A08:00: _OSC: OS now controls [AER PCIeCapability]
[    0.133571] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration
[    0.134001] PCI host bridge to bus 0000:00
[    0.134001] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.134001] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.134003] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.134077] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff window]
[    0.134149] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff window]
[    0.134219] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff window]
[    0.134291] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff window]
[    0.134363] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff window]
[    0.134435] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff window]
[    0.134507] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff window]
[    0.134580] pci_bus 0000:00: root bus resource [bus 00-3e]
[    0.134655] pci 0000:00:00.0: [8086:0150] type 00 class 0x060000
[    0.135000] pci 0000:00:01.0: [8086:0151] type 01 class 0x060400
[    0.135000] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    0.135006] pci 0000:00:02.0: [8086:0152] type 00 class 0x030000
[    0.135006] pci 0000:00:02.0: reg 0x10: [mem 0xf7800000-0xf7bfffff 64bit]
[    0.135006] pci 0000:00:02.0: reg 0x18: [mem 0xe0000000-0xefffffff 64bit pref]
[    0.135006] pci 0000:00:02.0: reg 0x20: [io  0xf000-0xf03f]
[    0.135007] pci 0000:00:14.0: [8086:1e31] type 00 class 0x0c0330
[    0.135007] pci 0000:00:14.0: reg 0x10: [mem 0xf7f20000-0xf7f2ffff 64bit]
[    0.135007] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    0.135049] pci 0000:00:16.0: [8086:1e3a] type 00 class 0x078000
[    0.135073] pci 0000:00:16.0: reg 0x10: [mem 0xf7f38000-0xf7f3800f 64bit]
[    0.135143] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    0.135196] pci 0000:00:16.3: [8086:1e3d] type 00 class 0x070002
[    0.135216] pci 0000:00:16.3: reg 0x10: [io  0xf0e0-0xf0e7]
[    0.135224] pci 0000:00:16.3: reg 0x14: [mem 0xf7f36000-0xf7f36fff]
[    0.135344] pci 0000:00:19.0: [8086:1502] type 00 class 0x020000
[    0.135362] pci 0000:00:19.0: reg 0x10: [mem 0xf7f00000-0xf7f1ffff]
[    0.135370] pci 0000:00:19.0: reg 0x14: [mem 0xf7f35000-0xf7f35fff]
[    0.135378] pci 0000:00:19.0: reg 0x18: [io  0xf080-0xf09f]
[    0.135432] pci 0000:00:19.0: PME# supported from D0 D3hot D3cold
[    0.135485] pci 0000:00:1a.0: [8086:1e2d] type 00 class 0x0c0320
[    0.135506] pci 0000:00:1a.0: reg 0x10: [mem 0xf7f34000-0xf7f343ff]
[    0.135583] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    0.136000] pci 0000:00:1d.0: [8086:1e26] type 00 class 0x0c0320
[    0.136000] pci 0000:00:1d.0: reg 0x10: [mem 0xf7f33000-0xf7f333ff]
[    0.136000] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.136006] pci 0000:00:1e.0: [8086:244e] type 01 class 0x060401
[    0.136006] pci 0000:00:1f.0: [8086:1e47] type 00 class 0x060100
[    0.136036] pci 0000:00:1f.2: [8086:1e02] type 00 class 0x010601
[    0.136053] pci 0000:00:1f.2: reg 0x10: [io  0xf0d0-0xf0d7]
[    0.136060] pci 0000:00:1f.2: reg 0x14: [io  0xf0c0-0xf0c3]
[    0.136067] pci 0000:00:1f.2: reg 0x18: [io  0xf0b0-0xf0b7]
[    0.136074] pci 0000:00:1f.2: reg 0x1c: [io  0xf0a0-0xf0a3]
[    0.136081] pci 0000:00:1f.2: reg 0x20: [io  0xf060-0xf07f]
[    0.136089] pci 0000:00:1f.2: reg 0x24: [mem 0xf7f32000-0xf7f327ff]
[    0.136126] pci 0000:00:1f.2: PME# supported from D3hot
[    0.136175] pci 0000:00:1f.3: [8086:1e22] type 00 class 0x0c0500
[    0.136191] pci 0000:00:1f.3: reg 0x10: [mem 0xf7f31000-0xf7f310ff 64bit]
[    0.136210] pci 0000:00:1f.3: reg 0x20: [io  0xf040-0xf05f]
[    0.136500] pci 0000:01:00.0: [8086:1521] type 00 class 0x020000
[    0.136981] pci 0000:01:00.0: reg 0x10: [mem 0xf7d00000-0xf7dfffff]
[    0.137419] pci 0000:01:00.0: reg 0x1c: [mem 0xf7e84000-0xf7e87fff]
[    0.137859] pci 0000:01:00.0: reg 0x30: [mem 0xf7e00000-0xf7e7ffff pref]
[    0.139147] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.139660] pci 0000:01:00.1: [8086:1521] type 00 class 0x020000
[    0.140105] pci 0000:01:00.1: reg 0x10: [mem 0xf7c00000-0xf7cfffff]
[    0.140545] pci 0000:01:00.1: reg 0x1c: [mem 0xf7e80000-0xf7e83fff]
[    0.142209] pci 0000:01:00.1: PME# supported from D0 D3hot D3cold
[    1.145005] pci 0000:00:01.0: ASPM: Could not configure common clock
[    1.145388] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.145461] pci 0000:00:01.0:   bridge window [mem 0xf7c00000-0xf7efffff]
[    1.145521] pci 0000:00:1e.0: PCI bridge to [bus 02] (subtractive decode)
[    1.145599] pci 0000:00:1e.0:   bridge window [io  0x0000-0x0cf7 window] (subtractive decode)
[    1.145600] pci 0000:00:1e.0:   bridge window [io  0x0d00-0xffff window] (subtractive decode)
[    1.145601] pci 0000:00:1e.0:   bridge window [mem 0x000a0000-0x000bffff window] (subtractive decode)
[    1.145602] pci 0000:00:1e.0:   bridge window [mem 0x000d0000-0x000d3fff window] (subtractive decode)
[    1.145603] pci 0000:00:1e.0:   bridge window [mem 0x000d4000-0x000d7fff window] (subtractive decode)
[    1.145604] pci 0000:00:1e.0:   bridge window [mem 0x000d8000-0x000dbfff window] (subtractive decode)
[    1.145605] pci 0000:00:1e.0:   bridge window [mem 0x000dc000-0x000dffff window] (subtractive decode)
[    1.145606] pci 0000:00:1e.0:   bridge window [mem 0x000e0000-0x000e3fff window] (subtractive decode)
[    1.145607] pci 0000:00:1e.0:   bridge window [mem 0x000e4000-0x000e7fff window] (subtractive decode)
[    1.145608] pci 0000:00:1e.0:   bridge window [mem 0xdfa00000-0xfeafffff window] (subtractive decode)
[    1.145618] pci_bus 0000:00: on NUMA node 0
[    1.146049] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.146155] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.146265] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.146375] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.146485] ACPI: PCI Interrupt Link [LNKE] (IRQs *3 4 5 6 10 11 12 14 15)
[    1.146593] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.146705] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.146814] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.147072] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    1.147080] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    1.147196] pci 0000:00:02.0: vgaarb: bridge control possible
[    1.147266] vgaarb: loaded
[    1.147367] SCSI subsystem initialized
[    1.147443] libata version 3.00 loaded.
[    1.147443] PCI: Using ACPI for IRQ routing
[    1.149050] PCI: pci_cache_line_size set to 64 bytes
[    1.149165] e820: reserve RAM buffer [mem 0x0009d800-0x0009ffff]
[    1.149166] e820: reserve RAM buffer [mem 0x40004000-0x43ffffff]
[    1.149167] e820: reserve RAM buffer [mem 0xd4177000-0xd7ffffff]
[    1.149168] e820: reserve RAM buffer [mem 0xd67d4000-0xd7ffffff]
[    1.149169] e820: reserve RAM buffer [mem 0xd7000000-0xd7ffffff]
[    1.149170] e820: reserve RAM buffer [mem 0x11e600000-0x11fffffff]
[    1.149255] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    1.149330] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    1.151004] clocksource: Switched to clocksource tsc-early
[    1.151105] pnp: PnP ACPI init
[    1.151250] system 00:00: [io  0x0680-0x069f] has been reserved
[    1.151322] system 00:00: [io  0x1100-0x110f] has been reserved
[    1.151392] system 00:00: [io  0xffff] has been reserved
[    1.151461] system 00:00: [io  0xffff] has been reserved
[    1.151530] system 00:00: [io  0x0400-0x0453] has been reserved
[    1.151600] system 00:00: [io  0x0458-0x047f] has been reserved
[    1.151670] system 00:00: [io  0x0500-0x057f] has been reserved
[    1.151740] system 00:00: [io  0x164e-0x164f] has been reserved
[    1.151813] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.151827] pnp 00:01: Plug and Play ACPI device, IDs PNP0b00 (active)
[    1.151856] system 00:02: [io  0x0454-0x0457] has been reserved
[    1.151932] system 00:02: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    1.152037] system 00:03: [io  0x0a00-0x0a2f] has been reserved
[    1.152109] system 00:03: [io  0x0a30-0x0a3f] has been reserved
[    1.152179] system 00:03: [io  0x0a40-0x0a4f] has been reserved
[    1.152249] system 00:03: [io  0x0218-0x0219] has been reserved
[    1.152321] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.152358] system 00:04: [io  0x04d0-0x04d1] has been reserved
[    1.152435] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.152570] pnp 00:05: [dma 0 disabled]
[    1.152596] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active)
[    1.152789] pnp 00:06: Plug and Play ACPI device, IDs PNP0c31 (active)
[    1.152912] system 00:07: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    1.152984] system 00:07: [mem 0xfed10000-0xfed17fff] has been reserved
[    1.153065] system 00:07: [mem 0xfed18000-0xfed18fff] has been reserved
[    1.153135] system 00:07: [mem 0xfed19000-0xfed19fff] has been reserved
[    1.153203] system 00:07: [mem 0xf8000000-0xfbffffff] has been reserved
[    1.153274] system 00:07: [mem 0xfed20000-0xfed3ffff] has been reserved
[    1.153344] system 00:07: [mem 0xfed90000-0xfed93fff] has been reserved
[    1.153415] system 00:07: [mem 0xfed45000-0xfed8ffff] has been reserved
[    1.153486] system 00:07: [mem 0xff000000-0xffffffff] has been reserved
[    1.153557] system 00:07: [mem 0xfee00000-0xfeefffff] could not be reserved
[    1.153629] system 00:07: [mem 0xdfa00000-0xdfa00fff] has been reserved
[    1.153699] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.153816] system 00:08: [mem 0x20000000-0x201fffff] has been reserved
[    1.153888] system 00:08: [mem 0x40004000-0x40004fff] has been reserved
[    1.153960] system 00:08: Plug and Play ACPI device, IDs PNP0c01 (active)
[    1.153987] pnp: PnP ACPI: found 9 devices
[    1.159271] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    1.159403] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.159473] pci 0000:00:01.0:   bridge window [mem 0xf7c00000-0xf7efffff]
[    1.159547] pci 0000:00:1e.0: PCI bridge to [bus 02]
[    1.159625] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    1.159627] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    1.159628] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    1.159629] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000d3fff window]
[    1.159630] pci_bus 0000:00: resource 8 [mem 0x000d4000-0x000d7fff window]
[    1.159630] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000dbfff window]
[    1.159632] pci_bus 0000:00: resource 10 [mem 0x000dc000-0x000dffff window]
[    1.159632] pci_bus 0000:00: resource 11 [mem 0x000e0000-0x000e3fff window]
[    1.159633] pci_bus 0000:00: resource 12 [mem 0x000e4000-0x000e7fff window]
[    1.159635] pci_bus 0000:00: resource 13 [mem 0xdfa00000-0xfeafffff window]
[    1.159636] pci_bus 0000:01: resource 1 [mem 0xf7c00000-0xf7efffff]
[    1.159637] pci_bus 0000:02: resource 4 [io  0x0000-0x0cf7 window]
[    1.159638] pci_bus 0000:02: resource 5 [io  0x0d00-0xffff window]
[    1.159639] pci_bus 0000:02: resource 6 [mem 0x000a0000-0x000bffff window]
[    1.159640] pci_bus 0000:02: resource 7 [mem 0x000d0000-0x000d3fff window]
[    1.159641] pci_bus 0000:02: resource 8 [mem 0x000d4000-0x000d7fff window]
[    1.159642] pci_bus 0000:02: resource 9 [mem 0x000d8000-0x000dbfff window]
[    1.159642] pci_bus 0000:02: resource 10 [mem 0x000dc000-0x000dffff window]
[    1.159643] pci_bus 0000:02: resource 11 [mem 0x000e0000-0x000e3fff window]
[    1.159644] pci_bus 0000:02: resource 12 [mem 0x000e4000-0x000e7fff window]
[    1.159645] pci_bus 0000:02: resource 13 [mem 0xdfa00000-0xfeafffff window]
[    1.159706] NET: Registered protocol family 2
[    1.159857] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes)
[    1.159940] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[    1.160050] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[    1.160194] TCP: Hash tables configured (established 32768 bind 32768)
[    1.160281] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    1.160362] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    1.160462] NET: Registered protocol family 1
[    1.160557] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    1.195149] PCI: CLS 64 bytes, default 64
[    1.195157] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.195232] software IO TLB [mem 0xd0177000-0xd4177000] (64MB) mapped at [000000005f622a8e-000000006fd9c147]
[    1.195384] RAPL PMU: API unit is 2^-32 Joules, 3 fixed counters, 163840 ms ovfl timer
[    1.195459] RAPL PMU: hw unit of domain pp0-core 2^-16 Joules
[    1.195528] RAPL PMU: hw unit of domain package 2^-16 Joules
[    1.195597] RAPL PMU: hw unit of domain pp1-gpu 2^-16 Joules
[    1.195906] workingset: timestamp_bits=62 max_order=20 bucket_order=0
[    1.196861] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    1.196936] io scheduler noop registered
[    1.197030] io scheduler cfq registered (default)
[    1.197100] io scheduler mq-deadline registered
[    1.197168] io scheduler kyber registered
[    1.197563] Monitor-Mwait will be used to enter C-1 state
[    1.197567] Monitor-Mwait will be used to enter C-2 state
[    1.197571] Monitor-Mwait will be used to enter C-3 state
[    1.198287] ahci 0000:00:1f.2: version 3.0
[    1.198397] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
[    1.208563] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0xb impl SATA mode
[    1.208652] ahci 0000:00:1f.2: flags: 64bit ncq stag pm led clo pio slum part ems sxs apst 
[    1.214298] scsi host0: ahci
[    1.214432] scsi host1: ahci
[    1.214661] scsi host2: ahci
[    1.214787] scsi host3: ahci
[    1.214890] scsi host4: ahci
[    1.215003] scsi host5: ahci
[    1.215099] ata1: SATA max UDMA/133 abar m2048@0xf7f32000 port 0xf7f32100 irq 24
[    1.215171] ata2: SATA max UDMA/133 abar m2048@0xf7f32000 port 0xf7f32180 irq 24
[    1.215244] ata3: DUMMY
[    1.215309] ata4: SATA max UDMA/133 abar m2048@0xf7f32000 port 0xf7f32280 irq 24
[    1.215380] ata5: DUMMY
[    1.215445] ata6: DUMMY
[    1.215526] intel_pstate: Intel P-state driver initializing
[    1.215696] Initializing XFRM netlink socket
[    1.215766] NET: Registered protocol family 17
[    1.215850] sched_clock: Marking stable (1215001659, 0)->(1219466383, -4464724)
[    1.215975] registered taskstats version 1
[    1.216192] Btrfs loaded, crc32c=crc32c-generic
[    1.525749] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    1.527261] ata1.00: ATA-8: ST500DM002-1BD142, KC65, max UDMA/100
[    1.527333] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    1.529159] ata1.00: configured for UDMA/100
[    1.529391] scsi 0:0:0:0: Direct-Access     ATA      ST500DM002-1BD14 KC65 PQ: 0 ANSI: 5
[    1.529835] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    1.529909] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    1.530009] sd 0:0:0:0: [sda] Write Protect is off
[    1.530088] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.530146] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.620734]  sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 >
[    1.621285] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.837736] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.841117] ata2.00: ATAPI: HL-DT-STDVD-RAM GH82N, KU02, max UDMA/133
[    1.845479] ata2.00: configured for UDMA/133
[    1.853981] scsi 1:0:0:0: CD-ROM            HL-DT-ST DVD-RAM GH82N    KU02 PQ: 0 ANSI: 5
[    2.181744] ata4: SATA link down (SStatus 0 SControl 300)
[    2.205841] BTRFS: device fsid 15aaa597-530a-4049-a807-344b6e742f9b devid 1 transid 29997 /dev/root
[    2.206336] BTRFS info (device sda5): disk space caching is enabled
[    2.206408] BTRFS info (device sda5): has skinny extents
[    2.209005] tsc: Refined TSC clocksource calibration: 3192.754 MHz
[    2.209077] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e058d02647, max_idle_ns: 440795319305 ns
[    2.209220] clocksource: Switched to clocksource tsc
[    2.253767] VFS: Mounted root (btrfs filesystem) readonly on device 0:11.
[    2.254391] Freeing unused kernel memory: 764K
[    2.254461] Write protecting the kernel read-only data: 10240k
[    2.254927] Freeing unused kernel memory: 2020K
[    2.256395] Freeing unused kernel memory: 828K
[    2.918381] udevd[797]: starting eudev-3.1.5
[    2.981317] random: crng init done
[    2.998134] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    2.998212] ACPI: Power Button [PWRB]
[    2.998303] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    2.998377] ACPI: Power Button [PWRF]
[    3.016589] thermal LNXTHERM:00: registered as thermal_zone0
[    3.016663] ACPI: Thermal Zone [TZ00] (28 C)
[    3.016897] thermal LNXTHERM:01: registered as thermal_zone1
[    3.016968] ACPI: Thermal Zone [TZ01] (30 C)
[    3.022120] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    3.022193] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    3.022400] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[    3.027014] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    3.048288] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    3.048535] sr 1:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
[    3.048663] cdrom: Uniform CD-ROM driver Revision: 3.20
[    3.048895] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    3.049982] ACPI: bus type USB registered
[    3.050075] usbcore: registered new interface driver usbfs
[    3.050153] usbcore: registered new interface driver hub
[    3.050232] usbcore: registered new device driver usb
[    3.056344] rtc_cmos 00:01: RTC can wake from S4
[    3.056515] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[    3.056609] rtc_cmos 00:01: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    3.074917] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    3.074990] igb: Copyright (c) 2007-2014 Intel Corporation.
[    3.087011] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.087662] ehci-pci: EHCI PCI platform driver
[    3.172830] igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
[    3.172903] igb 0000:01:00.0: eth0: (PCIe:5.0Gb/s:Width x4) b4:96:91:0e:fc:e4
[    3.173525] igb 0000:01:00.0: eth0: PBA No: H34227-005
[    3.173596] igb 0000:01:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
[    3.243573] e1000e 0000:00:19.0 eth1: (PCI Express:2.5GT/s:Width x1) fc:4d:d4:2f:e2:1b
[    3.243770] e1000e 0000:00:19.0 eth1: Intel(R) PRO/1000 Network Connection
[    3.243871] e1000e 0000:00:19.0 eth1: MAC: 10, PHY: 11, PBA No: FFFFFF-0FF
[    3.244497] e1000e 0000:00:19.0 eth125: renamed from eth1
[    3.264448] 0000:00:16.3: ttyS1 at I/O 0xf0e0 (irq = 19, base_baud = 115200) is a 16550A
[    3.264928] cryptd: max_cpu_qlen set to 1000
[    3.265665] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    3.266061] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
[    3.266609] ehci-pci 0000:00:1a.0: debug port 2
[    3.270874] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    3.270884] ehci-pci 0000:00:1a.0: irq 16, io mem 0xf7f34000
[    3.278025] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    3.278091] e1000e 0000:00:19.0 eth2: renamed from eth125
[    3.278266] hub 1-0:1.0: USB hub found
[    3.278372] hub 1-0:1.0: 3 ports detected
[    3.278629] ehci-pci 0000:00:1d.0: EHCI Host Controller
[    3.278699] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2
[    3.278778] ehci-pci 0000:00:1d.0: debug port 2
[    3.282727] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[    3.282733] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf7f33000
[    3.284442] igb 0000:01:00.1: Intel(R) Gigabit Ethernet Network Connection
[    3.284516] igb 0000:01:00.1: eth1: (PCIe:5.0Gb/s:Width x4) b4:96:91:0e:fc:e5
[    3.285177] igb 0000:01:00.1: eth1: PBA No: H34227-005
[    3.285249] igb 0000:01:00.1: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
[    3.290033] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    3.290287] hub 2-0:1.0: USB hub found
[    3.290384] hub 2-0:1.0: 3 ports detected
[    3.290683] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    3.290761] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
[    3.291888] xhci_hcd 0000:00:14.0: hcc params 0x20007181 hci version 0x100 quirks 0x0000b930
[    3.291964] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[    3.292117] hub 3-0:1.0: USB hub found
[    3.292196] hub 3-0:1.0: 4 ports detected
[    3.292548] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    3.292629] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 4
[    3.292806] hub 4-0:1.0: USB hub found
[    3.292881] hub 4-0:1.0: 4 ports detected
[    3.331892] AVX version of gcm_enc/dec engaged.
[    3.331964] AES CTR mode by8 optimization enabled
[    3.602020] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    3.610018] usb 2-1: new high-speed USB device number 2 using ehci-pci
[    3.730639] hub 1-1:1.0: USB hub found
[    3.730862] hub 1-1:1.0: 6 ports detected
[    3.738483] hub 2-1:1.0: USB hub found
[    3.738599] hub 2-1:1.0: 8 ports detected
[    4.376904] BTRFS: device fsid f4b6e010-47bf-4fd3-b309-d7b18397896b devid 1 transid 575 /dev/sda9
[    4.525195] BTRFS: device fsid 23a29ee3-8309-4a45-80e9-caf09a473550 devid 1 transid 50953 /dev/sda7
[    4.542047] BTRFS: device fsid 83dfcabe-2aef-4cbf-b4c1-8f5889c2a6e1 devid 1 transid 1023 /dev/sda8
[    4.555793] BTRFS: device fsid 72fa3bcd-f01d-4388-bd94-3f3e47deb2af devid 1 transid 851 /dev/sda6
[    4.583741] BTRFS: device fsid 2aa0afe6-3e76-4ad3-9d1c-02a525f1e98d devid 1 transid 91 /dev/sda10
[    4.591912] BTRFS: device fsid 8f8d78ab-6992-4d3b-8454-05761007ecb8 devid 1 transid 32761 /dev/sda11
[    4.649067] Adding 33385492k swap on /dev/sda12.  Priority:-2 extents:1 across:33385492k 
[    5.008681] BTRFS info (device sda5): disk space caching is enabled
[    8.153097] BTRFS info (device sda6): disk space caching is enabled
[    8.153180] BTRFS info (device sda6): has skinny extents
[    8.222789] BTRFS info (device sda7): disk space caching is enabled
[    8.222879] BTRFS info (device sda7): has skinny extents
[    8.306025] BTRFS info (device sda8): disk space caching is enabled
[    8.306114] BTRFS info (device sda8): has skinny extents
[    8.415644] BTRFS info (device sda9): disk space caching is enabled
[    8.415734] BTRFS info (device sda9): has skinny extents
[    8.531444] BTRFS info (device sda10): disk space caching is enabled
[    8.531516] BTRFS info (device sda10): has skinny extents
[    8.575126] BTRFS info (device sda11): disk space caching is enabled
[    8.575211] BTRFS info (device sda11): has skinny extents
[   14.074833] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   15.010244] e1000e: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[   18.738372] NET: Registered protocol family 15
[  574.584368] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.
[ 6007.712862] e1000e 0000:00:19.0 eth2: Detected Hardware Unit Hang:
                 TDH                  <3d>
                 TDT                  <53>
                 next_to_use          <53>
                 next_to_clean        <3d>
               buffer_info[next_to_clean]:
                 time_stamp           <10057132d>
                 next_to_watch        <3d>
                 jiffies              <1005717c1>
                 next_to_watch.status <0>
               MAC Status             <80083>
               PHY Status             <796d>
               PHY 1000BASE-T Status  <7800>
               PHY Extended Status    <3000>
               PCI Status             <10>
[ 6009.696719] e1000e 0000:00:19.0 eth2: Detected Hardware Unit Hang:
                 TDH                  <3d>
                 TDT                  <53>
                 next_to_use          <53>
                 next_to_clean        <3d>
               buffer_info[next_to_clean]:
                 time_stamp           <10057132d>
                 next_to_watch        <3d>
                 jiffies              <100571f80>
                 next_to_watch.status <0>
               MAC Status             <80083>
               PHY Status             <796d>
               PHY 1000BASE-T Status  <7800>
               PHY Extended Status    <3000>
               PCI Status             <10>
[ 6011.744878] e1000e 0000:00:19.0 eth2: Detected Hardware Unit Hang:
                 TDH                  <3d>
                 TDT                  <53>
                 next_to_use          <53>
                 next_to_clean        <3d>
               buffer_info[next_to_clean]:
                 time_stamp           <10057132d>
                 next_to_watch        <3d>
                 jiffies              <100572781>
                 next_to_watch.status <0>
               MAC Status             <80083>
               PHY Status             <796d>
               PHY 1000BASE-T Status  <7800>
               PHY Extended Status    <3000>
               PCI Status             <10>
[ 6012.895772] ------------[ cut here ]------------
[ 6012.895779] NETDEV WATCHDOG: eth2 (e1000e): transmit queue 0 timed out
[ 6012.895796] WARNING: CPU: 3 PID: 0 at net/sched/sch_generic.c:464 dev_watchdog+0x14b/0x1a2
[ 6012.895796] Modules linked in: sha256_ssse3 sha256_generic drbg ansi_cprng authenc echainiv xfrm4_mode_tunnel sha1_ssse3 sha1_generic hmac xfrm4_tunnel tunnel4 ipcomp xfrm_ipcomp esp4 af_key nf_nat_ftp nf_conntrack_ftp xt_TCPMSS xt_helper xt_mark xt_statistic xt_nat xt_multiport xt_limit xt_tcpudp xt_policy xt_conntrack iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables x_tables crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 crypto_simd cryptd glue_helper xhci_pci ehci_pci xhci_hcd ehci_hcd 8250_pci igb rtc_cmos usbcore i2c_algo_bit 8250 e1000e 8250_base thermal usb_common serial_core sr_mod button i2c_core cdrom
[ 6012.895848] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.16.0-rc6 #1
[ 6012.895849] Hardware name: LENOVO 3220A11/MAHOBAY, BIOS 9SKT99AUS 06/30/2017
[ 6012.895850] RIP: 0010:dev_watchdog+0x14b/0x1a2
[ 6012.895851] RSP: 0018:ffff88011e383ec8 EFLAGS: 00010282
[ 6012.895852] RAX: 000000000000003a RBX: ffff880117aa0438 RCX: 000000000000023d
[ 6012.895852] RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffffffff81c5bfac
[ 6012.895853] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 6012.895853] R10: 0000000000000202 R11: ffffffff81c6ad1c R12: ffff880117aa0000
[ 6012.895854] R13: 0000000000000003 R14: 000000000000000a R15: 0000000000000001
[ 6012.895855] FS:  0000000000000000(0000) GS:ffff88011e380000(0000) knlGS:0000000000000000
[ 6012.895855] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6012.895856] CR2: 00007f8f2d96c5f8 CR3: 0000000001a0a003 CR4: 00000000001606a0
[ 6012.895856] Call Trace:
[ 6012.895858]  <IRQ>
[ 6012.895861]  call_timer_fn+0x12/0x75
[ 6012.895863]  ? qdisc_reset+0xc0/0xc0
[ 6012.895863]  expire_timers+0x66/0x73
[ 6012.895865]  run_timer_softirq+0x63/0xdf
[ 6012.895867]  ? recalibrate_cpu_khz+0x1/0x1
[ 6012.895868]  ? ktime_get+0x38/0x87
[ 6012.895870]  ? lapic_next_event+0x1a/0x1a
[ 6012.895871]  __do_softirq+0xc2/0x1b4
[ 6012.895874]  irq_exit+0x49/0x88
[ 6012.895875]  smp_apic_timer_interrupt+0x76/0x81
[ 6012.895877]  apic_timer_interrupt+0xf/0x20
[ 6012.895878]  </IRQ>
[ 6012.895880] RIP: 0010:cpuidle_enter_state+0x116/0x168
[ 6012.895881] RSP: 0018:ffffc90000087ed8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff12
[ 6012.895882] RAX: 00000577fc8418a0 RBX: 00000577fc8418a0 RCX: 000000000000001f
[ 6012.895882] RDX: 0000000000000000 RSI: 0000118190c30038 RDI: 0000000000000000
[ 6012.895883] RBP: 0000000000000003 R08: 0000000000000004 R09: 0000000000000000
[ 6012.895883] R10: ffffc90000087ec0 R11: 00000000004a151c R12: ffff880119b25400
[ 6012.895884] R13: 00000577fc7da325 R14: ffffffff81a37698 R15: 0000000000000000
[ 6012.895885]  ? cpuidle_enter_state+0xfc/0x168
[ 6012.895887]  do_idle+0xdc/0x12f
[ 6012.895889]  cpu_startup_entry+0x18/0x1a
[ 6012.895890]  secondary_startup_64+0xa5/0xb0
[ 6012.895891] Code: 3d 7b 44 73 00 00 75 35 4c 89 e7 c6 05 6f 44 73 00 01 e8 cd 4a fe ff 89 e9 4c 89 e6 48 c7 c7 30 11 8f 81 48 89 c2 e8 63 ac d1 ff <0f> 0b eb 0e ff c5 48 05 40 01 00 00 39 cd 75 99 eb 13 48 8b 83 
[ 6012.895908] ---[ end trace 3d40c0325b051656 ]---
[ 6012.895917] e1000e 0000:00:19.0 eth2: Reset adapter unexpectedly
[ 6016.266832] e1000e: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

^ permalink raw reply

* RE: [PATCH] net: phy: realtek: Add dummy stubs for MMD register access for rtl8211b
From: Claudiu Manoil @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Andrew Lunn, Kevin Hao; +Cc: netdev@vger.kernel.org, Florian Fainelli
In-Reply-To: <20180319123939.GC19795@lunn.ch>

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Monday, March 19, 2018 2:40 PM
> To: Kevin Hao <haokexin@gmail.com>
> Cc: netdev@vger.kernel.org; Florian Fainelli <f.fainelli@gmail.com>; Claudiu
> Manoil <claudiu.manoil@nxp.com>
> Subject: Re: [PATCH] net: phy: realtek: Add dummy stubs for MMD register
> access for rtl8211b
> 
> On Mon, Mar 19, 2018 at 08:05:47PM +0800, Kevin Hao wrote:
> > The Ethernet on mpc8315erdb is broken since commit b6b5e8a69118
> > ("gianfar: Disable EEE autoneg by default"). The reason is that even
> > though the rtl8211b doesn't support the MMD extended registers access,
> > it does return some random values if we trying to access the MMD
> > register via indirect method. This makes it seem that the EEE is
> > supported by this phy device. And the subsequent writing to the MMD
> > registers does cause the phy malfunction. So add dummy stubs for the
> > MMD register access to fix this issue.
> 
> Hi Kevin
> 
> The Micrel PHY has the same problem. Please add generic
> genphy_read_mmd_unsupported() and
> genphy_write_mmd_unsupported() to phy_device.c, and use them from
> both the Micrel and Realtek PHY drivers.
> 
> Also, a return value of -EOPNOTSUPP is more appropriate.
> 

This gianfar patch should have been a temporary workaround.
Obviously, the driver of an (old) eth controller that does not support EEE should
not be modified to have the same eth controller work normally when some new EEE
capable phy happens to be attached to that controller (i.e. on a new board).
It should be up to the phy integration layer to identify that the controller and the phy
are not EEE compatible, and restrict the phy from entering EEE mode. (without any
change to the eth driver)

Claudiu

^ permalink raw reply

* [PATCH] bnx2x: fix spelling mistake: "registeration" -> "registration"
From: Colin King @ 2018-03-19 14:32 UTC (permalink / raw)
  To: Ariel Elior, everest-linux-l2, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Trivial fix to spelling mistake in BNX2X_ERR error message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 74fc9af4aadb..b8388e93520a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -13913,7 +13913,7 @@ static void bnx2x_register_phc(struct bnx2x *bp)
 	bp->ptp_clock = ptp_clock_register(&bp->ptp_clock_info, &bp->pdev->dev);
 	if (IS_ERR(bp->ptp_clock)) {
 		bp->ptp_clock = NULL;
-		BNX2X_ERR("PTP clock registeration failed\n");
+		BNX2X_ERR("PTP clock registration failed\n");
 	}
 }
 
-- 
2.15.1

^ permalink raw reply related

* Re: [RFC PATCH 2/3] x86/io: implement 256-bit IO read and write
From: Thomas Gleixner @ 2018-03-19 14:43 UTC (permalink / raw)
  To: Rahul Lakkireddy
  Cc: x86, linux-kernel, netdev, mingo, hpa, davem, akpm, torvalds,
	ganeshgr, nirranjan, indranil
In-Reply-To: <6ec3e7e0c70e85a804933f27bb4275d5363c044b.1521469118.git.rahul.lakkireddy@chelsio.com>

On Mon, 19 Mar 2018, Rahul Lakkireddy wrote:

> Use VMOVDQU AVX CPU instruction when available to do 256-bit
> IO read and write.

That's not what the patch does. See below.

> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>

That Signed-off-by chain is wrong....

> +#ifdef CONFIG_AS_AVX
> +#include <asm/fpu/api.h>
> +
> +static inline u256 __readqq(const volatile void __iomem *addr)
> +{
> +	u256 ret;
> +
> +	kernel_fpu_begin();
> +	asm volatile("vmovdqu %0, %%ymm0" :
> +		     : "m" (*(volatile u256 __force *)addr));
> +	asm volatile("vmovdqu %%ymm0, %0" : "=m" (ret));
> +	kernel_fpu_end();
> +	return ret;

You _cannot_ assume that the instruction is available just because
CONFIG_AS_AVX is set. The availability is determined by the runtime
evaluated CPU feature flags, i.e. X86_FEATURE_AVX.

Aside of that I very much doubt that this is faster than 4 consecutive
64bit reads/writes as you have the full overhead of
kernel_fpu_begin()/end() for each access.

You did not provide any numbers for this so its even harder to
determine.

As far as I can tell the code where you are using this is a debug
facility. What's the point? Debug is hardly a performance critical problem.

Thanks,

	tglx

^ permalink raw reply

* RE: [RFC PATCH 0/3] kernel: add support for 256-bit IO access
From: David Laight @ 2018-03-19 14:53 UTC (permalink / raw)
  To: 'Rahul Lakkireddy', x86@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
  Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	davem@davemloft.net, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, ganeshgr@chelsio.com,
	nirranjan@chelsio.com, indranil@chelsio.com
In-Reply-To: <cover.1521469118.git.rahul.lakkireddy@chelsio.com>

From: Rahul Lakkireddy
> Sent: 19 March 2018 14:21
> 
> This series of patches add support for 256-bit IO read and write.
> The APIs are readqq and writeqq (quad quadword - 4 x 64), that read
> and write 256-bits at a time from IO, respectively.

Why not use the AVX2 registers to get 512bit accesses.

> Patch 1 adds u256 type and adds necessary non-atomic accessors.  Also
> adds byteorder conversion APIs.
> 
> Patch 2 adds 256-bit read and write to x86 via VMOVDQU AVX CPU
> instructions.
> 
> Patch 3 updates cxgb4 driver to use the readqq API to speed up
> reading on-chip memory 256-bits at a time.

Calling kernel_fpu_begin() is likely to be slow.
I doubt you want to do it every time around a loop of accesses.

In principle it ought to be possible to get access to one or two
(eg) AVX registers by saving them to stack and telling the fpu
save code where you've put them.
Then the IPI fp save code could then copy the saved values over
the current values if asked to save the fp state for a process.
This should be reasonable cheap - especially if there isn't an
fp save IPI.

OTOH, for x86, if the code always runs in process context (eg from a
system call) then, since the ABI defines them all as caller-saved
the AVX(2) registers, it is only necessary to ensure that the current
FPU registers belong to the current process once.
The registers can be set to zero by an 'invalidate' instruction on
system call entry (hope this is done) and after use.

	David

^ permalink raw reply

* [PATCH] qede:  fix spelling mistake: "registeration" -> "registration"
From: Colin King @ 2018-03-19 14:57 UTC (permalink / raw)
  To: Ariel Elior, everest-linux-l2, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Trivial fix to spelling mistakes in DP_ERR error message text and
comments

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++--
 drivers/net/ethernet/qlogic/qede/qede_ptp.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 5c28209e97d0..a01e7d6e5442 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -288,7 +288,7 @@ int __init qede_init(void)
 	}
 
 	/* Must register notifier before pci ops, since we might miss
-	 * interface rename after pci probe and netdev registeration.
+	 * interface rename after pci probe and netdev registration.
 	 */
 	ret = register_netdevice_notifier(&qede_netdev_notifier);
 	if (ret) {
@@ -988,7 +988,7 @@ static int __qede_probe(struct pci_dev *pdev, u32 dp_module, u8 dp_level,
 	if (rc)
 		goto err3;
 
-	/* Prepare the lock prior to the registeration of the netdev,
+	/* Prepare the lock prior to the registration of the netdev,
 	 * as once it's registered we might reach flows requiring it
 	 * [it's even possible to reach a flow needing it directly
 	 * from there, although it's unlikely].
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ptp.c b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
index 9b2280badaf7..02adb513f475 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ptp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
@@ -485,7 +485,7 @@ int qede_ptp_enable(struct qede_dev *edev, bool init_tc)
 	ptp->clock = ptp_clock_register(&ptp->clock_info, &edev->pdev->dev);
 	if (IS_ERR(ptp->clock)) {
 		rc = -EINVAL;
-		DP_ERR(edev, "PTP clock registeration failed\n");
+		DP_ERR(edev, "PTP clock registration failed\n");
 		goto err2;
 	}
 
-- 
2.15.1

^ permalink raw reply related

* RE: [RFC PATCH 0/3] kernel: add support for 256-bit IO access
From: Thomas Gleixner @ 2018-03-19 15:05 UTC (permalink / raw)
  To: David Laight
  Cc: 'Rahul Lakkireddy', x86@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	mingo@redhat.com, hpa@zytor.com, davem@davemloft.net,
	akpm@linux-foundation.org, torvalds@linux-foundation.org,
	ganeshgr@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com
In-Reply-To: <7f0ddb3678814c7bab180714437795e0@AcuMS.aculab.com>

On Mon, 19 Mar 2018, David Laight wrote:
> From: Rahul Lakkireddy
> In principle it ought to be possible to get access to one or two
> (eg) AVX registers by saving them to stack and telling the fpu
> save code where you've put them.

No. We have functions for this and we are not adding new ad hoc magic.

> OTOH, for x86, if the code always runs in process context (eg from a
> system call) then, since the ABI defines them all as caller-saved
> the AVX(2) registers, it is only necessary to ensure that the current
> FPU registers belong to the current process once.
> The registers can be set to zero by an 'invalidate' instruction on
> system call entry (hope this is done) and after use.

Why would a system call touch the FPU registers? The kernel normally does
not use FPU instructions and the code which explicitely does has to take
care of save/restore. It would be performance madness to fiddle with the
FPU stuff unconditionally if nothing uses it.

Thanks,

	tglx

^ permalink raw reply

* get_user_pages returning 0 (was Re: kernel BUG at drivers/vhost/vhost.c:LINE!)
From: Michael S. Tsirkin @ 2018-03-19 15:09 UTC (permalink / raw)
  To: syzbot
  Cc: aarcange, kvm, netdev, syzkaller-bugs, linux-kernel,
	virtualization, linux-mm, David Sterba, Andrew Morton,
	Michel Lespinasse
In-Reply-To: <001a11427716098c150567bcd12f@google.com>

Hello!
The following code triggered by syzbot 

        r = get_user_pages_fast(log, 1, 1, &page);
        if (r < 0)
                return r;
        BUG_ON(r != 1);

Just looking at get_user_pages_fast's documentation this seems
impossible - it is supposed to only ever return # of pages
pinned or errno.

However, poking at code, I see at least one path that might cause this:

                        ret = faultin_page(tsk, vma, start, &foll_flags,
                                        nonblocking);
                        switch (ret) {
                        case 0:
                                goto retry;
                        case -EFAULT:
                        case -ENOMEM:
                        case -EHWPOISON:
                                return i ? i : ret;
                        case -EBUSY:
                                return i;

which originally comes from:

commit 53a7706d5ed8f1a53ba062b318773160cc476dde
Author: Michel Lespinasse <walken@google.com>
Date:   Thu Jan 13 15:46:14 2011 -0800

    mlock: do not hold mmap_sem for extended periods of time
    
    __get_user_pages gets a new 'nonblocking' parameter to signal that the
    caller is prepared to re-acquire mmap_sem and retry the operation if
    needed.  This is used to split off long operations if they are going to
    block on a disk transfer, or when we detect contention on the mmap_sem.
    
    [akpm@linux-foundation.org: remove ref to rwsem_is_contended()]
    Signed-off-by: Michel Lespinasse <walken@google.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Nick Piggin <npiggin@kernel.dk>
    Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: David Howells <dhowells@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

I started looking into this, if anyone has any feedback meanwhile,
that would be appreciated.

In particular I don't really see why would this trigger
on commit 8f5fd927c3a7576d57248a2d7a0861c3f2795973:

Merge: 8757ae2 093e037
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Fri Mar 16 13:37:42 2018 -0700

    Merge tag 'for-4.16-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

is btrfs used on these systems?


syzbot output below:

------------------------

Hello,

syzbot hit the following crash on upstream commit
8f5fd927c3a7576d57248a2d7a0861c3f2795973 (Fri Mar 16 20:37:42 2018 +0000)
Merge tag 'for-4.16-rc5-tag' of
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

So far this crash happened 2 times on upstream.
C reproducer is attached.
syzkaller reproducer is attached.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+6304bf97ef436580fede@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

audit: type=1400 audit(1521377060.016:6): avc:  denied  { map } for
pid=4210 comm="bash" path="/bin/bash" dev="sda1" ino=1457
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1521377077.866:7): avc:  denied  { map } for
pid=4228 comm="syzkaller050160" path="/root/syzkaller050160487" dev="sda1"
ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
------------[ cut here ]------------
kernel BUG at drivers/vhost/vhost.c:1655!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 4228 Comm: syzkaller050160 Not tainted 4.16.0-rc5+ #357
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:set_bit_to_user drivers/vhost/vhost.c:1655 [inline]
RIP: 0010:log_write+0x3ca/0x490 drivers/vhost/vhost.c:1679
RSP: 0018:ffff8801b0fa77b0 EFLAGS: 00010293
RAX: ffff8801af534240 RBX: dffffc0000000000 RCX: ffffffff8443f50a
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8801af535618
RBP: ffff8801b0fa78f0 R08: 0000000000000040 R09: 0000000000000001
R10: ffff8801b0fa76d0 R11: 0000000000000002 R12: 0001ffffffffffff
R13: ffffed00361f4f09 R14: ffff8801b0fa78c8 R15: ffff8801b0fa7848
FS:  00000000007df880(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020d7c000 CR3: 00000001d3e5b005 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 vhost_update_used_flags+0x379/0x480 drivers/vhost/vhost.c:1726
 vhost_vq_init_access+0xca/0x540 drivers/vhost/vhost.c:1766
 vhost_net_set_backend drivers/vhost/net.c:1166 [inline]
 vhost_net_ioctl+0xee0/0x1920 drivers/vhost/net.c:1320
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43ff09
RSP: 002b:00007ffe94d57fc8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043ff09
RDX: 0000000020d7c000 RSI: 000000004008af30 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000207 R12: 0000000000401830
R13: 00000000004018c0 R14: 0000000000000000 R15: 0000000000000000
Code: 5e 41 5f 5d c3 31 c0 eb a6 e8 b3 22 2d fd 4c 89 ef e8 5b bb 4d fd 4c
89 f8 48 c1 e8 03 c6 04 18 f8 e9 3a ff ff ff e8 96 22 2d fd <0f> 0b e8 8f 22
2d fd 4d 8d 6c 24 ff e9 89 fe ff ff e8 80 22 2d
RIP: set_bit_to_user drivers/vhost/vhost.c:1655 [inline] RSP:
ffff8801b0fa77b0
RIP: log_write+0x3ca/0x490 drivers/vhost/vhost.c:1679 RSP: ffff8801b0fa77b0
---[ end trace 867ce9e35847b153 ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..



[....] Starting enhanced syslogd: rsyslogd[   15.400171] audit: type=1400 audit(1521377057.354:5): avc:  denied  { syslog } for  pid=4071 comm="rsyslogd" capability=34  scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1
^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.
Starting mcstransd: 
[....] Starting periodic command scheduler: cron^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.
[....] Starting OpenBSD Secure Shell server: sshd^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.
[....] Starting file context maintaining daemon: restorecond^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.

Debian GNU/Linux 7 syzkaller ttyS0

syzkaller login: [   18.063012] audit: type=1400 audit(1521377060.016:6): avc:  denied  { map } for  pid=4210 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
Warning: Permanently added '10.128.0.48' (ECDSA) to the list of known hosts.
executing program
[   35.912387] audit: type=1400 audit(1521377077.866:7): avc:  denied  { map } for  pid=4228 comm="syzkaller050160" path="/root/syzkaller050160487" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
[   35.918516] ------------[ cut here ]------------
[   35.943043] kernel BUG at drivers/vhost/vhost.c:1655!
[   35.948327] invalid opcode: 0000 [#1] SMP KASAN
[   35.952967] Dumping ftrace buffer:
[   35.956472]    (ftrace buffer empty)
[   35.960152] Modules linked in:
[   35.963316] CPU: 1 PID: 4228 Comm: syzkaller050160 Not tainted 4.16.0-rc5+ #357
[   35.970729] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
[   35.980057] RIP: 0010:log_write+0x3ca/0x490
[   35.984344] RSP: 0018:ffff8801b0fa77b0 EFLAGS: 00010293
[   35.989677] RAX: ffff8801af534240 RBX: dffffc0000000000 RCX: ffffffff8443f50a
[   35.996918] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8801af535618
[   36.004155] RBP: ffff8801b0fa78f0 R08: 0000000000000040 R09: 0000000000000001
[   36.011392] R10: ffff8801b0fa76d0 R11: 0000000000000002 R12: 0001ffffffffffff
[   36.018632] R13: ffffed00361f4f09 R14: ffff8801b0fa78c8 R15: ffff8801b0fa7848
[   36.025871] FS:  00000000007df880(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
[   36.034065] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   36.039915] CR2: 0000000020d7c000 CR3: 00000001d3e5b005 CR4: 00000000001606e0
[   36.047156] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   36.054393] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   36.061631] Call Trace:
[   36.064192]  ? copy_overflow+0x30/0x30
[   36.068047]  ? translate_desc+0x2bd/0x590
[   36.072170]  vhost_update_used_flags+0x379/0x480
[   36.076895]  vhost_vq_init_access+0xca/0x540
[   36.081276]  vhost_net_ioctl+0xee0/0x1920
[   36.085397]  ? vhost_net_stop_vq+0xf0/0xf0
[   36.089603]  ? avc_ss_reset+0x110/0x110
[   36.093547]  ? __handle_mm_fault+0x5ba/0x38c0
[   36.098012]  ? __pmd_alloc+0x4e0/0x4e0
[   36.101869]  ? trace_hardirqs_off+0x10/0x10
[   36.106161]  ? __fd_install+0x25f/0x740
[   36.110106]  ? find_held_lock+0x35/0x1d0
[   36.114145]  ? check_same_owner+0x320/0x320
[   36.118438]  ? rcu_note_context_switch+0x710/0x710
[   36.123334]  ? __do_page_fault+0x5f7/0xc90
[   36.127540]  ? vhost_net_stop_vq+0xf0/0xf0
[   36.131742]  do_vfs_ioctl+0x1b1/0x1520
[   36.135601]  ? ioctl_preallocate+0x2b0/0x2b0
[   36.139979]  ? selinux_capable+0x40/0x40
[   36.144009]  ? up_read+0x1a/0x40
[   36.147349]  ? security_file_ioctl+0x7d/0xb0
[   36.151727]  ? security_file_ioctl+0x89/0xb0
[   36.156104]  SyS_ioctl+0x8f/0xc0
[   36.159436]  ? do_vfs_ioctl+0x1520/0x1520
[   36.163557]  do_syscall_64+0x281/0x940
[   36.167412]  ? __do_page_fault+0xc90/0xc90
[   36.171615]  ? trace_hardirqs_on_thunk+0x1a/0x1c
[   36.176338]  ? syscall_return_slowpath+0x550/0x550
[   36.181233]  ? syscall_return_slowpath+0x2ac/0x550
[   36.186128]  ? prepare_exit_to_usermode+0x350/0x350
[   36.191113]  ? retint_user+0x18/0x18
[   36.194799]  ? trace_hardirqs_off_thunk+0x1a/0x1c
[   36.199613]  entry_SYSCALL_64_after_hwframe+0x42/0xb7
[   36.204772] RIP: 0033:0x43ff09
[   36.207934] RSP: 002b:00007ffe94d57fc8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010
[   36.215608] RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043ff09
[   36.222847] RDX: 0000000020d7c000 RSI: 000000004008af30 RDI: 0000000000000003
[   36.230085] RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
[   36.237324] R10: 00000000004002c8 R11: 0000000000000207 R12: 0000000000401830
[   36.244563] R13: 00000000004018c0 R14: 0000000000000000 R15: 0000000000000000
[   36.251810] Code: 5e 41 5f 5d c3 31 c0 eb a6 e8 b3 22 2d fd 4c 89 ef e8 5b bb 4d fd 4c 89 f8 48 c1 e8 03 c6 04 18 f8 e9 3a ff ff ff e8 96 22 2d fd <0f> 0b e8 8f 22 2d fd 4d 8d 6c 24 ff e9 89 fe ff ff e8 80 22 2d 
[   36.270877] RIP: log_write+0x3ca/0x490 RSP: ffff8801b0fa77b0
[   36.276691] ---[ end trace 867ce9e35847b153 ]---
[   36.281425] Kernel panic - not syncing: Fatal exception
[   36.287129] Dumping ftrace buffer:
[   36.290635]    (ftrace buffer empty)
[   36.294312] Kernel Offset: disabled
[   36.297909] Rebooting in 86400 seconds..

# See https://goo.gl/kgGztJ for information about syzkaller reproducers.
#{Threaded:false Collide:false Repeat:false Procs:1 Sandbox: Fault:false FaultCall:-1 FaultNth:0 EnableTun:false UseTmpDir:false HandleSegv:false WaitRepeat:false Debug:false Repro:false}
r0 = openat$vnet(0xffffffffffffff9c, &(0x7f00002ac000)='/dev/vhost-net\x00', 0x2, 0x0)
ioctl$int_in(r0, 0x40000000af01, &(0x7f0000000040))
r1 = openat$audio(0xffffffffffffff9c, &(0x7f0000000180)='/dev/audio\x00', 0x0, 0x0)
close(r1)
socket$packet(0x11, 0x3, 0x300)
ioctl$VHOST_SET_VRING_ADDR(r0, 0x4028af11, &(0x7f0000000500)={0x0, 0x1, &(0x7f0000000740)=""/142, &(0x7f00000003c0)=""/69, &(0x7f0000000140)=""/14, 0xfffffffffffffffc})
ioctl$VHOST_SET_FEATURES(r0, 0x4008af00, &(0x7f0000000640)=0x200000000)
write$vnet(r0, &(0x7f0000000580)={0x1, {&(0x7f00000001c0)=""/219, 0x34c, &(0x7f0000000480)=""/98, 0xffffffffffffffff, 0x2}}, 0x68)
ioctl$VHOST_NET_SET_BACKEND(r0, 0x4008af30, &(0x7f0000d7c000)={0x0, r1})

// autogenerated by syzkaller (http://github.com/google/syzkaller)

#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>

uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff};
void loop()
{
  long res;
  memcpy((void*)0x202ac000, "/dev/vhost-net", 15);
  res = syscall(__NR_openat, 0xffffffffffffff9c, 0x202ac000, 2, 0);
  if (res != -1)
    r[0] = res;
  *(uint64_t*)0x20000040 = 0;
  syscall(__NR_ioctl, r[0], 0x40000000af01, 0x20000040);
  memcpy((void*)0x20000180, "/dev/audio", 11);
  res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000180, 0, 0);
  if (res != -1)
    r[1] = res;
  syscall(__NR_close, r[1]);
  syscall(__NR_socket, 0x11, 3, 0x300);
  *(uint32_t*)0x20000500 = 0;
  *(uint32_t*)0x20000504 = 1;
  *(uint64_t*)0x20000508 = 0x20000740;
  *(uint64_t*)0x20000510 = 0x200003c0;
  *(uint64_t*)0x20000518 = 0x20000140;
  *(uint64_t*)0x20000520 = 0xfffffffffffffffc;
  syscall(__NR_ioctl, r[0], 0x4028af11, 0x20000500);
  *(uint64_t*)0x20000640 = 0x200000000;
  syscall(__NR_ioctl, r[0], 0x4008af00, 0x20000640);
  *(uint32_t*)0x20000580 = 1;
  *(uint64_t*)0x20000588 = 0x200001c0;
  *(uint64_t*)0x20000590 = 0x34c;
  *(uint64_t*)0x20000598 = 0x20000480;
  *(uint8_t*)0x200005a0 = -1;
  *(uint8_t*)0x200005a1 = 2;
  *(uint64_t*)0x200005a8 = 0;
  *(uint64_t*)0x200005b0 = 0;
  *(uint64_t*)0x200005b8 = 0;
  *(uint64_t*)0x200005c0 = 0;
  *(uint64_t*)0x200005c8 = 0;
  *(uint64_t*)0x200005d0 = 0;
  *(uint64_t*)0x200005d8 = 0;
  *(uint64_t*)0x200005e0 = 0;
  syscall(__NR_write, r[0], 0x20000580, 0x68);
  *(uint32_t*)0x20d7c000 = 0;
  *(uint32_t*)0x20d7c004 = r[1];
  syscall(__NR_ioctl, r[0], 0x4008af30, 0x20d7c000);
}

int main()
{
  syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
  loop();
  return 0;
}

#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.16.0-rc5 Kernel Configuration
#
.. skipped ...

---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzkaller@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.

^ permalink raw reply

* [PATCH net v2 0/7] fix idr leak in actions
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev

This series fixes situations where a temporary failure to install a TC
action results in the permanent impossibility to reuse the configured
value of 'index'.

Thanks to Cong Wang for the initial review.

v2: fix build error in act_ipt.c, reported by kbuild test robot

Davide Caratti (7):
  net/sched: fix idr leak on the error path of tcf_bpf_init()
  net/sched: fix idr leak in the error path of tcf_simp_init()
  net/sched: fix idr leak in the error path of tcf_act_police_init()
  net/sched: fix idr leak in the error path of tcp_pedit_init()
  net/sched: fix idr leak in the error path of __tcf_ipt_init()
  net/sched: fix idr leak in the error path of tcf_vlan_init()
  net/sched: fix idr leak in the error path of tcf_skbmod_init()

 net/sched/act_bpf.c    | 2 +-
 net/sched/act_ipt.c    | 9 ++++++---
 net/sched/act_pedit.c  | 2 +-
 net/sched/act_police.c | 2 +-
 net/sched/act_simple.c | 2 +-
 net/sched/act_skbmod.c | 2 +-
 net/sched/act_vlan.c   | 2 +-
 7 files changed, 12 insertions(+), 9 deletions(-)

-- 
2.14.3

^ permalink raw reply

* [PATCH net v2 1/7] net/sched: fix idr leak on the error path of tcf_bpf_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

when the following command sequence is entered

 # tc action add action bpf bytecode '4,40 0 0 12,31 0 1 2048,6 0 0 262144,6 0 0 0' index 100
 RTNETLINK answers: Invalid argument
 We have an error talking to the kernel
 # tc action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel

act_bpf correctly refuses to install the first TC rule, because 31 is not
a valid instruction. However, it refuses to install the second TC rule,
even if the BPF code is correct. Furthermore, it's no more possible to
install any other rule having the same value of 'index' until act_bpf
module is unloaded/inserted again. After the idr has been reserved, call
tcf_idr_release() instead of tcf_idr_cleanup(), to fix this issue.

Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index b3f2c15affa7..9d2cabf1dc7e 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -352,7 +352,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
 	return res;
 out:
 	if (res == ACT_P_CREATED)
-		tcf_idr_cleanup(*act, est);
+		tcf_idr_release(*act, bind);
 
 	return ret;
 }
-- 
2.14.3

^ permalink raw reply related

* [PATCH net v2 2/7] net/sched: fix idr leak in the error path of tcf_simp_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

if the kernel fails to duplicate 'sdata', creation of a new action fails
with -ENOMEM. However, subsequent attempts to install the same action
using the same value of 'index' systematically fail with -ENOSPC, and
that value of 'index' will no more be usable by act_simple, until rmmod /
insmod of act_simple.ko is done:

 # tc actions add action simple sdata hello index 100
 # tc actions list action simple

        action order 0: Simple <hello>
         index 100 ref 1 bind 0
 # tc actions flush action simple
 # tc actions add action simple sdata hello index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc actions flush action simple
 # tc actions add action simple sdata hello index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 # tc actions add action simple sdata hello index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 ...

Fix this in the error path of tcf_simp_init(), calling tcf_idr_release()
in place of tcf_idr_cleanup().

Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Suggested-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 425eac11f6da..b1f38063ada0 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -121,7 +121,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,
 		d = to_defact(*a);
 		ret = alloc_defdata(d, defdata);
 		if (ret < 0) {
-			tcf_idr_cleanup(*a, est);
+			tcf_idr_release(*a, bind);
 			return ret;
 		}
 		d->tcf_action = parm->action;
-- 
2.14.3

^ permalink raw reply related

* [PATCH net v2 3/7] net/sched: fix idr leak in the error path of tcf_act_police_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

tcf_act_police_init() can fail after the idr has been successfully
reserved (e.g., qdisc_get_rtab() may return NULL). When this happens,
subsequent attempts to configure a police rule using the same idr value
systematiclly fail with -ENOSPC:

 # tc action add action police rate 1000 burst 1000 drop index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc action add action police rate 1000 burst 1000 drop index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 # tc action add action police rate 1000 burst 1000 drop index 100
 RTNETLINK answers: No space left on device
 ...

Fix this in the error path of tcf_act_police_init(), calling
tcf_idr_release() in place of tcf_idr_cleanup().

Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_police.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 95d3c9097b25..faebf82b99f1 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -194,7 +194,7 @@ static int tcf_act_police_init(struct net *net, struct nlattr *nla,
 	qdisc_put_rtab(P_tab);
 	qdisc_put_rtab(R_tab);
 	if (ret == ACT_P_CREATED)
-		tcf_idr_cleanup(*a, est);
+		tcf_idr_release(*a, bind);
 	return err;
 }
 
-- 
2.14.3

^ permalink raw reply related

* [PATCH net v2 4/7] net/sched: fix idr leak in the error path of tcp_pedit_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

tcf_pedit_init() can fail to allocate 'keys' after the idr has been
successfully reserved. When this happens, subsequent attempts to configure
a pedit rule using the same idr value systematically fail with -ENOSPC:

 # tc action add action pedit munge ip ttl set 63 index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc action add action pedit munge ip ttl set 63 index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 # tc action add action pedit munge ip ttl set 63 index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 ...

Fix this in the error path of tcf_act_pedit_init(), calling
tcf_idr_release() in place of tcf_idr_cleanup().

Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_pedit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 349beaffb29e..fef08835f26d 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -176,7 +176,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
 		p = to_pedit(*a);
 		keys = kmalloc(ksize, GFP_KERNEL);
 		if (keys == NULL) {
-			tcf_idr_cleanup(*a, est);
+			tcf_idr_release(*a, bind);
 			kfree(keys_ex);
 			return -ENOMEM;
 		}
-- 
2.14.3

^ permalink raw reply related

* [PATCH net v2 5/7] net/sched: fix idr leak in the error path of __tcf_ipt_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

__tcf_ipt_init() can fail after the idr has been successfully reserved.
When this happens, subsequent attempts to configure xt/ipt rules using
the same idr value systematically fail with -ENOSPC:

 # tc action add action xt -j LOG --log-prefix test1 index 100
 tablename: mangle hook: NF_IP_POST_ROUTING
         target:  LOG level warning prefix "test1" index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 Command "(null)" is unknown, try "tc actions help".
 # tc action add action xt -j LOG --log-prefix test1 index 100
 tablename: mangle hook: NF_IP_POST_ROUTING
         target:  LOG level warning prefix "test1" index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 Command "(null)" is unknown, try "tc actions help".
 # tc action add action xt -j LOG --log-prefix test1 index 100
 tablename: mangle hook: NF_IP_POST_ROUTING
         target:  LOG level warning prefix "test1" index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 ...

Fix this in the error path of __tcf_ipt_init(), calling tcf_idr_release()
in place of tcf_idr_cleanup(). Since tcf_ipt_release() can now be called
when tcfi_t is NULL, we also need to protect calls to ipt_destroy_target()
to avoid NULL pointer dereference.

Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_ipt.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 06e380ae0928..7e06b9b62613 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -80,9 +80,12 @@ static void ipt_destroy_target(struct xt_entry_target *t)
 static void tcf_ipt_release(struct tc_action *a)
 {
 	struct tcf_ipt *ipt = to_ipt(a);
-	ipt_destroy_target(ipt->tcfi_t);
+
+	if (ipt->tcfi_t) {
+		ipt_destroy_target(ipt->tcfi_t);
+		kfree(ipt->tcfi_t);
+	}
 	kfree(ipt->tcfi_tname);
-	kfree(ipt->tcfi_t);
 }
 
 static const struct nla_policy ipt_policy[TCA_IPT_MAX + 1] = {
@@ -187,7 +190,7 @@ static int __tcf_ipt_init(struct net *net, unsigned int id, struct nlattr *nla,
 	kfree(tname);
 err1:
 	if (ret == ACT_P_CREATED)
-		tcf_idr_cleanup(*a, est);
+		tcf_idr_release(*a, bind);
 	return err;
 }
 
-- 
2.14.3

^ permalink raw reply related

* [PATCH net v2 6/7] net/sched: fix idr leak in the error path of tcf_vlan_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

tcf_vlan_init() can fail after the idr has been successfully reserved.
When this happens, every subsequent attempt to configure vlan rules using
the same idr value will systematically fail with -ENOSPC, unless the first
attempt was done using the 'replace' keyword.

 # tc action add action vlan pop index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc action add action vlan pop index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 # tc action add action vlan pop index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 ...

Fix this in tcf_vlan_init(), ensuring that tcf_idr_release() is called on
the error path when the idr has been reserved, but not yet inserted. Also,
don't test 'ovr' in the error path, to avoid a 'replace' failure implicitly
become a 'delete' that leaks refcount in act_vlan module:

 # rmmod act_vlan; modprobe act_vlan
 # tc action add action vlan push id 5 index 100
 # tc action replace action vlan push id 7 index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc action list action vlan
 #
 # rmmod act_vlan
 rmmod: ERROR: Module act_vlan is in use

Fixes: 4c5b9d9642c8 ("act_vlan: VLAN action rewrite to use RCU lock/unlock and update")
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_vlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index c2914e9a4a6f..c49cb61adedf 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -195,7 +195,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla,
 	ASSERT_RTNL();
 	p = kzalloc(sizeof(*p), GFP_KERNEL);
 	if (!p) {
-		if (ovr)
+		if (ret == ACT_P_CREATED)
 			tcf_idr_release(*a, bind);
 		return -ENOMEM;
 	}
-- 
2.14.3

^ permalink raw reply related

* [PATCH net v2 7/7] net/sched: fix idr leak in the error path of tcf_skbmod_init()
From: Davide Caratti @ 2018-03-19 14:31 UTC (permalink / raw)
  To: Cong Wang, Jiri Pirko, Jamal Hadi Salim, David S. Miller; +Cc: netdev
In-Reply-To: <cover.1521465261.git.dcaratti@redhat.com>

tcf_skbmod_init() can fail after the idr has been successfully reserved.
When this happens, every subsequent attempt to configure skbmod rules
using the same idr value will systematically fail with -ENOSPC, unless
the first attempt was done using the 'replace' keyword:

 # tc action add action skbmod swap mac index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc action add action skbmod swap mac index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 # tc action add action skbmod swap mac index 100
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel
 ...

Fix this in tcf_skbmod_init(), ensuring that tcf_idr_release() is called
on the error path when the idr has been reserved, but not yet inserted.
Also, don't test 'ovr' in the error path, to avoid a 'replace' failure
implicitly become a 'delete' that leaks refcount in act_skbmod module:

 # rmmod act_skbmod; modprobe act_skbmod
 # tc action add action skbmod swap mac index 100
 # tc action add action skbmod swap mac continue index 100
 RTNETLINK answers: File exists
 We have an error talking to the kernel
 # tc action replace action skbmod swap mac continue index 100
 RTNETLINK answers: Cannot allocate memory
 We have an error talking to the kernel
 # tc action list action skbmod
 #
 # rmmod  act_skbmod
 rmmod: ERROR: Module act_skbmod is in use

Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 net/sched/act_skbmod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index d09565d6433e..7b0700f52b50 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched/act_skbmod.c
@@ -152,7 +152,7 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla,
 	ASSERT_RTNL();
 	p = kzalloc(sizeof(struct tcf_skbmod_params), GFP_KERNEL);
 	if (unlikely(!p)) {
-		if (ovr)
+		if (ret == ACT_P_CREATED)
 			tcf_idr_release(*a, bind);
 		return -ENOMEM;
 	}
-- 
2.14.3

^ permalink raw reply related

* Re: [PATCH net-next] rds: tcp: remove register_netdevice_notifier infrastructure.
From: Kirill Tkhai @ 2018-03-19 15:13 UTC (permalink / raw)
  To: Sowmini Varadhan, netdev; +Cc: davem, santosh.shilimkar
In-Reply-To: <1521467568-37876-1-git-send-email-sowmini.varadhan@oracle.com>

On 19.03.2018 16:52, Sowmini Varadhan wrote:
> The netns deletion path does not need to wait for all net_devices
> to be unregistered before dismantling rds_tcp state for the netns
> (we are able to dismantle this state on module unload even when
> all net_devices are active so there is no dependency here).
> 
> This patch removes code related to netdevice notifiers and
> refactors all the code needed to dismantle rds_tcp state
> into a ->exit callback for the pernet_operations used with
> register_pernet_device().
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

I just repeat my words:
rds_tcp_listen_sock destruction looks nice and safe, since all
the places the sockets is dereferenced use sk_callback_lock.
So they don't miss rds_tcp_listen_sock = NULL, as rds_tcp_listen_stop()
takes the lock too.

rds_tcp_conn_list is populated from:

1)rds_tcp_accept_one(), which can't happen after we flushed the queue
in rds_tcp_listen_stop();

2)rds_sendmsg(), which is triggered by userspace, and that's impossible,
when net is dead;

3)rds_ib_cm_handle_connect(), which call rds_conn_create() with init_net
argument only. This may race with module unloading only, but this problem
is already solved in RDS by rds_destroy_pending() check, which care about
that.

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>

(The only thing I don't know is the reason we need to destroy the sockets
 before last netdevice, but I haven't dived into that. Just to mention this...).

Thanks, Sowmini.

Kirill

> ---
>  net/rds/tcp.c |   93 ++++++++++++++-------------------------------------------
>  1 files changed, 23 insertions(+), 70 deletions(-)
> 
> diff --git a/net/rds/tcp.c b/net/rds/tcp.c
> index 08ea9cd..4f3a32c 100644
> --- a/net/rds/tcp.c
> +++ b/net/rds/tcp.c
> @@ -485,40 +485,6 @@ static __net_init int rds_tcp_init_net(struct net *net)
>  	return err;
>  }
>  
> -static void __net_exit rds_tcp_exit_net(struct net *net)
> -{
> -	struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
> -
> -	if (rtn->rds_tcp_sysctl)
> -		unregister_net_sysctl_table(rtn->rds_tcp_sysctl);
> -
> -	if (net != &init_net && rtn->ctl_table)
> -		kfree(rtn->ctl_table);
> -
> -	/* If rds_tcp_exit_net() is called as a result of netns deletion,
> -	 * the rds_tcp_kill_sock() device notifier would already have cleaned
> -	 * up the listen socket, thus there is no work to do in this function.
> -	 *
> -	 * If rds_tcp_exit_net() is called as a result of module unload,
> -	 * i.e., due to rds_tcp_exit() -> unregister_pernet_subsys(), then
> -	 * we do need to clean up the listen socket here.
> -	 */
> -	if (rtn->rds_tcp_listen_sock) {
> -		struct socket *lsock = rtn->rds_tcp_listen_sock;
> -
> -		rtn->rds_tcp_listen_sock = NULL;
> -		rds_tcp_listen_stop(lsock, &rtn->rds_tcp_accept_w);
> -	}
> -}
> -
> -static struct pernet_operations rds_tcp_net_ops = {
> -	.init = rds_tcp_init_net,
> -	.exit = rds_tcp_exit_net,
> -	.id = &rds_tcp_netid,
> -	.size = sizeof(struct rds_tcp_net),
> -	.async = true,
> -};
> -
>  static void rds_tcp_kill_sock(struct net *net)
>  {
>  	struct rds_tcp_connection *tc, *_tc;
> @@ -546,40 +512,38 @@ static void rds_tcp_kill_sock(struct net *net)
>  		rds_conn_destroy(tc->t_cpath->cp_conn);
>  }
>  
> -void *rds_tcp_listen_sock_def_readable(struct net *net)
> +static void __net_exit rds_tcp_exit_net(struct net *net)
>  {
>  	struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
> -	struct socket *lsock = rtn->rds_tcp_listen_sock;
>  
> -	if (!lsock)
> -		return NULL;
> +	rds_tcp_kill_sock(net);
>  
> -	return lsock->sk->sk_user_data;
> +	if (rtn->rds_tcp_sysctl)
> +		unregister_net_sysctl_table(rtn->rds_tcp_sysctl);
> +
> +	if (net != &init_net && rtn->ctl_table)
> +		kfree(rtn->ctl_table);
>  }
>  
> -static int rds_tcp_dev_event(struct notifier_block *this,
> -			     unsigned long event, void *ptr)
> +static struct pernet_operations rds_tcp_net_ops = {
> +	.init = rds_tcp_init_net,
> +	.exit = rds_tcp_exit_net,
> +	.id = &rds_tcp_netid,
> +	.size = sizeof(struct rds_tcp_net),
> +	.async = true,
> +};
> +
> +void *rds_tcp_listen_sock_def_readable(struct net *net)
>  {
> -	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
> +	struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
> +	struct socket *lsock = rtn->rds_tcp_listen_sock;
>  
> -	/* rds-tcp registers as a pernet subys, so the ->exit will only
> -	 * get invoked after network acitivity has quiesced. We need to
> -	 * clean up all sockets  to quiesce network activity, and use
> -	 * the unregistration of the per-net loopback device as a trigger
> -	 * to start that cleanup.
> -	 */
> -	if (event == NETDEV_UNREGISTER_FINAL &&
> -	    dev->ifindex == LOOPBACK_IFINDEX)
> -		rds_tcp_kill_sock(dev_net(dev));
> +	if (!lsock)
> +		return NULL;
>  
> -	return NOTIFY_DONE;
> +	return lsock->sk->sk_user_data;
>  }
>  
> -static struct notifier_block rds_tcp_dev_notifier = {
> -	.notifier_call        = rds_tcp_dev_event,
> -	.priority = -10, /* must be called after other network notifiers */
> -};
> -
>  /* when sysctl is used to modify some kernel socket parameters,this
>   * function  resets the RDS connections in that netns  so that we can
>   * restart with new parameters.  The assumption is that such reset
> @@ -625,9 +589,7 @@ static void rds_tcp_exit(void)
>  	rds_tcp_set_unloading();
>  	synchronize_rcu();
>  	rds_info_deregister_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
> -	unregister_pernet_subsys(&rds_tcp_net_ops);
> -	if (unregister_netdevice_notifier(&rds_tcp_dev_notifier))
> -		pr_warn("could not unregister rds_tcp_dev_notifier\n");
> +	unregister_pernet_device(&rds_tcp_net_ops);
>  	rds_tcp_destroy_conns();
>  	rds_trans_unregister(&rds_tcp_transport);
>  	rds_tcp_recv_exit();
> @@ -651,24 +613,15 @@ static int rds_tcp_init(void)
>  	if (ret)
>  		goto out_slab;
>  
> -	ret = register_pernet_subsys(&rds_tcp_net_ops);
> +	ret = register_pernet_device(&rds_tcp_net_ops);
>  	if (ret)
>  		goto out_recv;
>  
> -	ret = register_netdevice_notifier(&rds_tcp_dev_notifier);
> -	if (ret) {
> -		pr_warn("could not register rds_tcp_dev_notifier\n");
> -		goto out_pernet;
> -	}
> -
>  	rds_trans_register(&rds_tcp_transport);
>  
>  	rds_info_register_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
>  
>  	goto out;
> -
> -out_pernet:
> -	unregister_pernet_subsys(&rds_tcp_net_ops);
>  out_recv:
>  	rds_tcp_recv_exit();
>  out_slab:
> 

^ 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