]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
arm64: Add ASM_BUG()
authorMark Rutland <mark.rutland@arm.com>
Wed, 26 Jul 2017 13:41:40 +0000 (14:41 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 7 Mar 2018 11:07:05 +0000 (12:07 +0100)
commitfeed4f8926298a0e00fca94d4d37c05f6b78981f
treebc3e2c9b52ede222b9a94a6210327ba33c929da6
parent9f6810a2bf6f4e5310e129f8cbffd9c8f0145286
arm64: Add ASM_BUG()

Currently. we can only use BUG() from C code, though there are
situations where we would like an equivalent mechanism in assembly code.

This patch refactors our BUG() definition such that it can be used in
either C or assembly, in the form of a new ASM_BUG().

The refactoring requires the removal of escape sequences, such as '\n'
and '\t', but these aren't strictly necessary as we can use ';' to
terminate assembler statements.

The low-level assembly is factored out into <asm/asm-bug.h>, with
<asm/bug.h> retained as the C wrapper.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
(cherry picked from commit db44e9c5ecf1b60336ccfc176b07ba7d81d855e0)

CVE-2017-5753
CVE-2017-5715
CVE-2017-5754

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm64/include/asm/asm-bug.h [new file with mode: 0644]
arch/arm64/include/asm/bug.h