diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-09 16:12:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-09 16:12:47 -0500 |
commit | b64bb1d758163814687eb3b84d74e56f04d0c9d1 (patch) | |
tree | 59f1db8b718e98d13c6cf9d3486221cfff6e7eef /include | |
parent | 50569687e9c688a8688982805be6d8e3c8879042 (diff) | |
parent | eb8a653137b7e74f7cdc01f814eb9d094a65aed9 (diff) |
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Will Deacon:
"Here's the usual mixed bag of arm64 updates, also including some
related EFI changes (Acked by Matt) and the MMU gather range cleanup
(Acked by you).
Changes include:
- support for alternative instruction patching from Andre
- seccomp from Akashi
- some AArch32 instruction emulation, required by the Android folks
- optimisations for exception entry/exit code, cmpxchg, pcpu atomics
- mmu_gather range calculations moved into core code
- EFI updates from Ard, including long-awaited SMBIOS support
- /proc/cpuinfo fixes to align with the format used by arch/arm/
- a few non-critical fixes across the architecture"
* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (70 commits)
arm64: remove the unnecessary arm64_swiotlb_init()
arm64: add module support for alternatives fixups
arm64: perf: Prevent wraparound during overflow
arm64/include/asm: Fixed a warning about 'struct pt_regs'
arm64: Provide a namespace to NCAPS
arm64: bpf: lift restriction on last instruction
arm64: Implement support for read-mostly sections
arm64: compat: align cacheflush syscall with arch/arm
arm64: add seccomp support
arm64: add SIGSYS siginfo for compat task
arm64: add seccomp syscall for compat task
asm-generic: add generic seccomp.h for secure computing mode 1
arm64: ptrace: allow tracer to skip a system call
arm64: ptrace: add NT_ARM_SYSTEM_CALL regset
arm64: Move some head.text functions to executable section
arm64: jump labels: NOP out NOP -> NOP replacement
arm64: add support to dump the kernel page tables
arm64: Add FIX_HOLE to permanent fixed addresses
arm64: alternatives: fix pr_fmt string for consistency
arm64: vmlinux.lds.S: don't discard .exit.* sections at link-time
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/seccomp.h | 30 | ||||
-rw-r--r-- | include/asm-generic/tlb.h | 57 | ||||
-rw-r--r-- | include/linux/efi.h | 6 | ||||
-rw-r--r-- | include/uapi/linux/elf.h | 1 |
4 files changed, 83 insertions, 11 deletions
diff --git a/include/asm-generic/seccomp.h b/include/asm-generic/seccomp.h new file mode 100644 index 000000000000..9fa1f653ed3b --- /dev/null +++ b/include/asm-generic/seccomp.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * include/asm-generic/seccomp.h | ||
3 | * | ||
4 | * Copyright (C) 2014 Linaro Limited | ||
5 | * Author: AKASHI Takahiro <takahiro.akashi@linaro.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASM_GENERIC_SECCOMP_H | ||
12 | #define _ASM_GENERIC_SECCOMP_H | ||
13 | |||
14 | #include <linux/unistd.h> | ||
15 | |||
16 | #if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32) | ||
17 | #define __NR_seccomp_read_32 __NR_read | ||
18 | #define __NR_seccomp_write_32 __NR_write | ||
19 | #define __NR_seccomp_exit_32 __NR_exit | ||
20 | #define __NR_seccomp_sigreturn_32 __NR_rt_sigreturn | ||
21 | #endif /* CONFIG_COMPAT && ! already defined */ | ||
22 | |||
23 | #define __NR_seccomp_read __NR_read | ||
24 | #define __NR_seccomp_write __NR_write | ||
25 | #define __NR_seccomp_exit __NR_exit | ||
26 | #ifndef __NR_seccomp_sigreturn | ||
27 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
28 | #endif | ||
29 | |||
30 | #endif /* _ASM_GENERIC_SECCOMP_H */ | ||
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 5672d7ea1fa0..08848050922e 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -96,10 +96,9 @@ struct mmu_gather { | |||
96 | #endif | 96 | #endif |
97 | unsigned long start; | 97 | unsigned long start; |
98 | unsigned long end; | 98 | unsigned long end; |
99 | unsigned int need_flush : 1, /* Did free PTEs */ | ||
100 | /* we are in the middle of an operation to clear | 99 | /* we are in the middle of an operation to clear |
101 | * a full mm and can make some optimizations */ | 100 | * a full mm and can make some optimizations */ |
102 | fullmm : 1, | 101 | unsigned int fullmm : 1, |
103 | /* we have performed an operation which | 102 | /* we have performed an operation which |
104 | * requires a complete flush of the tlb */ | 103 | * requires a complete flush of the tlb */ |
105 | need_flush_all : 1; | 104 | need_flush_all : 1; |
@@ -128,16 +127,54 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
128 | tlb_flush_mmu(tlb); | 127 | tlb_flush_mmu(tlb); |
129 | } | 128 | } |
130 | 129 | ||
130 | static inline void __tlb_adjust_range(struct mmu_gather *tlb, | ||
131 | unsigned long address) | ||
132 | { | ||
133 | tlb->start = min(tlb->start, address); | ||
134 | tlb->end = max(tlb->end, address + PAGE_SIZE); | ||
135 | } | ||
136 | |||
137 | static inline void __tlb_reset_range(struct mmu_gather *tlb) | ||
138 | { | ||
139 | tlb->start = TASK_SIZE; | ||
140 | tlb->end = 0; | ||
141 | } | ||
142 | |||
143 | /* | ||
144 | * In the case of tlb vma handling, we can optimise these away in the | ||
145 | * case where we're doing a full MM flush. When we're doing a munmap, | ||
146 | * the vmas are adjusted to only cover the region to be torn down. | ||
147 | */ | ||
148 | #ifndef tlb_start_vma | ||
149 | #define tlb_start_vma(tlb, vma) do { } while (0) | ||
150 | #endif | ||
151 | |||
152 | #define __tlb_end_vma(tlb, vma) \ | ||
153 | do { \ | ||
154 | if (!tlb->fullmm && tlb->end) { \ | ||
155 | tlb_flush(tlb); \ | ||
156 | __tlb_reset_range(tlb); \ | ||
157 | } \ | ||
158 | } while (0) | ||
159 | |||
160 | #ifndef tlb_end_vma | ||
161 | #define tlb_end_vma __tlb_end_vma | ||
162 | #endif | ||
163 | |||
164 | #ifndef __tlb_remove_tlb_entry | ||
165 | #define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0) | ||
166 | #endif | ||
167 | |||
131 | /** | 168 | /** |
132 | * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation. | 169 | * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation. |
133 | * | 170 | * |
134 | * Record the fact that pte's were really umapped in ->need_flush, so we can | 171 | * Record the fact that pte's were really unmapped by updating the range, |
135 | * later optimise away the tlb invalidate. This helps when userspace is | 172 | * so we can later optimise away the tlb invalidate. This helps when |
136 | * unmapping already-unmapped pages, which happens quite a lot. | 173 | * userspace is unmapping already-unmapped pages, which happens quite a lot. |
137 | */ | 174 | */ |
138 | #define tlb_remove_tlb_entry(tlb, ptep, address) \ | 175 | #define tlb_remove_tlb_entry(tlb, ptep, address) \ |
139 | do { \ | 176 | do { \ |
140 | tlb->need_flush = 1; \ | 177 | __tlb_adjust_range(tlb, address); \ |
141 | __tlb_remove_tlb_entry(tlb, ptep, address); \ | 178 | __tlb_remove_tlb_entry(tlb, ptep, address); \ |
142 | } while (0) | 179 | } while (0) |
143 | 180 | ||
@@ -151,27 +188,27 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
151 | 188 | ||
152 | #define tlb_remove_pmd_tlb_entry(tlb, pmdp, address) \ | 189 | #define tlb_remove_pmd_tlb_entry(tlb, pmdp, address) \ |
153 | do { \ | 190 | do { \ |
154 | tlb->need_flush = 1; \ | 191 | __tlb_adjust_range(tlb, address); \ |
155 | __tlb_remove_pmd_tlb_entry(tlb, pmdp, address); \ | 192 | __tlb_remove_pmd_tlb_entry(tlb, pmdp, address); \ |
156 | } while (0) | 193 | } while (0) |
157 | 194 | ||
158 | #define pte_free_tlb(tlb, ptep, address) \ | 195 | #define pte_free_tlb(tlb, ptep, address) \ |
159 | do { \ | 196 | do { \ |
160 | tlb->need_flush = 1; \ | 197 | __tlb_adjust_range(tlb, address); \ |
161 | __pte_free_tlb(tlb, ptep, address); \ | 198 | __pte_free_tlb(tlb, ptep, address); \ |
162 | } while (0) | 199 | } while (0) |
163 | 200 | ||
164 | #ifndef __ARCH_HAS_4LEVEL_HACK | 201 | #ifndef __ARCH_HAS_4LEVEL_HACK |
165 | #define pud_free_tlb(tlb, pudp, address) \ | 202 | #define pud_free_tlb(tlb, pudp, address) \ |
166 | do { \ | 203 | do { \ |
167 | tlb->need_flush = 1; \ | 204 | __tlb_adjust_range(tlb, address); \ |
168 | __pud_free_tlb(tlb, pudp, address); \ | 205 | __pud_free_tlb(tlb, pudp, address); \ |
169 | } while (0) | 206 | } while (0) |
170 | #endif | 207 | #endif |
171 | 208 | ||
172 | #define pmd_free_tlb(tlb, pmdp, address) \ | 209 | #define pmd_free_tlb(tlb, pmdp, address) \ |
173 | do { \ | 210 | do { \ |
174 | tlb->need_flush = 1; \ | 211 | __tlb_adjust_range(tlb, address); \ |
175 | __pmd_free_tlb(tlb, pmdp, address); \ | 212 | __pmd_free_tlb(tlb, pmdp, address); \ |
176 | } while (0) | 213 | } while (0) |
177 | 214 | ||
diff --git a/include/linux/efi.h b/include/linux/efi.h index 0949f9c7e872..0238d612750e 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -547,6 +547,9 @@ void efi_native_runtime_setup(void); | |||
547 | #define SMBIOS_TABLE_GUID \ | 547 | #define SMBIOS_TABLE_GUID \ |
548 | EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) | 548 | EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) |
549 | 549 | ||
550 | #define SMBIOS3_TABLE_GUID \ | ||
551 | EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 ) | ||
552 | |||
550 | #define SAL_SYSTEM_TABLE_GUID \ | 553 | #define SAL_SYSTEM_TABLE_GUID \ |
551 | EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) | 554 | EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) |
552 | 555 | ||
@@ -810,7 +813,8 @@ extern struct efi { | |||
810 | unsigned long mps; /* MPS table */ | 813 | unsigned long mps; /* MPS table */ |
811 | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ | 814 | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ |
812 | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ | 815 | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ |
813 | unsigned long smbios; /* SM BIOS table */ | 816 | unsigned long smbios; /* SMBIOS table (32 bit entry point) */ |
817 | unsigned long smbios3; /* SMBIOS table (64 bit entry point) */ | ||
814 | unsigned long sal_systab; /* SAL system table */ | 818 | unsigned long sal_systab; /* SAL system table */ |
815 | unsigned long boot_info; /* boot info table */ | 819 | unsigned long boot_info; /* boot info table */ |
816 | unsigned long hcdp; /* HCDP table */ | 820 | unsigned long hcdp; /* HCDP table */ |
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index ea9bf2561b9e..71e1d0ed92f7 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h | |||
@@ -397,6 +397,7 @@ typedef struct elf64_shdr { | |||
397 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ | 397 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ |
398 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ | 398 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ |
399 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | 399 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ |
400 | #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ | ||
400 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ | 401 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ |
401 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ | 402 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ |
402 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ | 403 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ |