All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Autoloading for RDMA netlink modules
@ 2017-07-24 22:26 Jason Gunthorpe
       [not found] ` <1500935204-6505-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-24 22:26 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

This provides the necessary infrastructure for the kernel to automatically
load RDMA associated netlink modules when users space sends messages to them.

This is at least enough support for the kernel to autoload everything required
for iwpmd to run.

Jason Gunthorpe (3):
  rdma: Allow demand loading of NETLINK_RDMA
  rdma: Autoload netlink client modules
  iwpmd: Suppress expected kernel message

 drivers/infiniband/core/cma.c     |  2 +
 drivers/infiniband/core/device.c  |  2 +
 drivers/infiniband/core/iwcm.c    |  9 ++++
 drivers/infiniband/core/netlink.c | 99 +++++++++++++++++++++++----------------
 include/rdma/rdma_netlink.h       | 12 +++++
 5 files changed, 83 insertions(+), 41 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/3] rdma: Allow demand loading of NETLINK_RDMA
       [not found] ` <1500935204-6505-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-07-24 22:26   ` Jason Gunthorpe
  2017-07-24 22:26   ` [PATCH 2/3] rdma: Autoload netlink client modules Jason Gunthorpe
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-24 22:26 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

Provide a module alias so that if userspace opens a netlink
socket for RDMA the kernel support is loaded automatically.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 drivers/infiniband/core/netlink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 94931c474d41db..1165fe81d104a3 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -37,6 +37,7 @@
 #include <net/net_namespace.h>
 #include <net/sock.h>
 #include <rdma/rdma_netlink.h>
+#include <linux/module.h>
 #include "core_priv.h"
 
 struct ibnl_client {
@@ -273,3 +274,5 @@ void ibnl_cleanup(void)
 
 	netlink_kernel_release(nls);
 }
+
+MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_RDMA);
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] rdma: Autoload netlink client modules
       [not found] ` <1500935204-6505-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-07-24 22:26   ` [PATCH 1/3] rdma: Allow demand loading of NETLINK_RDMA Jason Gunthorpe
