lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1422793610.3030.39.camel@opteya.com>
Date:	Sun, 01 Feb 2015 13:26:50 +0100
From:	Yann Droneaud <ydroneaud@...eya.com>
To:	Shachar Raindel <raindel@...lanox.com>
Cc:	roland@...nel.org, sean.hefty@...el.com,
	linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
	liranl@...lanox.com, Guy Shapiro <guysh@...lanox.com>,
	Haggai Eran <haggaie@...lanox.com>,
	Yotam Kenneth <yotamke@...lanox.com>
Subject: Re: [PATCH for-next 02/10] IB/core: Pass network namespace as a
 parameter to relevant functions

Hi,

Le dimanche 01 février 2015 à 13:28 +0200, Shachar Raindel a écrit :
> From: Guy Shapiro <guysh@...lanox.com>
> 
> Add network namespace parameters for the address related ib_core
> functions. The parameter is passed to lower level function, instead of
> &init_net, so things are done in the correct namespace.
> 
> For now pass &init_net on every caller.
> Callers that will pass &init_net permanently are marked with an
> appropriate comment.
> 
> Signed-off-by: Haggai Eran <haggaie@...lanox.com>
> Signed-off-by: Yotam Kenneth <yotamke@...lanox.com>
> Signed-off-by: Shachar Raindel <raindel@...lanox.com>
> Signed-off-by: Guy Shapiro <guysh@...lanox.com>
> 
> ---
>  drivers/infiniband/core/agent.c       |  4 +++-
>  drivers/infiniband/core/cm.c          |  9 +++++++--
>  drivers/infiniband/core/mad_rmpp.c    | 10 ++++++++--
>  drivers/infiniband/core/user_mad.c    |  4 +++-
>  drivers/infiniband/core/verbs.c       | 10 ++++++----
>  drivers/infiniband/ulp/srpt/ib_srpt.c |  3 ++-
>  include/rdma/ib_verbs.h               | 15 +++++++++++++--
>  7 files changed, 42 insertions(+), 13 deletions(-)

> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 0d74f1de99aa..dd4c80cea8d3 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -48,6 +48,7 @@
>  #include <linux/rwsem.h>
>  #include <linux/scatterlist.h>
>  #include <linux/workqueue.h>
> +#include <net/net_namespace.h>
>  #include <uapi/linux/if_ether.h>
>  
>  #include <linux/atomic.h>
> @@ -1801,9 +1802,14 @@ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr);
>   *   ignored unless the work completion indicates that the GRH is valid.
>   * @ah_attr: Returned attributes that can be used when creating an address
>   *   handle for replying to the message.
> + * @net: The network namespace to use for address resolution.
> + *
> + * It is the caller's responsibility to make sure the network namespace is
> + * alive until the function returns.

Why ?

>   */
>  int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
> -		       struct ib_grh *grh, struct ib_ah_attr *ah_attr);
> +		       struct ib_grh *grh, struct ib_ah_attr *ah_attr,
> +		       struct net *net);
>  
>  /**
>   * ib_create_ah_from_wc - Creates an address handle associated with the
> @@ -1813,12 +1819,17 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
>   * @grh: References the received global route header.  This parameter is
>   *   ignored unless the work completion indicates that the GRH is valid.
>   * @port_num: The outbound port number to associate with the address.
> + * @net: The network namespace to use for address resolution.
>   *
>   * The address handle is used to reference a local or global destination
>   * in all UD QP post sends.
> + *
> + * It is the caller's responsibility to make sure the network namespace is
> + * alive until the function returns.

Why ?

Regards.

-- 
Yann Droneaud
OPTEYA


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

Powered by blists - more mailing lists