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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1828884A29C6694DAF28B7E6B8A82373A8FBF037@ORSMSX109.amr.corp.intel.com>
Date:	Wed, 8 Apr 2015 17:02:11 +0000
From:	"Hefty, Sean" <sean.hefty@...el.com>
To:	Michael Wang <yun.wang@...fitbricks.com>,
	Roland Dreier <roland@...nel.org>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	Hal Rosenstock <hal.rosenstock@...il.com>,
	Tom Tucker <tom@...ngridcomputing.com>,
	Steve Wise <swise@...ngridcomputing.com>,
	Hoang-Nam Nguyen <hnguyen@...ibm.com>,
	Christoph Raisch <raisch@...ibm.com>,
	infinipath <infinipath@...el.com>, Eli Cohen <eli@...lanox.com>,
	"Latif, Faisal" <faisal.latif@...el.com>,
	Upinder Malhi <umalhi@...co.com>,
	"Trond Myklebust" <trond.myklebust@...marydata.com>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	"David S. Miller" <davem@...emloft.net>,
	"Weiny, Ira" <ira.weiny@...el.com>,
	PJ Waskiewicz <pj.waskiewicz@...idfire.com>,
	"Nikolova, Tatyana E" <tatyana.e.nikolova@...el.com>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Jack Morgenstein <jackm@....mellanox.co.il>,
	"Haggai Eran" <haggaie@...lanox.com>,
	Ilya Nelkenbaum <ilyan@...lanox.com>,
	"Yann Droneaud" <ydroneaud@...eya.com>,
	Bart Van Assche <bvanassche@....org>,
	Shachar Raindel <raindel@...lanox.com>,
	Sagi Grimberg <sagig@...lanox.com>,
	Devesh Sharma <devesh.sharma@...lex.com>,
	Matan Barak <matanb@...lanox.com>,
	Moni Shoua <monis@...lanox.com>, Jiri Kosina <jkosina@...e.cz>,
	Selvin Xavier <selvin.xavier@...lex.com>,
	Mitesh Ahuja <mitesh.ahuja@...lex.com>,
	"Li RongQing" <roy.qing.li@...il.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	"Estrin, Alex" <alex.estrin@...el.com>,
	"Doug Ledford" <dledford@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	"Erez Shitrit" <erezsh@...lanox.com>, Tom Gundersen <teg@...m.no>,
	Chuck Lever <chuck.lever@...cle.com>
Subject: RE: [PATCH v2 13/17] IB/Verbs: Reform cma/ucma with management
 helpers

> On 04/07/2015 11:36 PM, Hefty, Sean wrote:
> >> diff --git a/drivers/infiniband/core/cma.c
> b/drivers/infiniband/core/cma.c
> >> index d8a8ea7..c23f483 100644
> >> --- a/drivers/infiniband/core/cma.c
> >> +++ b/drivers/infiniband/core/cma.c
> >> @@ -435,10 +435,10 @@ static int cma_resolve_ib_dev(struct
> rdma_id_private
> >> *id_priv)
> >>  	pkey = ntohs(addr->sib_pkey);
> >>
> >>  	list_for_each_entry(cur_dev, &dev_list, list) {
> >> -		if (rdma_node_get_transport(cur_dev->device->node_type) !=
> >> RDMA_TRANSPORT_IB)
> >> -			continue;
> >> -
> >>  		for (p = 1; p <= cur_dev->device->phys_port_cnt; ++p) {
> >> +			if (!rdma_ib_mgmt(cur_dev->device, p))
> >> +				continue;
> >
> > This check wants to be something like is_af_ib_supported().  Checking
> for IB transport may actually be better than checking for IB management.
> I don't know if IBoE/RoCE devices support AF_IB.
> 
> The wrapper make sense, but do we have the guarantee that IBoE port won't
> be used for AF_IB address? I just can't locate the place we filtered it
> out...

I can't think of a reason why IBoE wouldn't work with AF_IB, but I'm not sure if anyone has tested it.  The original check would have let IBoE through.  When I suggested checking for IB transport, I meant the actual transport protocol, which would have included both IB and IBoE.

> >> @@ -700,8 +700,7 @@ static int cma_ib_init_qp_attr(struct
> rdma_id_private
> >> *id_priv,
> >>  	int ret;
> >>  	u16 pkey;
> >>
> >> -	if (rdma_port_get_link_layer(id_priv->id.device, id_priv-
> >>> id.port_num) ==
> >> -	    IB_LINK_LAYER_INFINIBAND)
> >> +	if (rdma_transport_ib(id_priv->id.device, id_priv->id.port_num))
> >>  		pkey = ib_addr_get_pkey(dev_addr);
> >>  	else
> >>  		pkey = 0xffff;
> >
> > Check here should be against the link layer, not transport.
> 
> I guess the name confusing us again... what if use rdma_tech_ib() here?
> it's the only tech using IB link layers, others are all ETH.

Yes, that would work.

> >>  	id_priv->id.route.addr.dev_addr.dev_type =
> >> -		(rdma_port_get_link_layer(cma_dev->device, p) ==
> >> IB_LINK_LAYER_INFINIBAND) ?
> >> +		(rdma_transport_ib(cma_dev->device, p)) ?
> >>  		ARPHRD_INFINIBAND : ARPHRD_ETHER;
> >
> > This wants the link layer, or maybe use cap_ipoib.
> 
> Is this related with ipoib only?

ARPHDR_INFINIBAND is related to ipoib.  In your next update, maybe go with tech_ib.  I don't know the status of ipoib over iboe.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