@ 2017-07-24 22:26   ` Jason Gunthorpe
  2017-07-24 22:26   ` [PATCH 3/3] iwpmd: Suppress expected kernel message Jason Gunthorpe
  2017-07-25  6:32   ` [PATCH 0/3] Autoloading for RDMA netlink modules Leon Romanovsky
  3 siblings, 0 replies; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-24 22:26 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

If a message comes in and we do not have the client in the table, then
try to load the module supplying that client using MODULE_ALIAS to find
it.

This duplicates the scheme seen in other netlink muxes (eg nfnetlink).

Factor out ibnl_find_client since this creates a 3rd copy of the pattern.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 drivers/infiniband/core/cma.c     |  2 +
 drivers/infiniband/core/device.c  |  2 +
 drivers/infiniband/core/iwcm.c    |  2 +
 drivers/infiniband/core/netlink.c | 96 ++++++++++++++++++++++-----------------
 include/rdma/rdma_netlink.h       | 12 +++++
 5 files changed, 73 insertions(+), 41 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 0eb393237ba2fc..f63a11e31ec988 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -4534,5 +4534,7 @@ static void __exit cma_cleanup(void)
 	destroy_workqueue(cma_wq);
 }
 
+MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_RDMA_CM, 1);
+
 module_init(cma_init);
 module_exit(cma_cleanup);
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index a5dfab6adf495b..6630b334ae7526 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1204,5 +1204,7 @@ static void __exit ib_core_cleanup(void)
 	destroy_workqueue(ib_wq);
 }
 
+MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4);
+
 module_init(ib_core_init);
 module_exit(ib_core_cleanup);
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 31661b5c174364..51585a8e467a56 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -1204,5 +1204,7 @@ static void __exit iw_cm_cleanup(void)
 	iwpm_exit(RDMA_NL_IWCM);
 }
 
+MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_IWCM, 2);
+
 module_init(iw_cm_init);
 module_exit(iw_cm_cleanup);
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 1165fe81d104a3..36141b9457f0e6 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -51,6 +51,18 @@ static DEFINE_MUTEX(ibnl_mutex);
 static struct sock *nls;
 static LIST_HEAD(client_list);
 
+static struct ibnl_client *ibnl_find_client(int index)
+{
+	struct ibnl_client *client;
+
+	list_for_each_entry_rcu(client, &client_list, list) {
+		if (client->index == index)
+			return client;
+	}
+
+	return NULL;
+}
+
 int ibnl_chk_listeners(unsigned int group)
 {
 	if (netlink_has_listeners(nls, group) == 0)
@@ -61,7 +73,6 @@ int ibnl_chk_listeners(unsigned int group)
 int ibnl_add_client(int index, int nops,
 		    const struct ibnl_client_cbs cb_table[])
 {
-	struct ibnl_client *cur;
 	struct ibnl_client *nl_client;
 
 	nl_client = kmalloc(sizeof *nl_client, GFP_KERNEL);
@@ -73,14 +84,11 @@ int ibnl_add_client(int index, int nops,
 	nl_client->cb_table	= cb_table;
 
 	mutex_lock(&ibnl_mutex);
-
-	list_for_each_entry(cur, &client_list, list) {
-		if (cur->index == index) {
-			pr_warn("Client for %d already exists\n", index);
-			mutex_unlock(&ibnl_mutex);
-			kfree(nl_client);
-			return -EINVAL;
-		}
+	if (ibnl_find_client(index)) {
+		pr_warn("Client for %d already exists\n", index);
+		mutex_unlock(&ibnl_mutex);
+		kfree(nl_client);
+		return -EINVAL;
 	}
 
 	list_add_tail(&nl_client->list, &client_list);
@@ -155,40 +163,46 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
 	int index = RDMA_NL_GET_CLIENT(type);
 	unsigned int op = RDMA_NL_GET_OP(type);
 
-	list_for_each_entry(client, &client_list, list) {
-		if (client->index == index) {
-			if (op >= client->nops || !client->cb_table[op].dump)
-				return -EINVAL;
-
-			/*
-			 * For response or local service set_timeout request,
-			 * there is no need to use netlink_dump_start.
-			 */
-			if (!(nlh->nlmsg_flags & NLM_F_REQUEST) ||
-			    (index == RDMA_NL_LS &&
-			     op == RDMA_NL_LS_OP_SET_TIMEOUT)) {
-				struct netlink_callback cb = {
-					.skb = skb,
-					.nlh = nlh,
-					.dump = client->cb_table[op].dump,
-					.module = client->cb_table[op].module,
-				};
-
-				return cb.dump(skb, &cb);
-			}
-
-			{
-				struct netlink_dump_control c = {
-					.dump = client->cb_table[op].dump,
-					.module = client->cb_table[op].module,
-				};
-				return netlink_dump_start(nls, skb, nlh, &c);
-			}
-		}
+	client = ibnl_find_client(index);
+#ifdef CONFIG_MODULES
+	if (!client) {
+		mutex_unlock(&ibnl_mutex);
+		request_module("rdma_netlink_subsys-%d", index);
+		mutex_lock(&ibnl_mutex);
+		client = ibnl_find_client(index);
+	}
+#endif
+	if (!client) {
+		pr_info("Index %d wasn't found in client list\n", index);
+		return -EINVAL;
 	}
 
-	pr_info("Index %d wasn't found in client list\n", index);
-	return -EINVAL;
+	if (op >= client->nops || !client->cb_table[op].dump)
+		return -EINVAL;
+
+	/*
+	 * For response or local service set_timeout request,
+	 * there is no need to use netlink_dump_start.
+	 */
+	if (!(nlh->nlmsg_flags & NLM_F_REQUEST) ||
+	    (index == RDMA_NL_LS && op == RDMA_NL_LS_OP_SET_TIMEOUT)) {
+		struct netlink_callback cb = {
+		    .skb = skb,
+		    .nlh = nlh,
+		    .dump = client->cb_table[op].dump,
+		    .module = client->cb_table[op].module,
+		};
+
+		return cb.dump(skb, &cb);
+	}
+
+	{
+		struct netlink_dump_control c = {
+		    .dump = client->cb_table[op].dump,
+		    .module = client->cb_table[op].module,
+		};
+		return netlink_dump_start(nls, skb, nlh, &c);
+	}
 }
 
 static void ibnl_rcv_reply_skb(struct sk_buff *skb)
diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h
index 348c102cb5f6af..5b2e813592199a 100644
--- a/include/rdma/rdma_netlink.h
+++ b/include/rdma/rdma_netlink.h
@@ -10,6 +10,18 @@ struct ibnl_client_cbs {
 	struct module *module;
 };
 
+/* Define this module as providing netlinkg services for NETLINK_RDMA, client
+ * index _index.  Since the client indexes were setup in a uapi header as an
+ * enum and we do no want to change that, the user must supply the expanded
+ * constant as well and the compiler checks they are the same.
+ */
+#define MODULE_ALIAS_RDMA_NETLINK(_index, _val)                                \
+	static inline void __chk_##_index(void)                                \
+	{                                                                      \
+		BUILD_BUG_ON(_index != _val);                                  \
+	}                                                                      \
+	MODULE_ALIAS("rdma_netlink_subsys-" __stringify(_val))
+
 /**
  * Add a a client to the list of IB netlink exporters.
  * @index: Index of the added client
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] iwpmd: Suppress expected kernel message
       [not found] ` <1500935204-6505-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-07-24 22:26   ` [PATCH 1/3] rdma: Allow demand loading of NETLINK_RDMA Jason Gunthorpe
  2017-07-24 22:26   ` [PATCH 2/3] rdma: Autoload netlink client modules Jason Gunthorpe
