Skip to content

Commit 1592c4d

Browse files
committed
Merge branch 'nfs-rdma'
2 parents 668f455 + f044567 commit 1592c4d

File tree

205 files changed

+2417
-1698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+2417
-1698
lines changed

Documentation/x86/intel_mpx.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ is how we expect the compiler, application and kernel to work together.
4545
MPX-instrumented.
4646
3) The kernel detects that the CPU has MPX, allows the new prctl() to
4747
succeed, and notes the location of the bounds directory. Userspace is
48-
expected to keep the bounds directory at that locationWe note it
48+
expected to keep the bounds directory at that location. We note it
4949
instead of reading it each time because the 'xsave' operation needed
5050
to access the bounds directory register is an expensive operation.
5151
4) If the application needs to spill bounds out of the 4 registers, it
@@ -167,7 +167,7 @@ If a #BR is generated due to a bounds violation caused by MPX.
167167
We need to decode MPX instructions to get violation address and
168168
set this address into extended struct siginfo.
169169

170-
The _sigfault feild of struct siginfo is extended as follow:
170+
The _sigfault field of struct siginfo is extended as follow:
171171

172172
87 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
173173
88 struct {
@@ -240,5 +240,5 @@ them at the same bounds table.
240240
This is allowed architecturally. See more information "Intel(R) Architecture
241241
Instruction Set Extensions Programming Reference" (9.3.4).
242242

243-
However, if users did this, the kernel might be fooled in to unmaping an
243+
However, if users did this, the kernel might be fooled in to unmapping an
244244
in-use bounds table since it does not recognize sharing.

Documentation/x86/tlb.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ memory, it has two choices:
55
from areas other than the one we are trying to flush will be
66
destroyed and must be refilled later, at some cost.
77
2. Use the invlpg instruction to invalidate a single page at a
8-
time. This could potentialy cost many more instructions, but
8+
time. This could potentially cost many more instructions, but
99
it is a much more precise operation, causing no collateral
1010
damage to other TLB entries.
1111

@@ -19,7 +19,7 @@ Which method to do depends on a few things:
1919
work.
2020
3. The size of the TLB. The larger the TLB, the more collateral
2121
damage we do with a full flush. So, the larger the TLB, the
22-
more attrative an individual flush looks. Data and
22+
more attractive an individual flush looks. Data and
2323
instructions have separate TLBs, as do different page sizes.
2424
4. The microarchitecture. The TLB has become a multi-level
2525
cache on modern CPUs, and the global flushes have become more

Documentation/x86/x86_64/machinecheck

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ between all CPUs.
3636

3737
check_interval
3838
How often to poll for corrected machine check errors, in seconds
39-
(Note output is hexademical). Default 5 minutes. When the poller
39+
(Note output is hexadecimal). Default 5 minutes. When the poller
4040
finds MCEs it triggers an exponential speedup (poll more often) on
4141
the polling interval. When the poller stops finding MCEs, it
4242
triggers an exponential backoff (poll less often) on the polling

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION = 4
22
PATCHLEVEL = 7
33
SUBLEVEL = 0
4-
EXTRAVERSION = -rc5
4+
EXTRAVERSION = -rc7
55
NAME = Psychotic Stoned Sheep
66

77
# *DOCUMENTATION*

arch/arm64/include/asm/cputype.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,14 @@
8080
#define APM_CPU_PART_POTENZA 0x000
8181

8282
#define CAVIUM_CPU_PART_THUNDERX 0x0A1
83+
#define CAVIUM_CPU_PART_THUNDERX_81XX 0x0A2
8384

8485
#define BRCM_CPU_PART_VULCAN 0x516
8586

8687
#define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53)
8788
#define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57)
8889
#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
90+
#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)
8991

9092
#ifndef __ASSEMBLY__
9193

arch/arm64/include/asm/ptrace.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ struct pt_regs {
117117
};
118118
u64 orig_x0;
119119
u64 syscallno;
120+
u64 orig_addr_limit;
121+
u64 unused; // maintain 16 byte alignment
120122
};
121123

122124
#define arch_has_single_step() (1)

arch/arm64/kernel/asm-offsets.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ int main(void)
6060
DEFINE(S_PC, offsetof(struct pt_regs, pc));
6161
DEFINE(S_ORIG_X0, offsetof(struct pt_regs, orig_x0));
6262
DEFINE(S_SYSCALLNO, offsetof(struct pt_regs, syscallno));
63+
DEFINE(S_ORIG_ADDR_LIMIT, offsetof(struct pt_regs, orig_addr_limit));
6364
DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs));
6465
BLANK();
6566
DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id.counter));

arch/arm64/kernel/cpu_errata.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
9898
MIDR_RANGE(MIDR_THUNDERX, 0x00,
9999
(1 << MIDR_VARIANT_SHIFT) | 1),
100100
},
101+
{
102+
/* Cavium ThunderX, T81 pass 1.0 */
103+
.desc = "Cavium erratum 27456",
104+
.capability = ARM64_WORKAROUND_CAVIUM_27456,
105+
MIDR_RANGE(MIDR_THUNDERX_81XX, 0x00, 0x00),
106+
},
101107
#endif
102108
{
103109
}

arch/arm64/kernel/entry.S

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/errno.h>
2929
#include <asm/esr.h>
3030
#include <asm/irq.h>
31+
#include <asm/memory.h>
3132
#include <asm/thread_info.h>
3233
#include <asm/unistd.h>
3334

@@ -97,7 +98,14 @@
9798
mov x29, xzr // fp pointed to user-space
9899
.else
99100
add x21, sp, #S_FRAME_SIZE
100-
.endif
101+
get_thread_info tsk
102+
/* Save the task's original addr_limit and set USER_DS (TASK_SIZE_64) */
103+
ldr x20, [tsk, #TI_ADDR_LIMIT]
104+
str x20, [sp, #S_ORIG_ADDR_LIMIT]
105+
mov x20, #TASK_SIZE_64
106+
str x20, [tsk, #TI_ADDR_LIMIT]
107+
ALTERNATIVE(nop, SET_PSTATE_UAO(0), ARM64_HAS_UAO, CONFIG_ARM64_UAO)
108+
.endif /* \el == 0 */
101109
mrs x22, elr_el1
102110
mrs x23, spsr_el1
103111
stp lr, x21, [sp, #S_LR]
@@ -128,6 +136,14 @@
128136
.endm
129137

130138
.macro kernel_exit, el
139+
.if \el != 0
140+
/* Restore the task's original addr_limit. */
141+
ldr x20, [sp, #S_ORIG_ADDR_LIMIT]
142+
str x20, [tsk, #TI_ADDR_LIMIT]
143+
144+
/* No need to restore UAO, it will be restored from SPSR_EL1 */
145+
.endif
146+
131147
ldp x21, x22, [sp, #S_PC] // load ELR, SPSR
132148
.if \el == 0
133149
ct_user_enter
@@ -406,7 +422,6 @@ el1_irq:
406422
bl trace_hardirqs_off
407423
#endif
408424

409-
get_thread_info tsk
410425
irq_handler
411426

412427
#ifdef CONFIG_PREEMPT

arch/arm64/mm/fault.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
280280
}
281281

282282
if (permission_fault(esr) && (addr < USER_DS)) {
283-
if (get_fs() == KERNEL_DS)
283+
/* regs->orig_addr_limit may be 0 if we entered from EL0 */
284+
if (regs->orig_addr_limit == KERNEL_DS)
284285
die("Accessing user space memory with fs=KERNEL_DS", regs, esr);
285286

286287
if (!search_exception_tables(regs->pc))

0 commit comments

Comments
 (0)