From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2828790981885629786==" MIME-Version: 1.0 From: Borislav Petkov To: lkp@lists.01.org Subject: Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe Date: Wed, 15 Jun 2016 20:23:32 +0200 Message-ID: <20160615182332.GI30309@pd.tnic> In-Reply-To: List-Id: --===============2828790981885629786== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, Jun 15, 2016 at 11:12:37AM -0700, Andy Lutomirski wrote: > I want to see actual_problem in the log. So the optimal thing to do for that is to return an error to the calling site which says "exception got handled" and then the *calling* site can dump_stack(). And the old code did that: static inline unsigned long long native_read_msr_safe(unsigned int msr, int *err) { DECLARE_ARGS(val, low, high); asm volatile("2: rdmsr ; xor %[err],%[err]\n" "1:\n\t" ".section .fixup,\"ax\"\n\t" "3: mov %[fault],%[err] ; jmp 1b\n\t" ".previous\n\t" _ASM_EXTABLE(2b, 3b) : [err] "=3Dr" (*err), EAX_EDX_RET(val, low, high) : "c" (msr), [fault] "i" (-EIO)); ^^^^ -- = Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --===============2828790981885629786==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753358AbcFOSXh (ORCPT ); Wed, 15 Jun 2016 14:23:37 -0400 Received: from mail.skyhub.de ([78.46.96.112]:41328 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbcFOSXf (ORCPT ); Wed, 15 Jun 2016 14:23:35 -0400 Date: Wed, 15 Jun 2016 20:23:32 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: Paolo Bonzini , wfg@linux.intel.com, LKP , lkml , Fengguang Wu , Eduardo Habkost , Josh Poimboeuf Subject: Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe Message-ID: <20160615182332.GI30309@pd.tnic> References: <57614955.l3IQMtSfaGPEBdCy%fengguang.wu@intel.com> <20160615142532.GE32588@pd.tnic> <20160615175052.GE30309@pd.tnic> <20160615180722.GG30309@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2016 at 11:12:37AM -0700, Andy Lutomirski wrote: > I want to see actual_problem in the log. So the optimal thing to do for that is to return an error to the calling site which says "exception got handled" and then the *calling* site can dump_stack(). And the old code did that: static inline unsigned long long native_read_msr_safe(unsigned int msr, int *err) { DECLARE_ARGS(val, low, high); asm volatile("2: rdmsr ; xor %[err],%[err]\n" "1:\n\t" ".section .fixup,\"ax\"\n\t" "3: mov %[fault],%[err] ; jmp 1b\n\t" ".previous\n\t" _ASM_EXTABLE(2b, 3b) : [err] "=r" (*err), EAX_EDX_RET(val, low, high) : "c" (msr), [fault] "i" (-EIO)); ^^^^ -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.