Skip to content

Commit ea5a9ef

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "Misc fixes: a core dumping crash fix, a guess-unwinder regression fix, plus three build warning fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/unwind: Fix guess-unwinder regression x86/build: Annotate die() with noreturn to fix build warning on clang x86/platform/olpc: Fix resume handler build warning x86/apic/uv: Silence a shift wrapping warning x86/coredump: Always use user_regs_struct for compat_elf_gregset_t
2 parents 68f5503 + 55f856e commit ea5a9ef

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

arch/x86/include/asm/compat.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ struct compat_shmid64_ds {
272272
/*
273273
* The type of struct elf_prstatus.pr_reg in compatible core dumps.
274274
*/
275-
#ifdef CONFIG_X86_X32_ABI
276275
typedef struct user_regs_struct compat_elf_gregset_t;
277276

278277
/* Full regset -- prstatus on x32, otherwise on ia32 */
@@ -281,10 +280,9 @@ typedef struct user_regs_struct compat_elf_gregset_t;
281280
do { *(int *) (((void *) &((S)->pr_reg)) + R) = (V); } \
282281
while (0)
283282

283+
#ifdef CONFIG_X86_X32_ABI
284284
#define COMPAT_USE_64BIT_TIME \
285285
(!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT))
286-
#else
287-
typedef struct user_regs_struct32 compat_elf_gregset_t;
288286
#endif
289287

290288
/*

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,9 +815,9 @@ static __init void map_mmioh_high_uv3(int index, int min_pnode, int max_pnode)
815815
l = li;
816816
}
817817
addr1 = (base << shift) +
818-
f * (unsigned long)(1 << m_io);
818+
f * (1ULL << m_io);
819819
addr2 = (base << shift) +
820-
(l + 1) * (unsigned long)(1 << m_io);
820+
(l + 1) * (1ULL << m_io);
821821
pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n",
822822
id, fi, li, lnasid, addr1, addr2);
823823
if (max_io < l)

arch/x86/kernel/unwind_guess.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77

88
unsigned long unwind_get_return_address(struct unwind_state *state)
99
{
10-
unsigned long addr = READ_ONCE_NOCHECK(*state->sp);
10+
unsigned long addr;
1111

1212
if (unwind_done(state))
1313
return 0;
1414

15+
addr = READ_ONCE_NOCHECK(*state->sp);
16+
1517
return ftrace_graph_ret_addr(state->task, &state->graph_idx,
1618
addr, state->sp);
1719
}
@@ -25,11 +27,12 @@ bool unwind_next_frame(struct unwind_state *state)
2527
return false;
2628

2729
do {
28-
unsigned long addr = READ_ONCE_NOCHECK(*state->sp);
30+
for (state->sp++; state->sp < info->end; state->sp++) {
31+
unsigned long addr = READ_ONCE_NOCHECK(*state->sp);
2932

30-
for (state->sp++; state->sp < info->end; state->sp++)
3133
if (__kernel_text_address(addr))
3234
return true;
35+
}
3336

3437
state->sp = info->next_sp;
3538

arch/x86/platform/olpc/olpc-xo15-sci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ static int xo15_sci_remove(struct acpi_device *device)
196196
return 0;
197197
}
198198

199+
#ifdef CONFIG_PM_SLEEP
199200
static int xo15_sci_resume(struct device *dev)
200201
{
201202
/* Enable all EC events */
@@ -207,6 +208,7 @@ static int xo15_sci_resume(struct device *dev)
207208

208209
return 0;
209210
}
211+
#endif
210212

211213
static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
212214

arch/x86/tools/relocs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <regex.h>
1717
#include <tools/le_byteshift.h>
1818

19-
void die(char *fmt, ...);
19+
void die(char *fmt, ...) __attribute__((noreturn));
2020

2121
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
2222

0 commit comments

Comments
 (0)