No description
Find a file
Tvrtko Ursulin eed39c1918 drm/i915: Flush TLBs before releasing backing store
commit 7938d61591 upstream.

We need to flush TLBs before releasing backing store otherwise userspace
is able to encounter stale entries if a) it is not declaring access to
certain buffers and b) it races with the backing store release from a
such undeclared execution already executing on the GPU in parallel.

The approach taken is to mark any buffer objects which were ever bound
to the GPU and to trigger a serialized TLB flush when their backing
store is released.

Alternatively the flushing could be done on VMA unbind, at which point
we would be able to ascertain whether there is potential a parallel GPU
execution (which could race), but essentially it boils down to paying
the cost of TLB flushes potentially needlessly at VMA unbind time (when
the backing store is not known to be going away so not needed for
safety), versus potentially needlessly at backing store relase time
(since we at that point cannot tell whether there is anything executing
on the GPU which uses that object).

Thereforce simplicity of implementation has been chosen for now with
scope to benchmark and refine later as required.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reported-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-29 10:17:06 +01:00
arch mips,s390,sh,sparc: gup: Work around the "COW can break either way" issue 2022-01-27 09:01:01 +01:00
block block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2) 2021-12-14 10:16:55 +01:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-22 11:45:19 +02:00
crypto crypto: pcrypt - Delay write to padata->info 2021-11-26 11:40:32 +01:00
Documentation Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization 2022-01-27 09:01:00 +01:00
drivers drm/i915: Flush TLBs before releasing backing store 2022-01-29 10:17:06 +01:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs NFSv4: Initialise connection to the server in nfs4_alloc_client() 2022-01-27 09:01:02 +01:00
include net_sched: restore "mpu xxx" handling 2022-01-27 09:01:01 +01:00
init pid: take a reference when initializing cad_pid 2021-06-10 12:43:51 +02:00
ipc ipc: WARN if trying to remove ipc object which is absent 2021-12-08 08:46:53 +01:00
kernel cputime, cpuacct: Include guest time in user time in cpuacct.stat 2022-01-27 09:00:59 +01:00
lib ARM: 8800/1: use choice for kernel unwinders 2021-12-22 09:18:01 +01:00
mm shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode 2022-01-27 09:00:48 +01:00
net net_sched: restore "mpu xxx" handling 2022-01-27 09:01:01 +01:00
samples samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-26 11:40:31 +01:00
scripts scripts/dtc: dtx_diff: remove broken example from help text 2022-01-27 09:01:01 +01:00
security selinux: initialize proto variable in selinux_ip_postroute_compat() 2022-01-05 12:33:48 +01:00
sound ASoC: mediatek: mt8173: fix device_node leak 2022-01-27 09:00:58 +01:00
tools bpf: fix panic due to oob in bpf_prog_test_run_skb 2021-12-22 09:17:58 +01:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped() 2021-08-08 08:53:29 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile Linux 4.14.263 2022-01-27 09:01:02 +01:00
README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.