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 and minor updates all over the place: - an SGI/UV fix - a defconfig update - a build warning fix - move the boot_params file to the arch location in debugfs - a pkeys fix - selftests fix - boot message fixes - sparse fixes - a resume warning fix - ioapic hotplug fixes - reboot quirks ... plus various minor cleanups" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build/x86_64_defconfig: Enable CONFIG_R8169 x86/reboot/quirks: Add ASUS EeeBook X205TA/W reboot quirk x86/hpet: Prevent might sleep splat on resume x86/boot: Correct setup_header.start_sys name x86/purgatory: Fix sparse warning, symbol not declared x86/purgatory: Make functions and variables static x86/events: Remove last remnants of old filenames x86/pkeys: Check against max pkey to avoid overflows x86/ioapic: Split IOAPIC hot-removal into two steps x86/PCI: Implement pcibios_release_device to release IRQ from IOAPIC x86/intel_rdt: Remove duplicate inclusion of linux/cpu.h x86/vmware: Remove duplicate inclusion of asm/timer.h x86/hyperv: Hide unused label x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register x86/selftests: Add clobbers for int80 on x86_64 x86/apic: Simplify enable_IR_x2apic(), remove try_to_enable_IR() x86/apic: Fix a warning message in logical CPU IDs allocation x86/kdebugfs: Move boot params hierarchy under (debugfs)/x86/
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
#error Instruction buffer size too small
|
||||
#endif
|
||||
|
||||
/* Based on branch_type() from perf_event_intel_lbr.c */
|
||||
/* Based on branch_type() from arch/x86/events/intel/lbr.c */
|
||||
static void intel_pt_insn_decoder(struct insn *insn,
|
||||
struct intel_pt_insn *intel_pt_insn)
|
||||
{
|
||||
|
@ -245,7 +245,7 @@ void do_unexpected_base(void)
|
||||
long ret;
|
||||
asm volatile ("int $0x80"
|
||||
: "=a" (ret) : "a" (243), "b" (low_desc)
|
||||
: "flags");
|
||||
: "r8", "r9", "r10", "r11");
|
||||
memcpy(&desc, low_desc, sizeof(desc));
|
||||
munmap(low_desc, sizeof(desc));
|
||||
|
||||
|
@ -45,6 +45,12 @@
|
||||
#define AR_DB (1 << 22)
|
||||
#define AR_G (1 << 23)
|
||||
|
||||
#ifdef __x86_64__
|
||||
# define INT80_CLOBBERS "r8", "r9", "r10", "r11"
|
||||
#else
|
||||
# define INT80_CLOBBERS
|
||||
#endif
|
||||
|
||||
static int nerrs;
|
||||
|
||||
/* Points to an array of 1024 ints, each holding its own index. */
|
||||
@ -588,7 +594,7 @@ static int invoke_set_thread_area(void)
|
||||
asm volatile ("int $0x80"
|
||||
: "=a" (ret), "+m" (low_user_desc) :
|
||||
"a" (243), "b" (low_user_desc)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -657,7 +663,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
if (sel != 0) {
|
||||
result = "FAIL";
|
||||
@ -688,7 +694,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
if (sel != 0) {
|
||||
result = "FAIL";
|
||||
@ -721,7 +727,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
#ifdef __x86_64__
|
||||
syscall(SYS_arch_prctl, ARCH_GET_FS, &new_base);
|
||||
@ -774,7 +780,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
#ifdef __x86_64__
|
||||
syscall(SYS_arch_prctl, ARCH_GET_GS, &new_base);
|
||||
|
@ -58,7 +58,8 @@ static void do_full_int80(struct syscall_args32 *args)
|
||||
asm volatile ("int $0x80"
|
||||
: "+a" (args->nr),
|
||||
"+b" (args->arg0), "+c" (args->arg1), "+d" (args->arg2),
|
||||
"+S" (args->arg3), "+D" (args->arg4), "+r" (bp));
|
||||
"+S" (args->arg3), "+D" (args->arg4), "+r" (bp)
|
||||
: : "r8", "r9", "r10", "r11");
|
||||
args->arg5 = bp;
|
||||
#else
|
||||
sys32_helper(args, int80_and_ret);
|
||||
|
@ -56,9 +56,11 @@ static volatile sig_atomic_t sig_traps;
|
||||
#ifdef __x86_64__
|
||||
# define REG_IP REG_RIP
|
||||
# define WIDTH "q"
|
||||
# define INT80_CLOBBERS "r8", "r9", "r10", "r11"
|
||||
#else
|
||||
# define REG_IP REG_EIP
|
||||
# define WIDTH "l"
|
||||
# define INT80_CLOBBERS
|
||||
#endif
|
||||
|
||||
static unsigned long get_eflags(void)
|
||||
@ -140,7 +142,8 @@ int main()
|
||||
|
||||
printf("[RUN]\tSet TF and check int80\n");
|
||||
set_eflags(get_eflags() | X86_EFLAGS_TF);
|
||||
asm volatile ("int $0x80" : "=a" (tmp) : "a" (SYS_getpid));
|
||||
asm volatile ("int $0x80" : "=a" (tmp) : "a" (SYS_getpid)
|
||||
: INT80_CLOBBERS);
|
||||
check_result();
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user