mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add speculative load barrier (ctrl IOCTLs)
Data can be speculatively loaded from memory and stay in cache even when bound check fails. This can lead to unintended information disclosure via side-channel analysis. To mitigate this problem insert a speculation barrier. bug 2041355 Change-Id: I03fbc81c105632e788d8a0f97fb4e233d1124b49 Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1652230 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9402f4165b
commit
2a9431bbe0
@@ -956,6 +956,8 @@ int gr_gv11b_zbc_s_query_table(struct gk20a *g, struct gr_gk20a *gr,
|
||||
nvgpu_err(g, "invalid zbc stencil table index");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
nvgpu_speculation_barrier();
|
||||
query_params->depth = gr->zbc_s_tbl[index].stencil;
|
||||
query_params->format = gr->zbc_s_tbl[index].format;
|
||||
query_params->ref_cnt = gr->zbc_s_tbl[index].ref_cnt;
|
||||
|
||||
Reference in New Issue
Block a user