From 2a9431bbe008d9d6bcd10113341e4106cb3e564a Mon Sep 17 00:00:00 2001 From: Aparna Das Date: Mon, 5 Feb 2018 12:36:11 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1652230 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 46f5ffb5..0d7a3f4d 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c @@ -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; -- cgit v1.2.2