Skip to contentSkip to conversation

Patch "qed: Correct doorbell configuration for !4Kb pages" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 9, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

qed: Correct doorbell configuration for !4Kb pages

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
qed-correct-doorbell-configuration-for-4kb-pages.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Apr 9 17:09:24 CEST 2018

From: Ram Amrani <[email protected]>
Date: Tue, 9 May 2017 15:07:50 +0300
Subject: qed: Correct doorbell configuration for !4Kb pages

From: Ram Amrani <[email protected]>

[ Upstream commit a82dadbce47395747824971db08a128130786fdc ]

When configuring the doorbell DPI address, driver aligns the start address to 4KB [HW-pages] instead of host PAGE_SIZE.
As a result, RoCE applications might receive addresses which are unaligned to pages [when PAGE_SIZE > 4KB], which is a security risk.

Fixes 51ff17251c9c ("qed: Add support for RoCE hw init")
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_dev.c +1 -1
@@ -850,7 +850,7 @@ qed_hw_init_pf_doorbell_bar(struct qed_h
 						   NULL) +
 		       qed_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
 						   NULL);
-	norm_regsize = roundup(QED_PF_DEMS_SIZE * non_pwm_conn, 4096);
+	norm_regsize = roundup(QED_PF_DEMS_SIZE * non_pwm_conn, PAGE_SIZE);
 	min_addr_reg1 = norm_regsize / 4096;
 	pwm_regsize = db_bar_size - norm_regsize;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/qed-correct-doorbell-configuration-for-4kb-pages.patch