Re: [patch] IB/mlx5: stack info leak in mlx5_ib_alloc_ucontext()

2013-07-28 Thread Dan Carpenter
On Sun, Jul 28, 2013 at 10:23:36AM +0300, Eli Cohen wrote: > On Thu, Jul 25, 2013 at 08:04:36PM +0300, Dan Carpenter wrote: > > We don't set "resp.reserved". Since it's at the end of the struct that > > means we don't have to copy it to the user. > > > > Signed-off-by: Dan Carpenter > > > > dif

[PATCH V1 for-3.11 0/7] Add Fast-Reg support to the iser initiator driver

2013-07-28 Thread Or Gerlitz
changes from V0: - fixed error flow in iser_create_frwr_pool() to return correct value, as pointed out by Vu Pham through code-review. - changed iser_free_rx_descriptors() so it handles properly failures which take place early in the connection establishment process. E.g need to check

[PATCH V1 for-3.11 3/7] IB/iser: Accept session->cmds_max from user space

2013-07-28 Thread Or Gerlitz
From: Shlomo Pongratz Use cmds_max passed from user space to be the number of PDUs to be supported for the session instead of hard-coded ISCSI_DEF_XMIT_CMDS_MAX. Specifically, this allows to control the max number of SCSI commands for the seesion. Also don't ignore the qdepth passed from user spa

[PATCH V1 for-3.11 6/7] IB/iser: Place the fmr pool into a union in iser's IB conn struct

2013-07-28 Thread Or Gerlitz
From: Sagi Grimberg This is preparation step for other memory registration methods to be added. In addition, change reg/unreg routines signature to indicate they use FMRs. Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.h | 18 +++

[PATCH V1 for-3.11 4/7] IB/iser: Generalize rdma memory registration

2013-07-28 Thread Or Gerlitz
From: Sagi Grimberg Currently the driver uses FMRs as the only means to register the memory pointed by SG provided by the SCSI mid-layer with the RDMA device. As perperation step for adding more methods for fast path memory registrarion, make the alloc/free and reg/unreg calls be function pointe

[PATCH V1 for-3.11 5/7] IB/iser: Handle unaligned SG in separate function

2013-07-28 Thread Or Gerlitz
From: Sagi Grimberg This routine will be shared with other rdma management schemes. The bounce buffer solution for unaligned SG-lists and the sg_to_page_vec routine are likely to be used for other registration schemes and not just FMR. Move them out of the FMR specific code, and call them from t

[PATCH V1 for-3.11 7/7] IB/iser: Introduce fast memory registration model (FRWR)

2013-07-28 Thread Or Gerlitz
From: Sagi Grimberg Newer HCAs and Virtual functions may not support FMRs but rather a fast registration model, which we call FRWR - "Fast Registration Work Requests". This model was introduced in 00f7ec36c "RDMA/core: Add memory management extensions support" and works when the IB device suppor

[PATCH V1 for-3.11 1/7] IB/iser: Use proper debug level value for info prints

2013-07-28 Thread Or Gerlitz
Commit 4f363882612 "IB/iser: Move informational messages from error to info level" was setting info prints to require lower value for the debug level vs warning prints which isn't the common convention, fix that. Also move the prints on unaligned SG from warning to debug level. Signed-off-by: O

[PATCH V1 for-3.11 2/7] IB/iser: Restructure allocation/deallocation of connection resources

2013-07-28 Thread Or Gerlitz
From: Shlomo Pongratz This is a preparation step to a patch that accepts the number of max SCSI commands to be supported for the session from the user space iSCSI tools. Move the allocation of the login buffer, FMR pool and its associated page vector from iser_create_ib_conn_res() which is calle

Re: [PATCH for-3.11 7/7] IB/iser: Introduce fast memory registration model (FRWR)

2013-07-28 Thread Sagi Grimberg
On 7/28/2013 11:15 AM, Or Gerlitz wrote: On 26/07/2013 20:15, Vu Pham wrote: Hello Or/Sagi, Just a minor /** + * iser_create_frwr_pool - Creates pool of fast_reg descriptors + * for fast registration work requests. + * returns 0 on success, or errno code on failure + */ +int iser_create_frwr_

[PATCH 4/4] Declare 'server_port' as an unsigned variable

2013-07-28 Thread Bart Van Assche
Change the data type of the 'server_port' variable from signed to unsigned such that the cast in the fscanf() call can be removed. Signed-off-by: Bart Van Assche --- src/acm.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/acm.c b/src/acm.c index 49bda48..33379cf

[PATCH 3/4] rsocket: Remove the unused variable 'ret'

2013-07-28 Thread Bart Van Assche
The variable 'ret' is assigned a value but that value is never used. This triggers the following compiler warning: src/rsocket.c:3720:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Hence remove this variable. Signed-off-by: Bart Van Assche --- src/rsocket.c |6 +++

[PATCH 2/4] cma: Remove the unused variable 'id_priv'

2013-07-28 Thread Bart Van Assche
The variable 'id_priv' is assigned a value but is never used. This triggers the following compiler warning: src/cma.c:1178:25: warning: variable 'id_priv' set but not used [-Wunused-but-set-variable] Hence remove this variable. Signed-off-by: Bart Van Assche --- src/cma.c |2 -- 1 file ch

[PATCH 1/4] acm: Remove the unused variable 'pri_path'

2013-07-28 Thread Bart Van Assche
The variable 'pri_path' is assigned a value but is never used. This triggers the following compiler warning: src/acm.c:301:26: warning: variable 'pri_path' set but not used [-Wunused-but-set-variable] Hence remove this variable. Signed-off-by: Bart Van Assche --- src/acm.c |4 1 file

[PATCH 0/4] librdmacm compiler warning fixes

2013-07-28 Thread Bart Van Assche
This is a small series of four patches addressing issues I noticed while analyzing the warnings reported by a recent gcc version. These patches do not change the behavior of librdmacm. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@

Re: [PATCH for-3.11 7/7] IB/iser: Introduce fast memory registration model (FRWR)

2013-07-28 Thread Or Gerlitz
On 26/07/2013 20:15, Vu Pham wrote: Hello Or/Sagi, Just a minor /** + * iser_create_frwr_pool - Creates pool of fast_reg descriptors + * for fast registration work requests. + * returns 0 on success, or errno code on failure + */ +int iser_create_frwr_pool(struct iser_conn *ib_conn, unsigned c

Re: [patch] IB/mlx5: stack info leak in mlx5_ib_alloc_ucontext()

2013-07-28 Thread Eli Cohen
On Thu, Jul 25, 2013 at 08:04:36PM +0300, Dan Carpenter wrote: > We don't set "resp.reserved". Since it's at the end of the struct that > means we don't have to copy it to the user. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/infiniband/hw/mlx5/main.c > b/drivers/infiniband/hw/ml