Re: [PATCH] IB/ipoib: CSUM support in connected mode

2015-11-24 Thread Yann Droneaud
Hi, Le mercredi 18 novembre 2015 à 12:46 +0200, Yuval Shaia a écrit : > On Thu, Jul 30, 2015 at 03:58:13PM +0200, Yann Droneaud wrote: > > Le jeudi 30 juillet 2015 à 04:46 -0700, Yuval Shaia a écrit : > > > This enhancement suggest the usage of IB CRC instead of CSUM in > &

Re: [PATCH RFC 1/3] IB/core: Expose a device attribute for rdma_read access flags

2015-11-10 Thread Yann Droneaud
rivers: > mlx4, mlx5, qib, ocrdma, nes: IB_ACCESS_LOCAL_WRITE > cxgb3, cxgb4, hfi: IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE > Why were those hw providers not modified to enforce IB_ACCESS_REMOTE_WRITE when needed, instead of asking users to set it for them ? Regards. --  Yann Droneau

Re: [PATCH] IB/core: Allow legacy verbs through extended interfaces

2015-11-05 Thread Yann Droneaud
compatible with the legacy hw provider implementation used by the legacy verbs they intend to replace: an extended verbs matching a legacy one will need to be written in such way it will not be calling into a hw provider function pointer that can be NULL (in case there's new function pointer

Re: [PATCH] IB/core: avoid 32-bit warning

2015-10-07 Thread Yann Droneaud
esp)); > > Would it make sense to cast inside INIT_UDATA() and not have callers > worry about it? It's ... complicated. See INIT_UDATA_BUF_OR_NULL(). Awayway, I have patch to do the opposite, eg. explicitly cast u64 value to (void __user *)(unsigned long) in the caller func

Re: [PATCH] IB/core: avoid 32-bit warning

2015-10-07 Thread Yann Droneaud
d-off-by: Arnd Bergmann > Fixes: 565197dd8fb1 ("IB/core: Extend ib_uverbs_create_cq") > Reviewed-by: Yann Droneaud > diff --git a/drivers/infiniband/core/uverbs_cmd.c > b/drivers/infiniband/core/uverbs_cmd.c > index be4cb9f04be3..88b3b78340f2 100644 > --- a/drivers

Re: message size, was Re: merge struct ib_device_attr into struct ib_device

2015-09-23 Thread Yann Droneaud
the users of ib_query_device(), one at a time. And the last patch would remove ib_query_device(). Regards. -- Yann Droneaud -- 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: merge struct ib_device_attr into struct ib_device

2015-09-22 Thread Yann Droneaud
Le lundi 21 septembre 2015 à 13:59 -0700, Christoph Hellwig a écrit : > This patch gets rid of struct ib_device_attr and cleans up drivers > nicely. > > It goes on top of my send_wr cleanups and the memory registration > udpates > from Sagi. > Is the patch missing ? Regard

Re: [PATCH for-next 02/10] IB/core: Add flags parameter for ib_create_cq

2015-05-20 Thread Yann Droneaud
newxprt->sc_max_requests, > -0); > + rq_comp_handler, cq_event_handler, > +newxprt, newxprt->sc_max_requests, > +

Re: [PATCH for-next 01/10] IB/core: Change provider's API of create_cq to be extendible

2015-05-20 Thread Yann Droneaud
elated changes that will cause. I was going to ask for the same change. Regards. -- Yann Droneaud OPTEYA -- 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 for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-20 Thread Yann Droneaud
have to make drivers which are going to behave as good citizens to the kernel *and* userspace. Adding a dedicated extensions which is going to be replaced later by a generic, vendor neutral, extension will be painful to maintain to ensure backward compatibility. So let's think how this timestamp

Re: rdma kernel tree

2015-05-19 Thread Yann Droneaud
view: I prefer reviewing 10 littles patches than one big patch. - Signed-off-by:, Reviewed-by:, Tested-by: and Cc: are required too so that when it come to modifying existing code, we can contact people previously involved for reviews, tests, advice, etc. (I usually add Link: with a reference to the

Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found

2015-05-09 Thread Yann Droneaud
"driver must be statically linked > too.\n"); > - } > - free(sysfs_dev); I believe this free() was necessary to not leak some memory. > - } > - > return num_devices; > } Regards. -- Yann Droneaud OPTEYA -- T

Re: [PATCH V1 net-next] IB/ipoib: Fix ndo_get_iflink

2015-04-16 Thread Yann Droneaud
v->dev->mtu; > + priv->parent = ppriv->dev; > set_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags); > > result = ipoib_set_dev_features(priv, ppriv->ca); > @@ -84,8 +85,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct > ipoib_dev_priv

Re: [PATCH linux-next 1/4] infiniband/ipoib: fix possible NULL pointer dereference in ipoib_get_iflink