@ 2017-07-24 22:26   ` Jason Gunthorpe
       [not found]     ` <1500935204-6505-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-07-25  6:32   ` [PATCH 0/3] Autoloading for RDMA netlink modules Leon Romanovsky
  3 siblings, 1 reply; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-24 22:26 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

RMDA_NL_RSVD was obsoleted a long time ago, but user space still
uses it to support old kernels. Avoid logging:

 ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 drivers/infiniband/core/iwcm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 51585a8e467a56..16d0c9f9ca4701 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -1181,6 +1181,12 @@ static int __init iw_cm_init(void)
 	if (ret)
 		pr_err("iw_cm: couldn't register netlink callbacks\n");
 
+
+	/* Old iwpmds still use this legacy ID, provide a kernel side for it
+	 * that always returns EINVAL
+	 */
+	ibnl_add_client(RDMA_NL_RSVD, 0, NULL);
+
 	iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", WQ_MEM_RECLAIM);
 	if (!iwcm_wq)
 		return -ENOMEM;
@@ -1200,6 +1206,7 @@ static void __exit iw_cm_cleanup(void)
 {
 	unregister_net_sysctl_table(iwcm_ctl_table_hdr);
 	destroy_workqueue(iwcm_wq);
+	ibnl_remove_client(RDMA_NL_RSVD);
 	ibnl_remove_client(RDMA_NL_IWCM);
 	iwpm_exit(RDMA_NL_IWCM);
 }
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/3] Autoloading for RDMA netlink modules
       [not found] ` <1500935204-6505-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-07-24 22:26   ` [PATCH 3/3] iwpmd: Suppress expected kernel message Jason Gunthorpe
@ 2017-07-25  6:32   ` Leon Romanovsky
       [not found]     ` <20170725063236.GQ3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  3 siblings, 1 reply; 14+ messages in thread
From: Leon Romanovsky @ 2017-07-25  6:32 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

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

On Mon, Jul 24, 2017 at 04:26:41PM -0600, Jason Gunthorpe wrote:
> This provides the necessary infrastructure for the kernel to automatically
> load RDMA associated netlink modules when users space sends messages to them.
>
> This is at least enough support for the kernel to autoload everything required
> for iwpmd to run.
>
> Jason Gunthorpe (3):
>   rdma: Allow demand loading of NETLINK_RDMA
>   rdma: Autoload netlink client modules
>   iwpmd: Suppress expected kernel message
>
>  drivers/infiniband/core/cma.c     |  2 +
>  drivers/infiniband/core/device.c  |  2 +
>  drivers/infiniband/core/iwcm.c    |  9 ++++
>  drivers/infiniband/core/netlink.c | 99 +++++++++++++++++++++++----------------
>  include/rdma/rdma_netlink.h       | 12 +++++
>  5 files changed, 83 insertions(+), 41 deletions(-)

There are number of reasons why I don't really like this series.

First, it interferes badly with my RDMA netlink series posted here in
previous cycle and I'm expecting to see it in, so I can move forward
with RDMAtool implementation.

Second, from brief review, it is unclear to me, how do you protect
autoload caused by regular user who sends netlink message to ib_core.

Third, it is ib_core who should autoload modules by default, and not some
random daemon in user space.

My 2-cents.

>
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] iwpmd: Suppress expected kernel message
       [not found]     ` <1500935204-6505-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-07-25 13:30       ` Leon Romanovsky
       [not found]         ` <20170725133030.GR3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Leon Romanovsky @ 2017-07-25 13:30 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

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

