Skip to contentSkip to conversation

kernel space iWARP broken with CONFIG_SECURITY_INFINIBAND enabled

DISCUSSION Potnuri Bharat Teja 2 participants 4 messages Nov 15, 2017 – Nov 16, 2017 3 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

Hi all,
With CONFIG_SECURITY_INFINIBAND kernel config option enabled iWARP kernel space applications are failing at rdma_create_qp(). Apparantly SELinux support for Infiniband RDMA caused this regression.

Here is the failure with NVMEof discovery:

[  129.294943] nvme nvme0: rdma_resolve_addr wait failed (-22).

Failure is at ib_get_cached_pkey(), for invalid pkey_index, called by the following call chain:
rdma_create_qp()-> cma_init_conn_qp()-> ib_modify_qp()-> ib_security_modify_qp()-> check_qp_port_pkey_settings()-> get_pkey_and_subnet_prefix()

SELinux support for Infiniband RDMA:
https://www.spinics.net/lists/linux-rdma/msg38705.html

I am trying to understand how IB security enforcing works with iWARP.

Quoted 1 line

From the commit messages these appears to be an IB specific changes.

If true, how is iw_cm supposed to handle it?
iWARP doesn't use or have partition keys (pkey), How is this handled by the IB security enforcing changes?

Thanks,
Bharat.

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 17 lines · Potnuri Bharat Teja

Hi all,
With CONFIG_SECURITY_INFINIBAND kernel config option enabled iWARP kernel space applications are failing at rdma_create_qp(). Apparantly SELinux support for Infiniband RDMA caused this regression.

Here is the failure with NVMEof discovery:

[  129.294943] nvme nvme0: rdma_resolve_addr wait failed (-22).

Failure is at ib_get_cached_pkey(), for invalid pkey_index, called by the following call chain:
rdma_create_qp()-> cma_init_conn_qp()-> ib_modify_qp()-> ib_security_modify_qp()-> check_qp_port_pkey_settings()-> get_pkey_and_subnet_prefix()

SELinux support for Infiniband RDMA:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Flinux-rdma%2Fmsg38705.html&data=02%7C01%7Cdanielj%40mellanox.com%7C562dfe4029994b668c8808d52c2af77a%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636463485413049982&sdata=zjyS9aC9I2vRRxPyrIeLmCAl0Cg3cNJS7Tfz96Fzl%2F4%3D&reserved=0

Quoted 9 lines

I am trying to understand how IB security enforcing works with iWARP. From the commit messages these appears to be an IB specific changes. If true, how is iw_cm supposed to handle it?
iWARP doesn't use or have partition keys (pkey), How is this handled by the IB security enforcing changes?

Thanks,
Bharat.

Thanks Bharat, would you mind testing a patch for me? I don't have any iWARP hardware. I'll send to you it by EOB today.

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

A message that is not in the archive (sent off-list or not yet received): 8ac43c6a-e2d9-572e-b4bf-03cdf3be57a8-VPRAkNaXOzVWk0Htik3J/[email protected]

#4 lore raw
Quoted 24 lines · Daniel Jurgens
Quoted 23 lines · Potnuri Bharat Teja

Hi all,
With CONFIG_SECURITY_INFINIBAND kernel config option enabled iWARP kernel space applications are failing at rdma_create_qp(). Apparantly SELinux support for Infiniband RDMA caused this regression.

Here is the failure with NVMEof discovery:

[  129.294943] nvme nvme0: rdma_resolve_addr wait failed (-22).

Failure is at ib_get_cached_pkey(), for invalid pkey_index, called by the following call chain:
rdma_create_qp()-> cma_init_conn_qp()-> ib_modify_qp()-> ib_security_modify_qp()-> check_qp_port_pkey_settings()-> get_pkey_and_subnet_prefix()

SELinux support for Infiniband RDMA:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Flinux-rdma%2Fmsg38705.html&data=02%7C01%7Cdanielj%40mellanox.com%7C562dfe4029994b668c8808d52c2af77a%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636463485413049982&sdata=zjyS9aC9I2vRRxPyrIeLmCAl0Cg3cNJS7Tfz96Fzl%2F4%3D&reserved=0

I am trying to understand how IB security enforcing works with iWARP. From the commit messages these appears to be an IB specific changes. If true, how is iw_cm supposed to handle it?
iWARP doesn't use or have partition keys (pkey), How is this handled by the IB security enforcing changes?

Quoted 5 lines
Quoted 3 lines

Thanks,
Bharat.

Thanks Bharat, would you mind testing a patch for me? I don't have any iWARP hardware. I'll send to you it by EOB today.

Thanks for the quick patch Daniel.
Tested the patch for iwarp and it fixes the regression. I think this should be marked for stable as well.

Thanks,
Bharat.

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 25 lines · Potnuri Bharat Teja
Quoted 24 lines · Daniel Jurgens
Quoted 23 lines · Potnuri Bharat Teja

Hi all,
With CONFIG_SECURITY_INFINIBAND kernel config option enabled iWARP kernel space applications are failing at rdma_create_qp(). Apparantly SELinux support for Infiniband RDMA caused this regression.

Here is the failure with NVMEof discovery:

[  129.294943] nvme nvme0: rdma_resolve_addr wait failed (-22).

Failure is at ib_get_cached_pkey(), for invalid pkey_index, called by the following call chain:
rdma_create_qp()-> cma_init_conn_qp()-> ib_modify_qp()-> ib_security_modify_qp()-> check_qp_port_pkey_settings()-> get_pkey_and_subnet_prefix()

SELinux support for Infiniband RDMA:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Flinux-rdma%2Fmsg38705.html&data=02%7C01%7Cdanielj%40mellanox.com%7C562dfe4029994b668c8808d52c2af77a%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636463485413049982&sdata=zjyS9aC9I2vRRxPyrIeLmCAl0Cg3cNJS7Tfz96Fzl%2F4%3D&reserved=0

I am trying to understand how IB security enforcing works with iWARP. From the commit messages these appears to be an IB specific changes. If true, how is iw_cm supposed to handle it?
iWARP doesn't use or have partition keys (pkey), How is this handled by the IB security enforcing changes?

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

Thanks,
Bharat.

Thanks Bharat, would you mind testing a patch for me? I don't have any iWARP hardware. I'll send to you it by EOB today.

Thanks for the quick patch Daniel.
Tested the patch for iwarp and it fixes the regression. I think this should be marked for stable as well.

Thanks, Bharat.

Quoted 6 lines

Thanks,
Bharat.

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