Re: [PATCH 1/5] ibmebus: convert of_platform_driver to platform_driver

2013-05-22 Thread Rob Herring
On Thu, Apr 25, 2013 at 3:45 PM, Rob Herring  wrote:
> On 04/25/2013 03:12 PM, Benjamin Herrenschmidt wrote:
>> On Thu, 2013-04-25 at 14:14 -0500, Rob Herring wrote:
>>> On 04/25/2013 12:35 PM, Benjamin Herrenschmidt wrote:
>
> [...]
>
>>> You need patch 2 of this series to fix this:
>>>
>>> driver core: move to_platform_driver to platform_device.h
>>>
>>> which as Arnd pointed out needs to come first. I've fixed that in my
>>> tree, but I don't think it warrants another post.
>>
>> Can I pull you tree from somewhere to test ?
>
> Here you go:
>
> git://sources.calxeda.com/kernel/linux.git of-platform-removal

Ben,

Did you have a chance to test this? I want to get this into -next.

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


Re: [PATCH 1/5] ibmebus: convert of_platform_driver to platform_driver

2013-05-22 Thread Benjamin Herrenschmidt
On Wed, 2013-05-22 at 07:26 -0500, Rob Herring wrote:
> Did you have a chance to test this? I want to get this into -next.

Ah sorry, skipped out of my mind, I'll get to it asap...

Cheers,
Ben.


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


mlx4/xrc problem

2013-05-22 Thread Steve Wise

Hey Roland/IB experts,

I'm playing around with XRC using mlx4, and I'm hitting an error. 
Attached is the program to setup an XRC connection and exchange some 
data.  It is based on the upstream XRC sample program submitted by 
Intel.  But I back-ported it to the OFED-1.5.4.1 XRC API.  The QPs seem 
to get setup ok, with the target xrc QP in RTR and the initiator QP in 
RTS.  Then the server side (initiator QP) posts a send to the client's 
XRC-SRQ.  On ingress, the client mlx driver gets a type 
MLX4_EVENT_TYPE_WQ_ACCESS_ERROR (0x11) subtype 0 event which flows up to 
the app via the async event channel as an IBV_EVENT_QP_ACCESS_ERR event.


I'm wondering where to look for the problem?  I think I have 
dest_qp_num, sq_psn and rq_psn setup correctly, so I'm not sure what I'm 
doing wrong.  Any thoughts/ideas is much appreciated!


Here's the client output:

[root@hpc-hn1 libibverbs-1.1.4]# ibv_xsrq_pingpong -d mlx4_0 192.168.174.52
   local: LID 0001, QPN RECV 98004b SEND 18004c, PSN 5b6d99, SRQN 0042
  remote: LID 0002, QPN RECV d4004a SEND 54004b, PSN d7ba7a, SRQN 0042
XRC event_type IBV_EVENT_QP_ACCESS_ERR (0x3), arg 0x98004b
XRC RCV QP: rq_psn 0xd7ba7a sq_psn 0 dest_qp_num 0x54004b access_flags 0x6
XRC event_type IBV_EVENT_QP_LAST_WQE_REACHED (0x10), arg 0x98004b
XRC RCV QP: rq_psn 0xd7ba7a sq_psn 0 dest_qp_num 0x54004b access_flags 0x6

Server output:

[root@hpc-cn2 libibverbs-1.1.4]# ibv_xsrq_pingpong  -d mlx4_0
  remote: LID 0001, QPN RECV 98004b SEND 18004c, PSN 5b6d99, SRQN 0042
   local: LID 0002, QPN RECV d4004a SEND 54004b, PSN d7ba7a, SRQN 0042

/*
 * Copyright (c) 2005 Topspin Communications.  All rights reserved.
 * Copyright (c) 2011 Intel Corporation, Inc.  All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 * Redistribution and use in source and binary forms, with or
 * without modification, are permitted provided that the following
 * conditions are met:
 *
 *  - Redistributions of source code must retain the above
 *copyright notice, this list of conditions and the following
 *disclaimer.
 *
 *  - Redistributions in binary form must reproduce the above
 *copyright notice, this list of conditions and the following
 *disclaimer in the documentation and/or other materials
 *provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#if HAVE_CONFIG_H
#  include 
#endif /* HAVE_CONFIG_H */

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include "pingpong.h"