On Mon, Jul 24, 2017 at 04:26:44PM -0600, Jason Gunthorpe wrote:
> RMDA_NL_RSVD was obsoleted a long time ago, but user space still
> uses it to support old kernels. Avoid logging:
>
>  ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  drivers/infiniband/core/iwcm.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>

This print should be removed, on my system (Debian), it prints without
any relation to iwpmd.

Thanks,

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/3] Autoloading for RDMA netlink modules
       [not found]     ` <20170725063236.GQ3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-07-25 14:34       ` Jason Gunthorpe
       [not found]         ` <20170725143420.GA434-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-25 14:34 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

On Tue, Jul 25, 2017 at 09:32:36AM +0300, Leon Romanovsky wrote:

> First, it interferes badly with my RDMA netlink series posted here in
> previous cycle and I'm expecting to see it in, so I can move forward
> with RDMAtool implementation.

I'm sure we can fix a few conflicts...

> Second, from brief review, it is unclear to me, how do you protect
> autoload caused by regular user who sends netlink message to ib_core.

You don't, that isn't how kernel auto loading works. Any user can
attempt to create any kind of socket and the core kernel code will
load the correct module to support that socket. That is the standard
way kernel autoloading works, particularly for net families.

> Third, it is ib_core who should autoload modules by default, and not some
> random daemon in user space.

Kernel autoloading of userspace facing kernel services is always
triggered by a user process attempting to use the service, so this
comment makes no sense to me.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] iwpmd: Suppress expected kernel message
       [not found]         ` <20170725133030.GR3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-07-25 15:36           ` Jason Gunthorpe
       [not found]             ` <20170725153608.GA6715-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-25 15:36 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

On Tue, Jul 25, 2017 at 04:30:30PM +0300, Leon Romanovsky wrote:
> On Mon, Jul 24, 2017 at 04:26:44PM -0600, Jason Gunthorpe wrote:
> > RMDA_NL_RSVD was obsoleted a long time ago, but user space still
> > uses it to support old kernels. Avoid logging:
> >
> >  ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list
> >
> > Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> >  drivers/infiniband/core/iwcm.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> 
> This print should be removed, on my system (Debian), it prints without
> any relation to iwpmd.

Really? What from?

I'm okay with dropping the print too.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/3] Autoloading for RDMA netlink modules
       [not found]         ` <20170725143420.GA434-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-07-25 15:40           ` Jason Gunthorpe
  2017-07-25 18:19           ` Leon Romanovsky
  1 sibling, 0 replies; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-25 15:40 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

On Tue, Jul 25, 2017 at 08:34:20AM -0600, Jason Gunthorpe wrote:

> > Second, from brief review, it is unclear to me, how do you protect
> > autoload caused by regular user who sends netlink message to ib_core.
> 
> You don't, that isn't how kernel auto loading works. Any user can
> attempt to create any kind of socket and the core kernel code will
> load the correct module to support that socket. That is the standard
> way kernel autoloading works, particularly for net families.

I should clarify some more that this is needed to avoid problematic
dependencies during boot up.

For instance, long term, I want to use rdma netlink from within udev
to fill in some more ID_ fields in the database, I cannot resolve the
race conditions with udev running and modules loading unless the
kernel can fully autoload the netlink subystem, just like other
netlink subsystems.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] iwpmd: Suppress expected kernel message
       [not found]             ` <20170725153608.GA6715-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-07-25 18:12               ` Leon Romanovsky
       [not found]                 ` <20170725181254.GS3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Leon Romanovsky @ 2017-07-25 18:12 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford


[-- Attachment #1.1: Type: text/plain, Size: 932 bytes --]

On Tue, Jul 25, 2017 at 09:36:08AM -0600, Jason Gunthorpe wrote:
> On Tue, Jul 25, 2017 at 04:30:30PM +0300, Leon Romanovsky wrote:
> > On Mon, Jul 24, 2017 at 04:26:44PM -0600, Jason Gunthorpe wrote:
> > > RMDA_NL_RSVD was obsoleted a long time ago, but user space still
> > > uses it to support old kernels. Avoid logging:
> > >
> > >  ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list
> > >
> > > Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> > >  drivers/infiniband/core/iwcm.c | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > >
> >
> > This print should be removed, on my system (Debian), it prints without
> > any relation to iwpmd.
>
> Really? What from?

Yes, I constantly delayed the debug of it :)
Debian 9 + latest rdma-core, see attached log.

ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list