2015-04-14 Thread Yann Droneaud
ition or not, I build linux-next-20150414 on two machines. Both > > machines panic at modprobe ib_ipoib. Do you means I need to report a > > bug? But I do not know report to who or where. > > Here is the tag: > Fixes: 5aa7add8f14b ("infiniband/ipoib: implement ndo_get_iflink&q

Re: [PATCH v1 2/2] IB/core: don't disallow registering region starting at 0x0

2015-04-14 Thread Yann Droneaud
Hi, Le mardi 14 avril 2015 à 12:20 +0300, Sagi Grimberg a écrit : > On 4/13/2015 3:56 PM, Yann Droneaud wrote: > > In a call to ib_umem_get(), if address is 0x0 and size is > > already page aligned, check added in commit 8494057ab5e4 > > ("IB/uverbs: Prevent integ

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-13 Thread Yann Droneaud
Hi, Le jeudi 02 avril 2015 à 18:12 +, Haggai Eran a écrit : > On Thursday, April 2, 2015 7:44 PM, Shachar Raindel wrote: > >> -Original Message- > >> From: Yann Droneaud [mailto:ydrone...@opteya.com] > >> Le jeudi 02 avril 2015 à 18:18 +0300, Haggai Eran

[PATCH v1 2/2] IB/core: don't disallow registering region starting at 0x0

2015-04-13 Thread Yann Droneaud
ydrone...@opteya.com Cc: # 8494057ab5e4 ("IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic") Cc: Shachar Raindel Cc: Jack Morgenstein Cc: Or Gerlitz Signed-off-by: Yann Droneaud --- drivers/infiniband/core/umem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH v1 1/2] IB/core: disallow registering 0-sized memory region

2015-04-13 Thread Yann Droneaud
efuse to register a 0-sized region. Link: http://mid.gmane.org/cover.1428929103.git.ydrone...@opteya.com Cc: Cc: Shachar Raindel Cc: Jack Morgenstein Cc: Or Gerlitz Signed-off-by: Yann Droneaud --- drivers/infiniband/core/umem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dr

[PATCH v1 0/2] Fixes on top of CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-13 Thread Yann Droneaud
of CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access http://mid.gmane.org/cover.1428523125.git.ydrone...@opteya.com http://marc.info/?i=cover.1428523125.git.ydrone...@opteya.com Yann Droneaud (2): IB/core: disallow registering 0-sized memory region IB/core: don't

Re: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes in virtual GID management)

2015-04-12 Thread Yann Droneaud
t; That would make sense to have someone like Doug or Jason being the potential successors to Roland in order to keep InfiniBand subsystem vendor neutrality. Regards. -- Yann Droneaud OPTEYA -- 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: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes in virtual GID management)

2015-04-09 Thread Yann Droneaud
widely appreciated and > > respected by the entire community. > > I concur, and I'd like to thank you for the personal time that you dedicated > to this project. Thank you for all your work ! Anyway, I hope you will keep contributing to the kernel and userspace parts of the Infi

[PATCH RESEND 2/2] IB/core: don't disallow registering region starting at 0x0

2015-04-08 Thread Yann Droneaud
3125.git.ydrone...@opteya.com Cc: # 8494057ab5e4 ("IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic") Cc: Shachar Raindel Cc: Jack Morgenstein Cc: Or Gerlitz Signed-off-by: Yann Droneaud --- drivers/infiniband/core/umem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH RESEND 0/2] Fixes on top of CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-08 Thread Yann Droneaud
.com http://marc.info/?i=1428497043.22575.176.ca...@opteya.com Regards. Yann Droneaud (2): IB/core: disallow registering 0-sized memory region IB/core: don't disallow registering region starting at 0x0 drivers/infiniband/core/umem.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.1.

[PATCH RESEND 1/2] IB/core: disallow registering 0-sized memory region

2015-04-08 Thread Yann Droneaud
ed. Link: http://mid.gmane.org/cover.1428523125.git.ydrone...@opteya.com Cc: # 8494057ab5e4 ("IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic") Cc: Shachar Raindel Cc: Jack Morgenstein Cc: Or Gerlitz Signed-off-by: Yann Droneaud --- drivers/infiniband/core/umem.c | 5

[PATCH 2/2] IB/core: don't disallow registering region starting at 0x0

2015-04-08 Thread Yann Droneaud
2843.git.ydrone...@opteya.com Cc: sta...@vger.kernel.org # 8494057ab5e4 ("IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic") Cc: Shachar Raindel Cc: Jack Morgenstein Cc: Or Gerlitz Signed-off-by: Yann Droneaud --- drivers/infiniband/core/umem.c | 2 +- 1 file changed, 1

[PATCH 1/2] IB/core: disallow registering 0-sized memory region

2015-04-08 Thread Yann Droneaud
ed. Link: http://mid.gmane.org/cover.1428502843.git.ydrone...@opteya.com Cc: sta...@vger.kernel.org # 8494057ab5e4 ("IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic") Cc: Shachar Raindel Cc: Jack Morgenstein Cc: Or Gerlitz Signed-off-by: Yann Droneaud --- drivers/i

