From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbdI1RBZ (ORCPT ); Thu, 28 Sep 2017 13:01:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33504 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbdI1RBX (ORCPT ); Thu, 28 Sep 2017 13:01:23 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AA4D43A3C4F Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Date: Thu, 28 Sep 2017 12:01:21 -0500 From: Josh Poimboeuf To: Linus Torvalds Cc: kernel test robot , Ingo Molnar , Andrey Ryabinin , Matthias Kaehlcke , Alexander Potapenko , Andy Lutomirski , Arnd Bergmann , Dmitriy Vyukov , Miguel Bernal Marin , Peter Zijlstra , Thomas Gleixner , LKML , LKP Subject: Re: [lkp-robot] [x86/asm] f5caf621ee: PANIC:double_fault Message-ID: <20170928170121.qpyyfjijuwdkfx7g@treble> References: <20170928074758.GS17200@yexl-desktop> <20170928164422.sl4z4sfbkyscbxrk@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170928164422.sl4z4sfbkyscbxrk@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 28 Sep 2017 17:01:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 28, 2017 at 11:44:22AM -0500, Josh Poimboeuf wrote: > Agreed, changing it to "unsigned long" and "rsp" will probably fix it. > > I had made it "unsigned int" because of a clang issue with "unsigned > long": > > CC arch/x86/entry/vdso/vdso32/vclock_gettime.o > In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:32: > In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: > In file included from ./arch/x86/include/asm/vgtod.h:5: > In file included from ./include/linux/clocksource.h:12: > In file included from ./include/linux/timex.h:56: > In file included from ./include/uapi/linux/timex.h:56: > In file included from ./include/linux/time.h:5: > In file included from ./include/linux/seqlock.h:35: > In file included from ./include/linux/spinlock.h:50: > In file included from ./include/linux/preempt.h:10: > In file included from ./include/linux/list.h:8: > In file included from ./include/linux/kernel.h:10: > In file included from ./include/linux/bitops.h:37: > In file included from ./arch/x86/include/asm/bitops.h:16: > In file included from ./arch/x86/include/asm/alternative.h:9: > ./arch/x86/include/asm/asm.h:142:42: error: register 'rsp' unsuitable for global register variables on this target > register unsigned long __asm_call_sp asm("rsp"); > > And I think we saw the same error in the realmode code. > > So we may need to tweak the macro a bit. Going to try the following patch. diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index c1eadbaf1115..30c3c9ac784a 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -11,10 +11,12 @@ # define __ASM_FORM_COMMA(x) " " #x "," #endif -#ifdef CONFIG_X86_32 +#ifndef __x86_64__ +/* 32 bit */ # define __ASM_SEL(a,b) __ASM_FORM(a) # define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a) #else +/* 64 bit */ # define __ASM_SEL(a,b) __ASM_FORM(b) # define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b) #endif @@ -139,7 +141,7 @@ * gets set up by the containing function. If you forget to do this, objtool * may print a "call without frame pointer save/setup" warning. */ -register unsigned int __asm_call_sp asm("esp"); +register unsigned long __asm_call_sp asm(_ASM_SP); #define ASM_CALL_CONSTRAINT "+r" (__asm_call_sp) #endif