Go to file
Sami Tolvanen a566122a8f kbuild: Fix CFI failures with GCOV
[ Upstream commit ddf56288ee ]

With GCOV_PROFILE_ALL, Clang injects __llvm_gcov_* functions to
each object file, and the functions are indirectly called during
boot. However, when code is injected to object files that are not
part of vmlinux.o, it's also not processed by objtool, which breaks
CFI hash randomization as the hashes in these files won't be
included in the .cfi_sites section and thus won't be randomized.

Similarly to commit 42633ed852 ("kbuild: Fix CFI hash
randomization with KASAN"), disable GCOV for .vmlinux.export.o and
init/version-timestamp.o to avoid emitting unnecessary functions to
object files that don't otherwise have executable code.

Fixes: 0c3e806ec0 ("x86/cfi: Add boot time hash randomization")
Reported-by: Joe Fradley <joefradley@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-11 19:39:50 +02:00
Documentation
LICENSES
arch ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-11 19:39:49 +02:00
block
certs
crypto crypto: jitter - correct health test during initialization 2023-07-11 19:39:49 +02:00
drivers hwrng: st - keep clock enabled while hwrng is registered 2023-07-11 19:39:50 +02:00
fs SMB3: Do not send lease break acknowledgment if all file handles have been closed 2023-07-11 19:39:50 +02:00
include scsi: ufs: core: mcq: Fix the incorrect OCS value for the device command 2023-07-11 19:39:48 +02:00
init kbuild: Fix CFI failures with GCOV 2023-07-11 19:39:50 +02:00
io_uring
ipc
kernel kcsan: Don't expect 64 bits atomic builtins from 32 bits architectures 2023-07-11 19:39:47 +02:00
lib
mm
net
rust
samples
scripts kbuild: Fix CFI failures with GCOV 2023-07-11 19:39:50 +02:00
security
sound
tools perf test: Set PERF_EXEC_PATH for script execution 2023-07-11 19:39:49 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

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.

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.