[PATCH 0/2] Fixes on top of CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-08 Thread Yann Droneaud
obably not something to be allowed, but it's not up to ib_umem_get() to prevent it). [1] "Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access" http://mid.gmane.org/1428497043.22575.176.ca...@opteya.com http://marc.info/?i=1428497043.22575.176.ca...@o

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-08 Thread Yann Droneaud
Hi, Le mercredi 08 avril 2015 à 14:19 +0200, Yann Droneaud a écrit : > Le jeudi 02 avril 2015 à 16:34 +, Shachar Raindel a écrit : > > > -Original Message- > > > From: Yann Droneaud [mailto:ydrone...@opteya.com] > > > Sent: Thursday, April 02, 2015 6:16 P

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-08 Thread Yann Droneaud
Hi, Le jeudi 02 avril 2015 à 16:34 +, Shachar Raindel a écrit : > > -Original Message- > > From: Yann Droneaud [mailto:ydrone...@opteya.com] > > Sent: Thursday, April 02, 2015 6:16 PM > > Le jeudi 02 avril 2015 à 10:52 +, Shachar Raindel a écrit : >

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-03 Thread Yann Droneaud
Hi, Le vendredi 03 avril 2015 à 08:39 +, Haggai Eran a écrit : > On Thursday, April 2, 2015 11:40 PM, Yann Droneaud > wrote: > > Le jeudi 02 avril 2015 à 16:44 +, Shachar Raindel a écrit : > >> > -Original Message- > >> > From: Yann D

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-02 Thread Yann Droneaud
Hi, Le jeudi 02 avril 2015 à 16:44 +, Shachar Raindel a écrit : > > -Original Message- > > From: Yann Droneaud [mailto:ydrone...@opteya.com] > > Sent: Thursday, April 02, 2015 7:35 PM > > Another related question: as the large memory range could be registere

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-02 Thread Yann Droneaud
Hi Haggai, Le jeudi 02 avril 2015 à 18:18 +0300, Haggai Eran a écrit : > On 02/04/2015 16:30, Yann Droneaud wrote: > > Hi, > > > > Le jeudi 02 avril 2015 à 10:52 +, Shachar Raindel a écrit : > >>> -Original Message- > >>> From: Yann Dron

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-02 Thread Yann Droneaud
Hi, Le jeudi 02 avril 2015 à 10:52 +, Shachar Raindel a écrit : > > -Original Message- > > From: Yann Droneaud [mailto:ydrone...@opteya.com] > > Sent: Thursday, April 02, 2015 1:05 PM > > Le mercredi 18 mars 2015 à 17:39 +, Shachar Raindel a écrit : ... >

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-02 Thread Yann Droneaud
Hi, Le jeudi 02 avril 2015 à 10:52 +, Shachar Raindel a écrit : > > -Original Message- > > From: Yann Droneaud [mailto:ydrone...@opteya.com] > > Sent: Thursday, April 02, 2015 1:05 PM > > Le mercredi 18 mars 2015 à 17:39 +, Shachar Raindel a écrit : >

Re: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-02 Thread Yann Droneaud
NVAL); > + Can access_ok() be used here ? if (!access_ok(writable ? VERIFY_WRITE : VERIFY_READ, addr, size)) return ERR_PTR(-EINVAL); > if (!can_do_mlock()) > return ERR_PTR(-EPERM); > Regards. -- Yann Droneaud OPTEYA -- 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

[-stable] commit 377b513485fd ("IB/core: Avoid leakage from kernel to user space")

2015-03-27 Thread Yann Droneaud
Hi, Please add commit 377b513485fd ("IB/core: Avoid leakage from kernel to user space") to -stable. It can be applied to v2.6.32 and later. Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of

Re: [PATCH] rdma: replace deprecated ifconfig in doc

2015-03-10 Thread Yann Droneaud
Hi, Le lundi 09 mars 2015 à 11:29 -0700, Stephen Hemminger a écrit : > On Mon, 09 Mar 2015 13:06:30 +0100 > Yann Droneaud wrote: > > Le dimanche 08 mars 2015 à 16:36 -0700, Stephen Hemminger a écrit : > > > The ifconfig command has been deprecated for many years. > > &

Re: [PATCH] rdma: replace deprecated ifconfig in doc

2015-03-09 Thread Yann Droneaud
ib_ipoib > -$ ifconfig ib0 a.b.c.d > +$ ip li set dev ib0 up s/li/link ? > +$ ip addr add dev ib0 a.b.c.d > > NOTE: use unique addresses for the client and server Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line "unsub

Re: [PATCH v2] IB/srp: Add 64-bit LUN support

2015-03-06 Thread Yann Droneaud
t; > #include > +#include > > enum { > SRP_LOGIN_REQ = 0x00, > @@ -179,7 +180,7 @@ struct srp_tsk_mgmt { > u8 reserved1[6]; > u64 tag; > u8 reserved2[4]; > - __be64 lun __attribute__((packed)); > + struct scsi_lun lu

Re: [PATCH, resend] IB/srp: Add 64-bit LUN support

2015-03-04 Thread Yann Droneaud
e/scsi/srp.h > +++ b/include/scsi/srp.h > @@ -42,6 +42,7 @@ > */ > > #include > +#include > > enum { > SRP_LOGIN_REQ = 0x00, @@ -54,7 +54,6 @@ enum { SRP_DLID_REDIRECT = 2, SRP_STALE_CONN = 3, - SRP_MAX_LUN

Re: [PATCH] IB/ipatch: Use setup_timer and mod_timer

