mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: add speculative barrier
Data can be speculativerly stored and code flow can be hijacked. To mitigate this problem insert a speculation barrier. Bug 200447167 Change-Id: Ia865ff2add8b30de49aa970715625b13e8f71c08 Signed-off-by: Ranjanikar Nikhil Prabhakarrao <rprabhakarra@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1972221 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
001dbdb2fc
commit
f0762ed483
@@ -217,6 +217,7 @@ static int nvgpu_submit_append_gpfifo_user_direct(struct channel_gk20a *c,
|
||||
u32 end = start + len; /* exclusive */
|
||||
int err;
|
||||
|
||||
nvgpu_speculation_barrier();
|
||||
if (end > gpfifo_size) {
|
||||
/* wrap-around */
|
||||
u32 length0 = gpfifo_size - start;
|
||||
|
||||
Reference in New Issue
Block a user