Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Rasmus Villemoes bee00a7b7a
BACKPORT: build_bug.h: add wrapper for _Static_assert
commit 6bab69c65013bed5fce9f101a64a84d0385b3946 upstream.

BUILD_BUG_ON() is a little annoying, since it cannot be used outside
function scope.  So one cannot put assertions about the sizeof() a
struct next to the struct definition, but has to hide that in some more
or less arbitrary function.

Since gcc 4.6 (which is now also the required minimum), there is support
for the C11 _Static_assert in all C modes, including gnu89.  So add a
simple wrapper for that.

_Static_assert() requires a message argument, which is usually quite
redundant (and I believe that bug got fixed at least in newer C++
standards), but we can easily work around that with a little macro
magic, making it optional.

For example, adding

  static_assert(sizeof(struct printf_spec) == 8);

in vsprintf.c and modifying that struct to violate it, one gets

./include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct printf_spec) == 8"
 #define __static_assert(expr, msg, ...) _Static_assert(expr, "" msg "")

godbolt.org suggests that _Static_assert() has been support by clang
since at least 3.0.0.

Link: http://lkml.kernel.org/r/20190208203015.29702-1-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Michael Bestas <mkbestas@lineageos.org>
Change-Id: Ifd37e39a989af30ceda1c7882bdd3dcdb58508aa
2024-01-06 18:53:38 +02:00
android Reapply "perf: Disallow mis-matched inherited group reads" 2023-11-03 15:43:52 +00:00
arch Merge tag 'LA.UM.9.12.r1-17900.03-SMxx50.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.19 into android13-4.19-kona 2024-01-04 12:36:13 +02:00
block Squashed revert of recent blk-mq changes 2023-12-14 13:15:09 +02:00
certs Merge tag 'ASB-2022-08-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2022-11-24 03:17:53 +02:00
crypto Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
Documentation Merge tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-09-19 18:11:03 +03:00
drivers Merge tag 'LA.UM.9.12.r1-17900.03-SMxx50.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.19 into android13-4.19-kona 2024-01-04 12:36:13 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
include BACKPORT: build_bug.h: add wrapper for _Static_assert 2024-01-06 18:53:38 +02:00
init Merge tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-09-19 18:11:03 +03:00
ipc Merge tag 'ASB-2022-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2022-12-15 21:06:13 +02:00
kernel Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
lib kernel: Add CC_WERROR config to turn warnings into errors 2023-12-22 23:09:07 +00:00
LICENSES LICENSES: Add ISC license text 2019-01-10 17:22:01 +02:00
mm Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
net Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
samples This is the 4.19.291 stable release 2023-08-25 11:24:56 +00:00
scripts Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
security Merge tag 'ASB-2023-11-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-11-09 14:55:01 +02:00
sound Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
techpack Merge tag 'LA.UM.9.12.r1-17900.03-SMxx50.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver into android13-4.19-kona 2024-01-04 12:45:33 +02:00
tools This is the 4.19.300 stable release 2023-11-30 09:36:03 +00:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt Merge tag 'ASB-2022-11-01_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2022-11-24 03:35:09 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore headers_lib: rename Android.bp 2022-11-20 19:48:48 +02:00
.mailmap
Android.mk Android: Add empty Android.mk file 2022-11-20 19:48:44 +02:00
Androidbp headers_lib: rename Android.bp 2022-11-20 19:48:48 +02:00
AndroidKernel.mk AndroidKernel: add TARGET_PREBUILT_INT_KERNEL_IMAGE 2019-08-02 20:31:09 +08:00
build.config.aarch64 ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for aarch64 2021-01-11 17:34:43 -08:00
build.config.allmodconfig ANDROID: Different fix for KABI breakage in 4.19.209 in struct sock 2021-10-11 19:44:01 +00:00
build.config.allmodconfig.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.arm ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.arm Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.common ANDROID: clang: update to 12.0.5 2021-04-19 19:40:51 +00:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki-debug.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki.aarch64 ANDROID: GKI: prevent removal of monitored symbols 2020-09-29 11:48:43 +01:00
build.config.gki.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan ANDROID: build_config: drop CONFIG_KASAN_PANIC_ON_WARN 2021-02-15 18:29:34 +00:00
build.config.gki_kasan.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kprobes ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki_kprobes.aarch64 ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki_kprobes.x86_64 ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.goldfish.arm
build.config.goldfish.arm64
build.config.goldfish.mips
build.config.goldfish.mips64
build.config.goldfish.x86
build.config.goldfish.x86_64
build.config.x86_64 Revert "Revert "ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for x86_64"" 2021-02-03 13:34:51 -08:00
COPYING
CREDITS
gen_headers_arm.bp uapi: Add UAPI headers for slatecom_interface driver 2021-09-08 04:43:44 -07:00
gen_headers_arm64.bp uapi: Add UAPI headers for slatecom_interface driver 2021-09-08 04:43:44 -07:00
Kbuild
Kconfig techpack: Integrate Qualcomm data-kernel package 2022-11-20 20:11:12 +02:00
kernel_headers.py Change the subprocess argument to fix the build issue 2021-06-28 16:47:30 +05:30
MAINTAINERS Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona 2023-12-14 13:13:51 +02:00
Makefile kernel: Add CC_WERROR config to turn warnings into errors 2023-12-22 23:09:07 +00:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:09:44 +00:00
README
verity_dev_keys.x509 x86_64_cuttlefish_defconfig: enable verity cert 2018-08-28 17:15:17 +05:30

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.