Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Martin Fäcknitz 8553099bdb MIPS: vdso: Invalid GIC access through VDSO
[ Upstream commit 47ce8527fbba145a7723685bc9a27d9855e06491 ]

Accessing raw timers (currently only CLOCK_MONOTONIC_RAW) through VDSO
doesn't return the correct time when using the GIC as clock source.
The address of the GIC mapped page is in this case not calculated
correctly. The GIC mapped page is calculated from the VDSO data by
subtracting PAGE_SIZE:

  void *get_gic(const struct vdso_data *data) {
    return (void __iomem *)data - PAGE_SIZE;
  }

However, the data pointer is not page aligned for raw clock sources.
This is because the VDSO data for raw clock sources (CS_RAW = 1) is
stored after the VDSO data for coarse clock sources (CS_HRES_COARSE = 0).
Therefore, only the VDSO data for CS_HRES_COARSE is page aligned:

  +--------------------+
  |                    |
  | vd[CS_RAW]         | ---+
  | vd[CS_HRES_COARSE] |    |
  +--------------------+    | -PAGE_SIZE
  |                    |    |
  |  GIC mapped page   | <--+
  |                    |
  +--------------------+

When __arch_get_hw_counter() is called with &vd[CS_RAW], get_gic returns
the wrong address (somewhere inside the GIC mapped page). The GIC counter
values are not returned which results in an invalid time.

Fixes: a7f4df4e21 ("MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()")
Signed-off-by: Martin Fäcknitz <faecknitz@hotsplots.de>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:16:15 +02:00
arch MIPS: vdso: Invalid GIC access through VDSO 2021-07-20 16:16:15 +02:00
block blk-wbt: make sure throttle is enabled properly 2021-07-20 16:15:48 +02:00
certs certs: Fix blacklist flag type confusion 2021-03-04 09:39:44 +01:00
crypto crypto: shash - avoid comparing pointers to exported functions under CFI 2021-07-20 16:15:44 +02:00
Documentation clocksource: Retry clock read if long delays detected 2021-07-20 16:15:46 +02:00
drivers scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe() 2021-07-20 16:16:15 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times 2021-07-20 16:16:13 +02:00
include NFS: nfs_find_open_context() may only select open files 2021-07-20 16:16:11 +02:00
init pid: take a reference when initializing cad_pid 2021-06-10 13:24:06 +02:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-05-20 08:18:40 +02:00
kernel tracing: Do not reference char * as a string in histograms 2021-07-20 16:16:07 +02:00
lib lib/decompress_unlz4.c: correctly handle zero-padding around initrds. 2021-07-20 16:16:10 +02:00
LICENSES
mm bdi: Do not use freezable workqueue 2021-07-20 16:16:03 +02:00
net sctp: add size validation when walking chunks 2021-07-20 16:16:03 +02:00
samples samples/bpf: Fix the error return code of xdp_redirect's main() 2021-07-20 16:15:51 +02:00
scripts scripts: switch explicitly to Python 3 2021-05-22 10:59:50 +02:00
security smackfs: restrict bytes count in smk_set_cipso() 2021-07-20 16:16:06 +02:00
sound ALSA: isa: Fix error return code in snd_cmi8330_probe() 2021-07-20 16:16:13 +02:00
tools selftests/powerpc: Fix "no_handler" EBB selftest 2021-07-20 16:16:09 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm/arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST read 2021-06-30 08:48:27 -04:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Documentation/llvm: add documentation on building w/ Clang/LLVM 2020-09-26 18:01:31 +02:00
Makefile Linux 4.19.197 2021-07-11 12:49:32 +02:00
README

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

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

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.