>
> I'm okay with dropping the print too.
>
> Jason

[-- Attachment #1.2: dev-l-vrt-151-010.serial --]
[-- Type: text/plain, Size: 19467 bytes --]

random: get_random_bytes called from start_kernel+0x42/0x418 with crng_init=0
Linux version 4.13.0-rc1-00089-g6e4da7d65877 (leonro@dev-l-vrt-151) (gcc version 7.1.1 20170622 (Red Hat 7.1.1-3) (GCC)) #28 SMP Tue Jul 25 17:45:19 IDT 2017
Command line: root=/dev/vda1 ro earlyprintk=serial,ttyS0,11520n8,keep console=tty0 console=ttyS0,11520n8
x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
e820: BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
BIOS-e820: [mem 0x0000000000100000-0x00000000bffd8fff] usable
BIOS-e820: [mem 0x00000000bffd9000-0x00000000bfffffff] reserved
BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable
console [earlyser0] enabled
NX (Execute Disable) protection: active
random: fast init done
SMBIOS 2.8 present.
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014
tsc: Using PIT calibration value
e820: last_pfn = 0x140000 max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
e820: last_pfn = 0xbffd9 max_arch_pfn = 0x400000000
found SMP MP-table at [mem 0x000f6bb0-0x000f6bbf] mapped at [ffff8800000f6bb0]
ACPI: Early table checksum verification disabled
ACPI: RSDP 0x00000000000F6980 000014 (v00 BOCHS )
ACPI: RSDT 0x00000000BFFE14FD 00002C (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
ACPI: FACP 0x00000000BFFE1409 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
ACPI: DSDT 0x00000000BFFE0040 0013C9 (v01 BOCHS  BXPCDSDT 00000001 BXPC 00000001)
ACPI: FACS 0x00000000BFFE0000 000040
ACPI: APIC 0x00000000BFFE147D 000080 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
Zone ranges:
  DMA      [mem 0x0000000000001000-0x0000000000ffffff]
  DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000001000-0x000000000009efff]
  node   0: [mem 0x0000000000100000-0x00000000bffd8fff]
  node   0: [mem 0x0000000100000000-0x000000013fffffff]
Initmem setup node 0 [mem 0x0000000000001000-0x000000013fffffff]
ACPI: PM-Timer IO Port: 0x608
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
Using ACPI (MADT) for SMP configuration information
[Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x22 (or later)
smpboot: Allowing 2 CPUs, 0 hotplug CPUs
e820: [mem 0xc0000000-0xfeffbfff] available for PCI devices
clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
percpu: Embedded 483 pages/cpu @ffff88013b200000 s1938392 r8192 d31784 u2097152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1032034
Kernel command line: root=/dev/vda1 ro earlyprintk=serial,ttyS0,11520n8,keep console=tty0 console=ttyS0,11520n8
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Memory: 4013572K/4193756K available (7543K kernel code, 1206K rwdata, 2632K rodata, 2952K init, 21952K bss, 180184K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
ftrace: allocating 26693 entries in 105 pages
Running RCU self tests
Hierarchical RCU implementation.
	RCU lockdep checking is enabled.
	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 4352, nr_irqs: 440, preallocated irqs: 16
Console: colour VGA+ 80x25
console [tty0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:  8
... MAX_LOCK_DEPTH:          48
... MAX_LOCKDEP_KEYS:        8191
... CLASSHASH_SIZE:          4096
... MAX_LOCKDEP_ENTRIES:     32768
... MAX_LOCKDEP_CHAINS:      65536
... CHAINHASH_SIZE:          32768
 memory used by lock dependency info: 8671 kB
 per task-struct memory footprint: 2688 bytes
------------------------
| Locking API testsuite:
----------------------------------------------------------------------------
                                 | spin |wlock |rlock |mutex | wsem | rsem |
  --------------------------------------------------------------------------
                     A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                    double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                  initialize held:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
  --------------------------------------------------------------------------
              recursive read-lock:             |  ok  |             |  ok  |
           recursive read-lock #2:             |  ok  |             |  ok  |
            mixed read-write-lock:             |  ok  |             |  ok  |
            mixed write-read-lock:             |  ok  |             |  ok  |
  --------------------------------------------------------------------------
     hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
     soft-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
     hard-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
     soft-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
       sirq-safe-A => hirqs-on/12:  ok  |  ok  |  ok  |
       sirq-safe-A => hirqs-on/21:  ok  |  ok  |  ok  |
         hard-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
         soft-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
         hard-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
         soft-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/123:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/123:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/132:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/132:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/213:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/213:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/231:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/231:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/312:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/312:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/321:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/321:  ok  |  ok  |  ok  |
      hard-irq read-recursion/123:  ok  |
      soft-irq read-recursion/123:  ok  |
      hard-irq read-recursion/132:  ok  |
      soft-irq read-recursion/132:  ok  |
      hard-irq read-recursion/213:  ok  |
      soft-irq read-recursion/213:  ok  |
      hard-irq read-recursion/231:  ok  |
      soft-irq read-recursion/231:  ok  |
      hard-irq read-recursion/312:  ok  |
      soft-irq read-recursion/312:  ok  |
      hard-irq read-recursion/321:  ok  |
      soft-irq read-recursion/321:  ok  |
  --------------------------------------------------------------------------
  | Wound/wait tests |
  ---------------------
                  ww api failures:  ok  |  ok  |  ok  |
               ww contexts mixing:  ok  |  ok  |
             finishing ww context:  ok  |  ok  |  ok  |  ok  |
               locking mismatches:  ok  |  ok  |  ok  |
                 EDEADLK handling:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
           spinlock nest unlocked:  ok  |
  -----------------------------------------------------
                                 |block | try  |context|
  -----------------------------------------------------
                          context:  ok  |  ok  |  ok  |
                              try:  ok  |  ok  |  ok  |
                            block:  ok  |  ok  |  ok  |
                         spinlock:  ok  |  ok  |  ok  |
-------------------------------------------------------
Good, all 256 testcases passed! |
---------------------------------
tsc: Fast TSC calibration using PIT
tsc: Detected 2400.066 MHz processor
Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.13 BogoMIPS (lpj=9600264)
pid_max: default: 32768 minimum: 301
ACPI: Core revision 20170531
ACPI: 1 ACPI AML tables successfully acquired and loaded
Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
CPU: Physical Processor ID: 0
Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
Freeing SMP alternatives memory: 28K
smpboot: Max logical packages: 2
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
smpboot: CPU0: Intel Core Processor (Haswell, no TSX) (family: 0x6, model: 0x3c, stepping: 0x1)
Performance Events: unsupported p6 CPU model 60 no PMU driver, software events only.
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
x86: Booting SMP configuration:
.... node  #0, CPUs:      #1
NMI watchdog: disabled (cpu0): hardware events not enabled
NMI watchdog: Shutting down hard lockup detector on all cpus
smp: Brought up 1 node, 2 CPUs
smpboot: Total of 2 processors activated (9601.80 BogoMIPS)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 512 (order: 4, 65536 bytes)
NET: Registered protocol family 16
cpuidle: using governor ladder
PCCT header not found.
ACPI: bus type PCI registered
PCI: Using configuration type 1 for base access
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
acpi PNP0A03:00: _OSC: OS supports [Segments MSI]
acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
ACPI: Enabled 2 GPEs in block 00 to 0F
pci 0000:00:02.0: vgaarb: setting as boot VGA device
pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
pci 0000:00:02.0: vgaarb: bridge control possible
vgaarb: loaded
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti-k2GhghHVRtY@public.gmane.org>
PTP clock support registered
PCI: Using ACPI for IRQ routing
clocksource: Switched to clocksource refined-jiffies
pnp: PnP ACPI init
pnp: PnP ACPI: found 5 devices
clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
clocksource: Switched to clocksource acpi_pm
NET: Registered protocol family 2
TCP established hash table entries: 32768 (order: 6, 262144 bytes)
TCP bind hash table entries: 32768 (order: 9, 2621440 bytes)
TCP: Hash tables configured (established 32768 bind 32768)
UDP hash table entries: 2048 (order: 6, 393216 bytes)
UDP-Lite hash table entries: 2048 (order: 6, 393216 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:01.0: Activating ISA DMA hang workarounds
pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
software IO TLB [mem 0xbbfd9000-0xbffd9000] (64MB) mapped at [ffff8800bbfd9000-ffff8800bffd8fff]
workingset: timestamp_bits=62 max_order=20 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
9p: Installing v9fs 9p2000 file system support
io scheduler noop registered (default)
io scheduler mq-deadline registered
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
AMD IOMMUv2 driver by Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
AMD IOMMUv2 functionality not available on this system
brd: module loaded
 vda: vda1 vda2 < vda5 >
mlx5_core 0000:00:08.0: firmware version: 10.16.1020
tsc: Refined TSC clocksource calibration: 2400.035 MHz
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2298587c4a5, max_idle_ns: 440795272338 ns
clocksource: Switched to clocksource tsc
i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mousedev: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
mlx5_ib: Mellanox Connect-IB Infiniband driver v5.0-0
oprofile: using NMI timer interrupt.
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
RPC: Registered rdma transport module.
RPC: Registered rdma backchannel transport module.
tipc: Activated (version 2.0.0)
NET: Registered protocol family 30
tipc: Started in single node mode
9pnet: Installing 9P2000 support
Key type dns_resolver registered
sched_clock: Marking stable (3210654019, 0)->(3355124163, -144470144)
page_owner is disabled
EXT4-fs (vda1): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (vda1): couldn't mount as ext2 due to feature incompatibilities
EXT4-fs (vda1): INFO: recovery required on readonly filesystem
EXT4-fs (vda1): write access will be enabled during recovery
EXT4-fs (vda1): recovery complete
EXT4-fs (vda1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 254:1.
devtmpfs: mounted
Freeing unused kernel memory: 2952K
Write protecting the kernel read-only data: 12288k
Freeing unused kernel memory: 632K
Freeing unused kernel memory: 1464K
rodata_test: all tests were successful
systemd[1]: Failed to insert module 'autofs4': No such file or directory
systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
systemd[1]: Detected virtualization kvm.
systemd[1]: Detected architecture x86-64.
systemd[1]: Set hostname to <dev-l-vrt-151-010>.
systemd[1]: ibacm.service: Found ordering cycle on ibacm.service/start
systemd[1]: ibacm.service: Found dependency on opensm.service/start
systemd[1]: ibacm.service: Found dependency on remote-fs.target/start
systemd[1]: ibacm.service: Found dependency on images-bmain.mount/start
systemd[1]: ibacm.service: Found dependency on network-online.target/start
systemd[1]: ibacm.service: Found dependency on network.target/start
EXT4-fs (vda1): re-mounted. Opts: errors=remount-ro
systemd-journald[103]: Received request to flush runtime journal from PID 1
virtio_net virtio0 enp0s3: renamed from eth0
Adding 2094076k swap on /dev/vda5.  Priority:-1 extents:1 across:2094076k 
ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/3] Autoloading for RDMA netlink modules
       [not found]         ` <20170725143420.GA434-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-07-25 15:40           ` Jason Gunthorpe
@ 2017-07-25 18:19           ` Leon Romanovsky
       [not found]             ` <20170725181951.GT3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Leon Romanovsky @ 2017-07-25 18:19 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

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

On Tue, Jul 25, 2017 at 08:34:20AM -0600, Jason Gunthorpe wrote:
> On Tue, Jul 25, 2017 at 09:32:36AM +0300, Leon Romanovsky wrote:
>
> > First, it interferes badly with my RDMA netlink series posted here in
> > previous cycle and I'm expecting to see it in, so I can move forward
> > with RDMAtool implementation.
>
> I'm sure we can fix a few conflicts...

It is more than a couple of conflicts, the implementation will be
slightly different.

Let's wait till Doug creates for-next with RDMA netlink patches, because
I assume that 2 out of 3 patches will be completely different.

>
> > Second, from brief review, it is unclear to me, how do you protect
> > autoload caused by regular user who sends netlink message to ib_core.
>
> You don't, that isn't how kernel auto loading works. Any user can
> attempt to create any kind of socket and the core kernel code will
> load the correct module to support that socket. That is the standard
> way kernel autoloading works, particularly for net families.

Ok, I'll take a look on it.

>
> > Third, it is ib_core who should autoload modules by default, and not some
> > random daemon in user space.
>
> Kernel autoloading of userspace facing kernel services is always
> triggered by a user process attempting to use the service, so this
> comment makes no sense to me.

My concern that "regular" user will trigger "admin" operation without
any checks.

>
> Jason

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] iwpmd: Suppress expected kernel message
       [not found]                 ` <20170725181254.GS3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-07-25 21:21                   ` Jason Gunthorpe
  0 siblings, 0 replies; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-25 21:21 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

On Tue, Jul 25, 2017 at 09:12:54PM +0300, Leon Romanovsky wrote:
> On Tue, Jul 25, 2017 at 09:36:08AM -0600, Jason Gunthorpe wrote:
> > On Tue, Jul 25, 2017 at 04:30:30PM +0300, Leon Romanovsky wrote:
> > > On Mon, Jul 24, 2017 at 04:26:44PM -0600, Jason Gunthorpe wrote:
> > > > RMDA_NL_RSVD was obsoleted a long time ago, but user space still
> > > > uses it to support old kernels. Avoid logging:
> > > >
> > > >  ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list
> > > >
> > > > Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> > > >  drivers/infiniband/core/iwcm.c | 7 +++++++
> > > >  1 file changed, 7 insertions(+)
> > > >
> > >
> > > This print should be removed, on my system (Debian), it prints without
> > > any relation to iwpmd.
> >
> > Really? What from?
> 
> Yes, I constantly delayed the debug of it :)
> Debian 9 + latest rdma-core, see attached log.
> 
> ib_core:ibnl_rcv_msg: Index 3 wasn't found in client list

Index 3 should only used by iwpmd, are you sure it isn't running for
you? Otherwise have a larger problem as it has been removed from the
kernel on the assumption that only iwpmd touched and it was OK to
remove it.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/3] Autoloading for RDMA netlink modules
       [not found]             ` <20170725181951.GT3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-07-25 21:22               ` Jason Gunthorpe
       [not found]                 ` <20170725212248.GD10905-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Jason Gunthorpe @ 2017-07-25 21:22 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

On Tue, Jul 25, 2017 at 09:19:51PM +0300, Leon Romanovsky wrote:

> Let's wait till Doug creates for-next with RDMA netlink patches, because
> I assume that 2 out of 3 patches will be completely different.

Send me a note when Doug has a tree and I will respin things.

> My concern that "regular" user will trigger "admin" operation without
> any checks.

It seems strange, but this is how the kernel works in this area, and
RDMA is not special in this regard.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/3] Autoloading for RDMA netlink modules
       [not found]                 ` <20170725212248.GD10905-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-08-14  4:50                   ` Leon Romanovsky
  0 siblings, 0 replies; 14+ messages in thread
From: Leon Romanovsky @ 2017-08-14  4:50 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Doug Ledford

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

On Tue, Jul 25, 2017 at 03:22:48PM -0600, Jason Gunthorpe wrote:
> On Tue, Jul 25, 2017 at 09:19:51PM +0300, Leon Romanovsky wrote:
>
> > Let's wait till Doug creates for-next with RDMA netlink patches, because
> > I assume that 2 out of 3 patches will be completely different.
>
> Send me a note when Doug has a tree and I will respin things.
>

Jason,

The tree has the right base now.
Looking forward to see these patches on the list.

Thanks,

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-08-14  4:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24 22:26 [PATCH 0/3] Autoloading for RDMA netlink modules Jason Gunthorpe
     [not found] ` <1500935204-6505-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-07-24 22:26   ` [PATCH 1/3] rdma: Allow demand loading of NETLINK_RDMA Jason Gunthorpe
2017-07-24 22:26   ` [PATCH 2/3] rdma: Autoload netlink client modules Jason Gunthorpe
2017-07-24 22:26   ` [PATCH 3/3] iwpmd: Suppress expected kernel message Jason Gunthorpe
     [not found]     ` <1500935204-6505-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-07-25 13:30       ` Leon Romanovsky
     [not found]         ` <20170725133030.GR3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-25 15:36           ` Jason Gunthorpe
     [not found]             ` <20170725153608.GA6715-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-07-25 18:12               ` Leon Romanovsky
     [not found]                 ` <20170725181254.GS3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-25 21:21                   ` Jason Gunthorpe
2017-07-25  6:32   ` [PATCH 0/3] Autoloading for RDMA netlink modules Leon Romanovsky
     [not found]     ` <20170725063236.GQ3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-25 14:34       ` Jason Gunthorpe
     [not found]         ` <20170725143420.GA434-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-07-25 15:40           ` Jason Gunthorpe
2017-07-25 18:19           ` Leon Romanovsky
     [not found]             ` <20170725181951.GT3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-25 21:22               ` Jason Gunthorpe
     [not found]                 ` <20170725212248.GD10905-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-14  4:50                   ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.