2015-03-02 Thread Yann Droneaud
ds to overflow at full IB 4x bandwdith */ > - add_timer(&dd->ipath_stats_timer); > + setup_timer(&dd->ipath_stats_timer, ipath_get_faststats, > + (unsigned long)dd); > + mod_timer(&dd->ipath_stats_timer, jiffies

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-03-02 Thread Yann Droneaud
Hi Or, Le samedi 31 janvier 2015 à 22:09 +0200, Or Gerlitz a écrit : > On Fri, Jan 30, 2015, Yann Droneaud wrote: > > [..] I have not the chance > > of owning HCA with the support for this feature, nor the patches > > libibverbs / libmlx5 ... (anyway I would not

Re: [PATCH RE-RESEND V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents

2015-02-17 Thread Yann Droneaud
Hi, Le lundi 16 février 2015 à 22:28 +0100, Yann Droneaud a écrit : > Le jeudi 05 février 2015 à 13:53 +0200, Or Gerlitz a écrit : > > From: Majd Dibbiny > > > > In some error flows, ib_mad_unregister_agent is being invoked als

Re: [PATCH RE-RESEND V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents

2015-02-16 Thread Yann Droneaud
= 0; p < dd->num_pports; p++) { > ibp = &dd->pport[p].ibport_data; > - if (ibp->send_agent) { > + if (!IS_ERR(ibp->send_agent)) { > agent = ibp->send_agent; > ibp->send_a

Re: [PATCH RE-RESEND V2 for-next 4/5] IB/core: Make sure that the PSN does not overflow

2015-02-16 Thread Yann Droneaud
m = cmd.dest_qp_num; > attr->qp_access_flags = cmd.qp_access_flags; > attr->pkey_index = cmd.pkey_index; 0xff could be made a #define Question: userspace is allowed to ask for a PSN on 32bits, but it will be silently truncated, is it goin

Re: [PATCH RE-RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow

2015-02-16 Thread Yann Droneaud
; - put_qp_read(qp); > - > if (ret) > - goto out; > + goto release_qp; > > ret = in_len; > > +release_qp: > + put_qp_read(qp); > + > out: > kfree(attr); > Regards. -- Yann Droneaud OPTEYA -- 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] IB/mlx5: Enable the ODP capability query verb

2015-02-16 Thread Yann Droneaud
mlx5_ib_query_device; > dev->ib_dev.query_port = mlx5_ib_query_port; Reviewed-by: Yann Droneaud Regards. -- Yann Droneaud OPTEYA -- 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 2/3] IB/core: Add on demand paging caps to ib_uverbs_ex_query_device

2015-02-16 Thread Yann Droneaud
e of those flags: see also commit 860f10a799c8 ("IB/core: Add flags for on demand paging support") > Yann Droneaud writes: > > Note: as offsetof() is used to retrieve the size of the lower chunk > > of the response, beware that it only works if the upper chunk > > is

Re: [PATCH 1/3] IB/core: Add support for extended query device caps

2015-02-16 Thread Yann Droneaud
Dev_Workshop/Tues_0423/2013_Workshop_Tues_0830_Tzahi_Oved-verbs_extensions_ofa_2013-tzahio.pdf > > Cc: Yann Droneaud > Cc: Ira Weiny > Cc: Jason Gunthorpe > Signed-off-by: Eli Cohen > Signed-off-by: Haggai Eran > --- > drivers/infiniband/core/uverbs.h | 1 + >

Re: [PATCH] IB/srp: Add 64-bit LUN support

2015-02-10 Thread Yann Droneaud
Hi Bart, Le mardi 10 février 2015 à 12:41 +0100, Bart Van Assche a écrit : > On 02/10/15 11:13, Yann Droneaud wrote: > > Le lundi 02 février 2015 à 18:21 +0100, Bart Van Assche a écrit : > >> The largest LUN number that has been tested is 0xd2003fff. > >>

Re: [PATCH] IB/srp: Add 64-bit LUN support

2015-02-10 Thread Yann Droneaud
t { > u8 reserved1[6]; > u64 tag; > u8 reserved2[4]; > - __be64 lun __attribute__((packed)); > + struct scsi_lun lun; > u8 reserved3[2]; > u8 tsk_mgmt_func; > u8 reserved4; > @@ -200,7 +201,7 @@ struct srp_

Re: [GIT PULL] please pull infiniband.git

2015-02-07 Thread Yann Droneaud
n. > > Sorry for sending this at the very end of the release cycle, but we > didn't realize the scope of the required fix until just now. > I hope this could go in v3.19 as, at this stage, we don't want to expose any bits of this ABI in a released kernel. Regards. -- Ya

Re: [PATCH] Revert "IB/core: Add support for extended query device caps"

2015-02-06 Thread Yann Droneaud
I was. > I will send this to Linus on Friday. Thanks a lot. And sorry about this epic adventure in ABI land :/ Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majo

[PATCH] Revert "IB/core: Add support for extended query device caps"

2015-02-05 Thread Yann Droneaud
ggai Eran Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Sagi Grimberg Cc: Shachar Raindel Signed-off-by: Yann Droneaud --- drivers/infiniband/core/uverbs.h | 1 - drivers/infiniband/core/uverbs_cmd.c | 137 +++ drivers/infiniband/hw/mlx5/main.c| 2 - includ

Re: [PATCH] IB/core: Temporarily disable ex_query_device uverb

2015-02-04 Thread Yann Droneaud
Hi, Le lundi 02 février 2015 à 14:10 +0100, Yann Droneaud a écrit : > Le dimanche 01 février 2015 à 15:35 +0200, Haggai Eran a écrit : > > Commit 5a77abf9a97a ("IB/core: Add support for extended query device caps") > > added a new extended verb to query the capabilities

Re: [PATCH] IB/core: Temporarily disable ex_query_device uverb

2015-02-02 Thread Yann Droneaud
gt; > Block access to this verb from user-space until the new semantics are in > place. > > Cc: Yann Droneaud > Cc: Jason Gunthorpe > Cc: Eli Cohen > > [1] [PATCH v1 0/5] IB/core: extended query device caps cleanup for v3.19 > http://www.spinics.net/lists/linux-r

Re: [PATCH for-next 01/10] IB/addr: Pass network namespace as a parameter

2015-02-01 Thread Yann Droneaud
Hi, Le dimanche 01 février 2015 à 13:46 +, Shachar Raindel a écrit : > > -Original Message- > > From: Yann Droneaud [mailto:ydrone...@opteya.com] > > Sent: Sunday, February 01, 2015 2:23 PM > > To: Shachar Raindel > > Cc: rol...@kernel.org; se

Re: [PATCH for-next 08/10] IB/cma: Add support for network namespaces

2015-02-01 Thread Yann Droneaud
gt; diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c > index 6cd9d1deafc3..066b60b27b12 100644 > --- a/net/rds/rdma_transport.c > +++ b/net/rds/rdma_transport.c > @@ -160,7 +160,7 @@ static int rds_rdma_listen_init(void) > int ret; > > cm_id = rdma_create_id(rds_rdma

Re: [PATCH for-next 05/10] IB/cm,cma: Move RDMA IP CM private-data parsing code from ib_cma to ib_cm

2015-02-01 Thread Yann Droneaud
; if (ret) > goto out; > req.private_data = private_data; > diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h > index 0e3ff30647d5..e418a11afcfe 100644 > --- a/include/rdma/ib_cm.h > +++ b/include/rdma/ib_cm.h > @@ -274,6 +274,52 @@ struct ib_cm_event { > #define CM_LAP_ATTR_ID cpu_to_be16(0x0019) > #define CM_APR_ATTR_ID cpu_to_be16(0x001A) > > +union cm_ip_addr { > + struct in6_addr ip6; > + struct { > + __be32 pad[3]; > + __be32 addr; > + } ip4; > +}; > + > +struct cm_hdr { > + u8 cm_version; > + u8 ip_version; /* IP version: 7:4 */ > + __be16 port; > + union cm_ip_addr src_addr; > + union cm_ip_addr dst_addr; > +}; > + > +#define RDMA_IP_CM_VERSION 0x00 > + > +/** > + * cm_format_hdr - Fill in a cm_hdr struct according to connection details > + * @hdr: cm_hdr struct to fill > + * @family: ip family of the addresses - AF_INET or AF_INTET6 > + * @src_addr: source address of the connection > + * @dst_addr: destination address of the connection > + **/ > +int cm_format_hdr(void *hdr, int family, > + struct sockaddr *src_addr, > + struct sockaddr *dst_addr); > + > +/** > + * cm_save_net_info - saves ib connection event details > + * @src_addr: source address of the connection > + * @dst_addr: destination address of the connection > + * @ib_event: ib event to take connection details from > + **/ > +int cm_save_net_info(struct sockaddr *src_addr, > + struct sockaddr *dst_addr, > + struct ib_cm_event *ib_event); > + > +/** > + * cm_set_ip_ver - sets the ip version of a cm_hdr struct > + * @hdr:cm_hdr struct to change > + * @ip_ver: ip version to set - a 4 bit value > + **/ > +void cm_set_ip_ver(struct cm_hdr *hdr, u8 ip_ver); > + > /** > * ib_cm_handler - User-defined callback to process communication events. > * @cm_id: Communication identifier associated with the reported event. Every other symbols in ib_cm.h are prefixed by "ib_cm_", so I would prefer having symbols moved from ib_cma.c to ib_cm.c be renamed, except it would create a lot of code change ... Regards. -- Yann Droneaud OPTEYA -- 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 for-next 02/10] IB/core: Pass network namespace as a parameter to relevant functions

2015-02-01 Thread Yann Droneaud
mespace 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

Re: [PATCH for-next 01/10] IB/addr: Pass network namespace as a parameter

2015-02-01 Thread Yann Droneaud
> until > + * the function returns. Why ? > + */ > +int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id, > + struct net *net); > +/** rdma_addr_find_dmac_by_grh() - Find the dst MAC and VLAN ID for a GID > pair &g

Re: [PATCH v1 2/5] IB/uverbs: ex_query_device: check request's comp_mask

2015-02-01 Thread Yann Droneaud
Hi, Le dimanche 01 février 2015 à 10:12 +0200, Haggai Eran a écrit : > On 29/01/2015 19:59, Yann Droneaud wrote: > > This patch ensures the extended QUERY_DEVICE uverbs request's > > comp_mask has only known and supported bits (currently none). > > > > If use

Re: [PATCH 1/2] infiniband: Help gcc generate better code for ocrdma_srq_toggle_bit

2015-01-31 Thread Yann Droneaud
x % 32)); > > > > - if (srq->idx_bit_fields[i] & mask) > > - srq->idx_bit_fields[i] &= ~mask; > > - else > > - srq->idx_bit_fields[i] |= mask; > > + srq->idx_bit_fields[i] ^= mask; > > } > > &

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-30 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 15:17 -0800, Roland Dreier a écrit : > On Thu, Jan 29, 2015 at 1:59 PM, Yann Droneaud wrote: > >> Roland: I agree with Yann, these patches need to go in, or the ODP > >> patches reverted. > > > Reverting all On Demand Paging

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-29 Thread Yann Droneaud
Le jeudi 29 janvier 2015 à 19:43 +0100, Yann Droneaud a écrit : > Le jeudi 29 janvier 2015 à 11:28 -0700, Jason Gunthorpe a écrit : > > On Thu, Jan 29, 2015 at 06:59:58PM +0100, Yann Droneaud wrote: > > > - resp.odp_caps.general_caps = attr.odp

Re: [PATCH v1 2/5] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-29 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 11:36 -0700, Jason Gunthorpe a écrit : > On Thu, Jan 29, 2015 at 06:59:59PM +0100, Yann Droneaud wrote: > > This patch ensures the extended QUERY_DEVICE uverbs request's > > comp_mask has only known and supported bits (currently none). > >

Re: [PATCH v1 3/5] IB/uverbs: ex_query_device: answer must depend on response buffer's size

2015-01-29 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 11:38 -0700, Jason Gunthorpe a écrit : > On Thu, Jan 29, 2015 at 07:00:00PM +0100, Yann Droneaud wrote: > > As specified in "Extending Verbs API" presentation [1] by Tzahi Oved > > during OFA International Developer Workshop 2013, the reque

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-29 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 11:28 -0700, Jason Gunthorpe a écrit : > On Thu, Jan 29, 2015 at 06:59:58PM +0100, Yann Droneaud wrote: > > As specified in "Extending Verbs API" presentation [1] by Tzahi Oved > > during OFA International Developer Workshop 2013, the reque

Re: [PATCH 3/4] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-29 Thread Yann Droneaud
Le jeudi 29 janvier 2015 à 12:14 -0700, Jason Gunthorpe a écrit : > On Thu, Jan 29, 2015 at 07:35:14PM +0100, Yann Droneaud wrote: > > > Unfortunately, the userspace don't get the size of the returned data: > > it's only a single "write()" syscall after

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-29 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 12:18 -0700, Jason Gunthorpe a écrit : > On Thu, Jan 29, 2015 at 07:43:29PM +0100, Yann Droneaud wrote: > > > The write() syscall must return the size buffer passed to it, or > > less, but in such case it would ask for trouble as userspace would

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-29 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 11:28 -0700, Jason Gunthorpe a écrit : > On Thu, Jan 29, 2015 at 06:59:58PM +0100, Yann Droneaud wrote: > > As specified in "Extending Verbs API" presentation [1] by Tzahi Oved > > during OFA International Developer Workshop 2013, the reque

Re: [PATCH 3/4] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-29 Thread Yann Droneaud
Hi, Le jeudi 29 janvier 2015 à 11:09 -0700, Jason Gunthorpe a écrit : > On Wed, Jan 28, 2015 at 02:19:11PM +0100, Yann Droneaud wrote: > > > But the same program (either binary or source code) might fail on > > newer kernel where some bits in comp_mask gain a meaning not su

[PATCH v1 3/5] IB/uverbs: ex_query_device: answer must depend on response buffer's size

2015-01-29 Thread Yann Droneaud
3_Workshop_Tues_0830_Tzahi_Oved-verbs_extensions_ofa_2013-tzahio.pdf Link: http://mid.gmane.org/cover.1422553023.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud --- drivers/infiniband/core/uverbs_cmd.c | 13

[PATCH v1 4/5] IB/uverbs: ex_query_device: no need to clear the whole structure

2015-01-29 Thread Yann Droneaud
As only the requested fields are set and copied to userspace, there's no need to clear the content of the response structure beforehand. Link: http://mid.gmane.org/cover.1422553023.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by:

[PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-29 Thread Yann Droneaud
berg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud --- drivers/infiniband/core/uverbs_cmd.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index

[PATCH v1 5/5] IB/core: ib_copy_to_udata(): don't silently truncate response

2015-01-29 Thread Yann Droneaud
eck output length" http://mid.gmane.org/d27716a3a1c180f832d153a7402f65ea8a75b734.1376847403.git.ydrone...@opteya.com Link: http://mid.gmane.org/cover.1422553023.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud -

[PATCH v1 2/5] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-29 Thread Yann Droneaud
probe/discover which extended features are currently supported by a kernel. Link: http://mid.gmane.org/cover.1422553023.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud --- drivers/infiniband/core/uverbs_cmd.c | 3 +++ 1 file ch

Re: [PATCH 3/4] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-29 Thread Yann Droneaud
Hi, Le mercredi 28 janvier 2015 à 17:40 +0200, Haggai Eran a écrit : > On 28/01/2015 15:19, Yann Droneaud wrote: > > Le mardi 27 janvier 2015 à 08:50 +0200, Haggai Eran a écrit : > >> On 26/01/2015 13:17, Yann Droneaud wrote: > >>> ... > >>> Le dimanche

[PATCH v1 0/5] IB/core: extended query device caps cleanup for v3.19

2015-01-29 Thread Yann Droneaud
t 0 [1] http://mid.gmane.org/1418733236.2779.26.ca...@opteya.com [2] http://mid.gmane.org/063956366559d6919693aabb324bab83d676bc28.1421931555.git.ydrone...@opteya.com [3] http://mid.gmane.org/54c902e4.5010...@mellanox.com [4] http://mid.gmane.org/cover.1421931555.git.ydrone...@opteya.com Yann Droneaud (5): IB/uverbs: ex_q

Re: [PATCH] ib_ipoib: Scatter-Gather support in connected mode

2015-01-28 Thread Yann Droneaud
wr_id); > } > > -static int ipoib_dma_map_tx(struct ib_device *ca, > - struct ipoib_tx_buf *tx_req) > +int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req) > { > struct sk_buff *skb = tx_req->skb; > u64 *mapping = t

Re: [PATCH 3/4] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-28 Thread Yann Droneaud
Hi, Le mardi 27 janvier 2015 à 08:50 +0200, Haggai Eran a écrit : > On 26/01/2015 13:17, Yann Droneaud wrote: > > ... > > Le dimanche 25 janvier 2015 à 17:23 +0200, Haggai Eran a écrit : > >> On 22/01/2015 15:28, Yann Droneaud wrote: > >>> This patch ensu

Re: [PATCH 1/4] IB/uverbs: ex_query_device: fail if output buffer size does not match

2015-01-26 Thread Yann Droneaud
Hi, Le dimanche 25 janvier 2015 à 17:29 +0200, Haggai Eran a écrit : > On 22/01/2015 15:28, Yann Droneaud wrote: > > Instead of silently truncating extended QUERY_DEVICE uverb's > > response, see commit 5a77abf9a97a ("IB/core: Add support for > > extended query d

Re: [PATCH 3/4] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-26 Thread Yann Droneaud
git/torvalds/linux.git/tree/include/uapi/rdma/ib_user_verbs.h?id=v3.19-rc6 [4] http://mid.gmane.org/cover.1421931555.git.ydrone...@opteya.com ) Le dimanche 25 janvier 2015 à 17:23 +0200, Haggai Eran a écrit : > On 22/01/2015 15:28, Yann Droneaud wrote: > > This patch ensures the extended

[PATCH 1/4] IB/uverbs: ex_query_device: fail if output buffer size does not match

2015-01-22 Thread Yann Droneaud
e is not taken in account. Both point must be taken in account when extending the uverbs functionalities. Link: http://mid.gmane.org/cover.1421931555.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud --- drivers/infiniba

[PATCH 3/4] IB/uverbs: ex_query_device: check request's comp_mask

2015-01-22 Thread Yann Droneaud
nse data structures where fields are added after the current ones when expanded to support a new feature. Link: http://mid.gmane.org/cover.1421931555.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud --- drivers/infinib

[PATCH 4/4] IB/uverbs: ex_query_device: no need to clear the whole structure

2015-01-22 Thread Yann Droneaud
As only the requested fields are set and copied to userspace, there's no need to clear the content of the response structure beforehand. Link: http://mid.gmane.org/cover.1421931555.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by:

[PATCH 2/4] IB/core: ib_copy_to_udata(): don't silently truncate response

2015-01-22 Thread Yann Droneaud
eck output length" http://mid.gmane.org/d27716a3a1c180f832d153a7402f65ea8a75b734.1376847403.git.ydrone...@opteya.com Link: http://mid.gmane.org/cover.1421931555.git.ydrone...@opteya.com Cc: Sagi Grimberg Cc: Shachar Raindel Cc: Eli Cohen Cc: Haggai Eran Signed-off-by: Yann Droneaud -

[PATCH 0/4] IB/core: extended query device caps cleanup for v3.19

2015-01-22 Thread Yann Droneaud
[1] http://mid.gmane.org/1418733236.2779.26.ca...@opteya.com Yann Droneaud (4): IB/uverbs: ex_query_device: fail if output buffer size does not match IB/core: ib_copy_to_udata(): don't silently truncate response IB/uverbs: ex_query_device: check request's comp_mask IB/uverbs: ex_quer

Re: [PATCH v3 06/17] IB/core: Add support for extended query device caps

2015-01-21 Thread Yann Droneaud
Hi, Le mercredi 17 décembre 2014 à 16:12 +0200, Haggai Eran a écrit : > On 17/12/2014 16:00, Yann Droneaud wrote: > > Le mercredi 17 décembre 2014 à 08:54 +0200, Haggai Eran a écrit : > >> On 16/12/2014 14:33, Yann Droneaud wrote: > >>> Le jeudi 11 décembre 2014 à 17

Re: [PATCH v3 06/17] IB/core: Add support for extended query device caps

2015-01-21 Thread Yann Droneaud
Hi, Le mardi 16 décembre 2014 à 21:14 +0100, Yann Droneaud a écrit : > Le mardi 16 décembre 2014 à 22:07 +0200, Or Gerlitz a écrit : > > On Tue, Dec 16, 2014 at 7:41 PM, Roland Dreier wrote: > > > On Tue, Dec 16, 2014 at 4:33 AM, Yann Droneaud > > > wrote: >

Re: [PATCH v3 06/17] IB/core: Add support for extended query device caps

2014-12-17 Thread Yann Droneaud
Hi, Le mercredi 17 décembre 2014 à 08:54 +0200, Haggai Eran a écrit : > On 16/12/2014 14:33, Yann Droneaud wrote: > > Le jeudi 11 décembre 2014 à 17:04 +0200, Haggai Eran a écrit : > >> static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, > >> size_t

Re: [PATCH v3 06/17] IB/core: Add support for extended query device caps

2014-12-16 Thread Yann Droneaud
Hi, Le mardi 16 décembre 2014 à 22:07 +0200, Or Gerlitz a écrit : > On Tue, Dec 16, 2014 at 7:41 PM, Roland Dreier wrote: > > On Tue, Dec 16, 2014 at 4:33 AM, Yann Droneaud wrote: > >> > >> With the suggested change here, buffer overflow won't happen, > &

Re: [PATCH v3 06/17] IB/core: Add support for extended query device caps

2014-12-16 Thread Yann Droneaud
ssing the correct buffer / size for all others uverb calls. That cannot work that way. In a previous patchset [1], I've suggested to add a check in ib_copy_{from,to}_udata()[2][3] in order to check the input/output buffer size to not read/write past userspace provided buffer boundaries: in case of mi

Re: [PATCH v3 07/17] IB/core: Add flags for on demand paging support

2014-12-16 Thread Yann Droneaud
Le mardi 16 décembre 2014 à 13:02 +0100, Yann Droneaud a écrit : > Le jeudi 11 décembre 2014 à 17:04 +0200, Haggai Eran a écrit : > > From: Sagi Grimberg > > > > * Add a configuration option for enable on-demand paging support in the > > infiniband subsystem (CONFIG_

Re: [PATCH v3 07/17] IB/core: Add flags for on demand paging support

2014-12-16 Thread Yann Droneaud
}; > > +enum { > + IB_USER_VERBS_EX_QUERY_DEVICE_ODP = 1ULL << 0, > +}; > + > struct ib_uverbs_ex_query_device { > __u32 comp_mask; > __u32 reserved; > }; > > +struct ib_uverbs_odp_caps { > + __u64 general_caps; > + stru

Re: [PATCH v2 04/17] IB/core: Add umem function to read data from user-space

2014-12-11 Thread Yann Droneaud
Hi Or, Le jeudi 11 décembre 2014 à 15:09 +0200, Or Gerlitz a écrit : > On Thu, Dec 11, 2014 at 2:39 PM, Yann Droneaud wrote: > > BTW, ib_copy_from_udata() is defined as an inline function. Would it be > > better to have ib_umem_copy_from() being an inline function too ? >

Re: [PATCH v2 04/17] IB/core: Add umem function to read data from user-space

2014-12-11 Thread Yann Droneaud
Le jeudi 11 décembre 2014 à 13:09 +0200, Haggai Eran a écrit : > On 10/12/2014 18:22, Yann Droneaud wrote: > > Hi, > > > > Le mardi 11 novembre 2014 à 18:36 +0200, Haggai Eran a écrit : > >> In some drivers there's a need to read data from a user space area

Re: [PATCH v2 04/17] IB/core: Add umem function to read data from user-space

2014-12-10 Thread Yann Droneaud
Hi, Le mardi 11 novembre 2014 à 18:36 +0200, Haggai Eran a écrit : > In some drivers there's a need to read data from a user space area that > was pinned using ib_umem, when running from a different process context. > > The ib_umem_copy_from function allows reading data from the physical pages >

Re: [PATCH v2 06/17] IB/core: Add support for extended query device caps

2014-12-10 Thread Yann Droneaud
ser_verbs.h > b/include/uapi/rdma/ib_user_verbs.h > index 26daf55ff76e..ed8c3d9da42c 100644 > --- a/include/uapi/rdma/ib_user_verbs.h > +++ b/include/uapi/rdma/ib_user_verbs.h > @@ -90,8 +90,9 @@ enum { > }; > > enum { > + IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_

Re: [PATCH v2 06/17] IB/core: Add support for extended query device caps

2014-12-10 Thread Yann Droneaud
scheme, in commit f21519b23c1b ('IB/core: extended command: an improved infrastructure for uverbs commands'), I've put the extended commands in a different namespace, with the idea we could later convert non-extended commands to extended ones and phase out the older ABI in the fut

  1   2   3   4   5   >