aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-22 12:08:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-22 12:08:20 -0400
commit26d189b82f403865ec57d1ec0fc145e1916620f4 (patch)
tree4e1a8ec0ceefe17c208f20faa15a24355a5a6291 /arch
parent1ae45cf06cb7a7dcda781d8d00da4888abb21a69 (diff)
parent44b375070fa3defa6bf1010bd0e4e64f7986bfc4 (diff)
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon: "This small set of fixes addresses a few issues introduced during the merge window, including: - fix typo in I-cache detection that was causing us to treat all I-caches as aliasing - hook up memfd_create and getrandom syscalls for native and compat - revert a temporary hack for defconfig builds in -next (the audit tree changes didn't make it in this merge window) - a couple of UEFI fixes for TEXT_OFFSET fuzzing and /memreserve/ - a simple sparsemem fix for 48-bit physical addressing - small defconfig updates to get autotesters working with X-gene" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Revert "arm64: Do not invoke audit_syscall_* functions if !CONFIG_AUDIT_SYSCALL" arm64: mm: update max pa bits to 48 arm64: ignore DT memreserve entries when booting in UEFI mode arm64: configs: Enable X-Gene SATA and ethernet in defconfig arm64: align randomized TEXT_OFFSET on 4 kB boundary asm-generic: add memfd_create system call to unistd.h arm64: compat: wire up memfd_create and getrandom syscalls for aarch32 arm64: fix typo in I-cache policy detection
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/Makefile2
-rw-r--r--arch/arm64/configs/defconfig3
-rw-r--r--arch/arm64/include/asm/sparsemem.h2
-rw-r--r--arch/arm64/include/asm/unistd.h2
-rw-r--r--arch/arm64/include/asm/unistd32.h5
-rw-r--r--arch/arm64/kernel/cpuinfo.c2
-rw-r--r--arch/arm64/kernel/efi.c2
-rw-r--r--arch/arm64/kernel/head.S8
-rw-r--r--arch/arm64/kernel/ptrace.c4
-rw-r--r--arch/arm64/mm/init.c4
10 files changed, 21 insertions, 13 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 57833546bf00..2df5e5daeebe 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -39,7 +39,7 @@ head-y := arch/arm64/kernel/head.o
39 39
40# The byte offset of the kernel image in RAM from the start of RAM. 40# The byte offset of the kernel image in RAM from the start of RAM.
41ifeq ($(CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET), y) 41ifeq ($(CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET), y)
42TEXT_OFFSET := $(shell awk 'BEGIN {srand(); printf "0x%04x0\n", int(65535 * rand())}') 42TEXT_OFFSET := $(shell awk 'BEGIN {srand(); printf "0x%03x000\n", int(512 * rand())}')
43else 43else
44TEXT_OFFSET := 0x00080000 44TEXT_OFFSET := 0x00080000
45endif 45endif
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 1e52b741d806..d92ef3c54161 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -64,6 +64,8 @@ CONFIG_VIRTIO_BLK=y
64CONFIG_BLK_DEV_SD=y 64CONFIG_BLK_DEV_SD=y
65# CONFIG_SCSI_LOWLEVEL is not set 65# CONFIG_SCSI_LOWLEVEL is not set
66CONFIG_ATA=y 66CONFIG_ATA=y
67CONFIG_AHCI_XGENE=y
68CONFIG_PHY_XGENE=y
67CONFIG_PATA_PLATFORM=y 69CONFIG_PATA_PLATFORM=y
68CONFIG_PATA_OF_PLATFORM=y 70CONFIG_PATA_OF_PLATFORM=y
69CONFIG_NETDEVICES=y 71CONFIG_NETDEVICES=y
@@ -71,6 +73,7 @@ CONFIG_TUN=y
71CONFIG_VIRTIO_NET=y 73CONFIG_VIRTIO_NET=y
72CONFIG_SMC91X=y 74CONFIG_SMC91X=y
73CONFIG_SMSC911X=y 75CONFIG_SMSC911X=y
76CONFIG_NET_XGENE=y
74# CONFIG_WLAN is not set 77# CONFIG_WLAN is not set
75CONFIG_INPUT_EVDEV=y 78CONFIG_INPUT_EVDEV=y
76# CONFIG_SERIO_SERPORT is not set 79# CONFIG_SERIO_SERPORT is not set
diff --git a/arch/arm64/include/asm/sparsemem.h b/arch/arm64/include/asm/sparsemem.h
index 1be62bcb9d47..74a9d301819f 100644
--- a/arch/arm64/include/asm/sparsemem.h
+++ b/arch/arm64/include/asm/sparsemem.h
@@ -17,7 +17,7 @@
17#define __ASM_SPARSEMEM_H 17#define __ASM_SPARSEMEM_H
18 18
19#ifdef CONFIG_SPARSEMEM 19#ifdef CONFIG_SPARSEMEM
20#define MAX_PHYSMEM_BITS 40 20#define MAX_PHYSMEM_BITS 48
21#define SECTION_SIZE_BITS 30 21#define SECTION_SIZE_BITS 30
22#endif 22#endif
23 23
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
index 4bc95d27e063..6d2bf419431d 100644
--- a/arch/arm64/include/asm/unistd.h
+++ b/arch/arm64/include/asm/unistd.h
@@ -41,7 +41,7 @@
41#define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) 41#define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2)
42#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) 42#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5)
43 43
44#define __NR_compat_syscalls 383 44#define __NR_compat_syscalls 386
45#endif 45#endif
46 46
47#define __ARCH_WANT_SYS_CLONE 47#define __ARCH_WANT_SYS_CLONE
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
index e242600c4046..da1f06b535e3 100644
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@ -787,3 +787,8 @@ __SYSCALL(__NR_sched_setattr, sys_sched_setattr)
787__SYSCALL(__NR_sched_getattr, sys_sched_getattr) 787__SYSCALL(__NR_sched_getattr, sys_sched_getattr)
788#define __NR_renameat2 382 788#define __NR_renameat2 382
789__SYSCALL(__NR_renameat2, sys_renameat2) 789__SYSCALL(__NR_renameat2, sys_renameat2)
790 /* 383 for seccomp */
791#define __NR_getrandom 384
792__SYSCALL(__NR_getrandom, sys_getrandom)
793#define __NR_memfd_create 385
794__SYSCALL(__NR_memfd_create, sys_memfd_create)
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index f798f66634af..177169623026 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -49,7 +49,7 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
49 49
50 if (l1ip != ICACHE_POLICY_PIPT) 50 if (l1ip != ICACHE_POLICY_PIPT)
51 set_bit(ICACHEF_ALIASING, &__icache_flags); 51 set_bit(ICACHEF_ALIASING, &__icache_flags);
52 if (l1ip == ICACHE_POLICY_AIVIVT); 52 if (l1ip == ICACHE_POLICY_AIVIVT)
53 set_bit(ICACHEF_AIVIVT, &__icache_flags); 53 set_bit(ICACHEF_AIVIVT, &__icache_flags);
54 54
55 pr_info("Detected %s I-cache on CPU%d\n", icache_policy_str[l1ip], cpu); 55 pr_info("Detected %s I-cache on CPU%d\n", icache_policy_str[l1ip], cpu);
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index e72f3100958f..24f0c6fb61d8 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -188,6 +188,8 @@ static __init void reserve_regions(void)
188 if (uefi_debug) 188 if (uefi_debug)
189 pr_cont("\n"); 189 pr_cont("\n");
190 } 190 }
191
192 set_bit(EFI_MEMMAP, &efi.flags);
191} 193}
192 194
193 195
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 144f10567f82..bed028364a93 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -38,11 +38,11 @@
38 38
39#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) 39#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)
40 40
41#if (TEXT_OFFSET & 0xf) != 0 41#if (TEXT_OFFSET & 0xfff) != 0
42#error TEXT_OFFSET must be at least 16B aligned 42#error TEXT_OFFSET must be at least 4KB aligned
43#elif (PAGE_OFFSET & 0xfffff) != 0 43#elif (PAGE_OFFSET & 0x1fffff) != 0
44#error PAGE_OFFSET must be at least 2MB aligned 44#error PAGE_OFFSET must be at least 2MB aligned
45#elif TEXT_OFFSET > 0xfffff 45#elif TEXT_OFFSET > 0x1fffff
46#error TEXT_OFFSET must be less than 2MB 46#error TEXT_OFFSET must be less than 2MB
47#endif 47#endif
48 48
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index 0310811bd77d..70526cfda056 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -1115,19 +1115,15 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
1115 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) 1115 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
1116 trace_sys_enter(regs, regs->syscallno); 1116 trace_sys_enter(regs, regs->syscallno);
1117 1117
1118#ifdef CONFIG_AUDITSYSCALL
1119 audit_syscall_entry(syscall_get_arch(), regs->syscallno, 1118 audit_syscall_entry(syscall_get_arch(), regs->syscallno,
1120 regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]); 1119 regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
1121#endif
1122 1120
1123 return regs->syscallno; 1121 return regs->syscallno;
1124} 1122}
1125 1123
1126asmlinkage void syscall_trace_exit(struct pt_regs *regs) 1124asmlinkage void syscall_trace_exit(struct pt_regs *regs)
1127{ 1125{
1128#ifdef CONFIG_AUDITSYSCALL
1129 audit_syscall_exit(regs); 1126 audit_syscall_exit(regs);
1130#endif
1131 1127
1132 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) 1128 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
1133 trace_sys_exit(regs, regs_return_value(regs)); 1129 trace_sys_exit(regs, regs_return_value(regs));
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 5b4526ee3a01..5472c2401876 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -32,6 +32,7 @@
32#include <linux/of_fdt.h> 32#include <linux/of_fdt.h>
33#include <linux/dma-mapping.h> 33#include <linux/dma-mapping.h>
34#include <linux/dma-contiguous.h> 34#include <linux/dma-contiguous.h>
35#include <linux/efi.h>
35 36
36#include <asm/fixmap.h> 37#include <asm/fixmap.h>
37#include <asm/sections.h> 38#include <asm/sections.h>
@@ -148,7 +149,8 @@ void __init arm64_memblock_init(void)
148 memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); 149 memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
149#endif 150#endif
150 151
151 early_init_fdt_scan_reserved_mem(); 152 if (!efi_enabled(EFI_MEMMAP))
153 early_init_fdt_scan_reserved_mem();
152 154
153 /* 4GB maximum for 32-bit only capable devices */ 155 /* 4GB maximum for 32-bit only capable devices */
154 if (IS_ENABLED(CONFIG_ZONE_DMA)) 156 if (IS_ENABLED(CONFIG_ZONE_DMA))