static const char *event_name_str(enum ibv_event_type event_type)
{
switch (event_type) {
case IBV_EVENT_DEVICE_FATAL:
return "IBV_EVENT_DEVICE_FATAL";
case IBV_EVENT_PORT_ACTIVE:
return "IBV_EVENT_PORT_ACTIVE";
case IBV_EVENT_PORT_ERR:
return "IBV_EVENT_PORT_ERR";
case IBV_EVENT_LID_CHANGE:
return "IBV_EVENT_LID_CHANGE";
case IBV_EVENT_PKEY_CHANGE:
return "IBV_EVENT_PKEY_CHANGE";
case IBV_EVENT_SM_CHANGE:
return "IBV_EVENT_SM_CHANGE";
case IBV_EVENT_CLIENT_REREGISTER:
return "IBV_EVENT_CLIENT_REREGISTER";
case IBV_EVENT_GID_CHANGE:
return "IBV_EVENT_GID_CHANGE";
case IBV_EVENT_QP_ACCESS_ERR:
return  "IBV_EVENT_QP_ACCESS_ERR";
case IBV_EVENT_SRQ_ERR:
return "IBV_EVENT_SRQ_ERR";
case IBV_EVENT_SRQ_LIMIT_REACHED:
return "IBV_EVENT_SRQ_LIMIT_REACHED";
case IBV_EVENT_QP_LAST_WQE_REACHED:
return "IBV_EVENT_QP_LAST_WQE_REACHED";
case IBV_EVENT_COMM_EST:
case IBV_EVENT_SQ_DRAINED:
case IBV_EVENT_PATH_MIG:
case IBV_EVENT_PATH_MIG_ERR:
case IBV_EVENT_CQ_ERR:
case IBV_EVENT_QP_FATAL:
case IBV_EVENT_QP_REQ_ERR:
default:
return "unexpected";
}
}

#define MSG_FORMAT "%04x:%06x:%06x:%06x:%04x"
#define MSG_SIZE   31
#define MSG_SSCAN  "%x:%x:%x:%x:%x"
#define ADDR_FORMAT \
"%8s: LID %04x, QPN RECV %06x SEND %06x, PSN %06x, SRQN %04x\n"
static int page_size;

struct pingpong_dest

RE: mlx4/xrc problem

2013-05-22 Thread Hefty, Sean
> [root@hpc-hn1 libibverbs-1.1.4]# ibv_xsrq_pingpong -d mlx4_0 192.168.174.52
> local: LID 0001, QPN RECV 98004b SEND 18004c, PSN 5b6d99, SRQN 0042
>remote: LID 0002, QPN RECV d4004a SEND 54004b, PSN d7ba7a, SRQN 0042

The same SRQN on both sides looks suspicious.

> [root@hpc-cn2 libibverbs-1.1.4]# ibv_xsrq_pingpong  -d mlx4_0
>remote: LID 0001, QPN RECV 98004b SEND 18004c, PSN 5b6d99, SRQN 0042
> local: LID 0002, QPN RECV d4004a SEND 54004b, PSN d7ba7a, SRQN 0042

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


Re: mlx4/xrc problem

2013-05-22 Thread Steve Wise

On 5/22/2013 11:39 AM, Hefty, Sean wrote:

[root@hpc-hn1 libibverbs-1.1.4]# ibv_xsrq_pingpong -d mlx4_0 192.168.174.52
 local: LID 0001, QPN RECV 98004b SEND 18004c, PSN 5b6d99, SRQN 0042
remote: LID 0002, QPN RECV d4004a SEND 54004b, PSN d7ba7a, SRQN 0042

The same SRQN on both sides looks suspicious.

I confirmed via gdb that 0x42 is in ctx.srq->xrc_srq_num on both sides.


[root@hpc-cn2 libibverbs-1.1.4]# ibv_xsrq_pingpong  -d mlx4_0
remote: LID 0001, QPN RECV 98004b SEND 18004c, PSN 5b6d99, SRQN 0042
 local: LID 0002, QPN RECV d4004a SEND 54004b, PSN d7ba7a, SRQN 0042


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


Re: libibverbs / libmlx4 release

2013-05-22 Thread Or Gerlitz
On Mon, May 20, 2013 at 7:49 PM, Roland Dreier  wrote:
> That's fine, I'll do the releases this week.

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


Re: [PATCH 3/3] read_config: skip file/directory with unsecure permissions

2013-05-22 Thread Roland Dreier
On Mon, May 20, 2013 at 2:43 PM, Yann Droneaud  wrote:
> libibverbs must refuse to load arbitrary shared objects.
>
> This patch check the configuration directory and files for
> - being owned by root;
> - not being writable by others.

uverbs is an unprivileged interface.  Right now I can develop and test
libibverbs and driver code as an unprivileged user.  If I'm
understanding correctly, this patch would break that -- I'd have to
install to a root-owned directory to test.

What's the exploit this protects against?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html