Skip to content

Commit a82dadb

Browse files
Ram Amranidavem330
authored andcommitted
qed: Correct doorbell configuration for !4Kb pages
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: 51ff172 ("qed: Add support for RoCE hw init") Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c9f0523 commit a82dadb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qed/qed_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ qed_hw_init_pf_doorbell_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
13701370
NULL) +
13711371
qed_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
13721372
NULL);
1373-
norm_regsize = roundup(QED_PF_DEMS_SIZE * non_pwm_conn, 4096);
1373+
norm_regsize = roundup(QED_PF_DEMS_SIZE * non_pwm_conn, PAGE_SIZE);
13741374
min_addr_reg1 = norm_regsize / 4096;
13751375
pwm_regsize = db_bar_size - norm_regsize;
13761376

0 commit comments

Comments
 (0)