Fork of alistair23 Linux kernel for reMarkable from https://github.com/alistair23/linux
Go to file
Nick Desaulniers a194c33f45 arm64: acpi: fix UBSAN warning
Will reported a UBSAN warning:

UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6
member access within null pointer of type 'struct acpi_madt_generic_interrupt'
CPU: 0 PID: 0 Comm: swapper Not tainted 5.7.0-rc6-00124-g96bc42ff0a82 #1
Call trace:
 dump_backtrace+0x0/0x384
 show_stack+0x28/0x38
 dump_stack+0xec/0x174
 handle_null_ptr_deref+0x134/0x174
 __ubsan_handle_type_mismatch_v1+0x84/0xa4
 acpi_parse_gic_cpu_interface+0x60/0xe8
 acpi_parse_entries_array+0x288/0x498
 acpi_table_parse_entries_array+0x178/0x1b4
 acpi_table_parse_madt+0xa4/0x110
 acpi_parse_and_init_cpus+0x38/0x100
 smp_init_cpus+0x74/0x258
 setup_arch+0x350/0x3ec
 start_kernel+0x98/0x6f4

This is from the use of the ACPI_OFFSET in
arch/arm64/include/asm/acpi.h. Replace its use with offsetof from
include/linux/stddef.h which should implement the same logic using
__builtin_offsetof, so that UBSAN wont warn.

Reported-by: Will Deacon <will@kernel.org>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/lkml/20200521100952.GA5360@willie-the-truck/
Link: https://lore.kernel.org/r/20200608203818.189423-1-ndesaulniers@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-06-10 11:41:08 +01:00
arch arm64: acpi: fix UBSAN warning 2020-06-10 11:41:08 +01:00
block blk-iocost: Fix error on iocost_ioc_vrate_adj 2020-04-21 09:49:36 -06:00
certs .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
crypto x86: update AS_* macros to binutils >=2.23, supporting ADX and AVX2 2020-04-09 00:12:48 +09:00
Documentation Merge branch 'for-next/bti' into for-next/core 2020-05-28 18:00:51 +01:00
drivers drivers/perf: hisi: Fix wrong value for all counters enable 2020-06-08 15:46:41 +01:00
fs Merge branch 'for-next/scs' into for-next/core 2020-05-28 18:03:40 +01:00
include Merge branch 'for-next/scs' into for-next/core 2020-05-28 18:03:40 +01:00
init scs: Add support for Clang's Shadow Call Stack (SCS) 2020-05-15 16:35:45 +01:00
ipc ipc/util.c: sysvipc_find_ipc() should increase position index 2020-04-10 15:36:22 -07:00
kernel scs: Report SCS usage in bytes rather than number of entries 2020-06-04 16:14:56 +01:00
lib Merge branch 'x86/asm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-next/asm 2020-04-30 17:39:42 +01:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
mm scs: Add page accounting for shadow call stack allocations 2020-05-15 16:35:49 +01:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-24 19:17:30 -07:00
samples vmalloc: fix remap_vmalloc_range() bounds checks 2020-04-21 11:11:56 -07:00
scripts Kbuild fixes for v5.7 2020-04-24 10:39:32 -07:00
security selinux/stable-5.7 PR 20200416 2020-04-16 10:45:47 -07:00
sound sound fixes for 5.7-rc3 2020-04-24 10:27:43 -07:00
tools Merge branch 'x86/asm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-next/asm 2020-04-30 17:39:42 +01:00
usr kbuild: fix comment about missing include guard detection 2020-04-11 12:09:48 +09:00
virt KVM: arm64: Check advertised Stage-2 page size capability 2020-05-28 17:28:51 +01:00
.clang-format clang-format: Update with the latest for_each macro list 2020-04-18 13:49:33 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.mailmap mailmap: Add Sedat Dilek (replacement for expired email address) 2020-04-11 09:28:34 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Hand MIPS over to Thomas 2020-02-24 22:43:18 -08:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS firmware: smccc: Refactor SMCCC specific bits into separate file 2020-05-20 19:10:37 +01:00
Makefile scs: Add support for Clang's Shadow Call Stack (SCS) 2020-05-15 16:35:45 +01:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

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.