Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp615124ybg; Sat, 26 Oct 2019 04:21:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGG+QgYbuI/IJjNveAxTmQB0u+Z50/7b+26LHB0vZ+TaIUSYY92lh1ZoPJbEWhxXBFE9TR X-Received: by 2002:a17:906:250e:: with SMTP id i14mr486762ejb.44.1572088871019; Sat, 26 Oct 2019 04:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572088871; cv=none; d=google.com; s=arc-20160816; b=uISntaUM8LpJnwb8HfFNBOm6Jp0xInJ2V1KCClF/KNUneVy20gYdzEer6/X5FR8czS 39nWD+Pg0ZFO4/3IbDQCTX/Khb0pA2mdAvQNK0lY2pkXjzZx1oeQr0iphyMshx5qdvtX SIlp0XSa0aIE1jmuIK4A0ericENer9PIVxDiQtFXrRNvdz+yvPC1UHhqs1an6RIa9A8e ejO1glMRqSu92L3AbiD812GLGypXVDD7KzjMHxyfjXuQORGL8upy0jz8jsefiOjzGkTA dFCkJY3DzFeT2gQWo6yhB/HmdrDJmWjcJtwkd4kvF/8vdAFFAWpVbr481J+HnPRsNcuI Jxfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=cuRzeOKlaXy8moZYsilOlogmoVgTxTKDrbJaqzMZyMA=; b=tTB4RNrOkKzJJC1wysdyhE2U2kow3BHV7r6byvT+GZyHt0J29GpiTsFEdhtyVONOdJ ixBhtardGX2cioaQAt2Pq0bpTA1vfDpPrGHRi9Ja66OZVUqAnbev/UwZLIOyGtcairFe mxJSQRQMf1ApVQquXEDdWh1//gmAzoqPyk1kTFa6TJvwCio6MvnSejZnAPlkFdQl/Y+w rKOOOrYg/sUD+WgOb+VqLd85XEaZ45M1pFnecMkW9R6UiOfDCvfTWP4lT7XQ3GnaPGLV FL4NsAoyHVOYGk4Tmpjd42tBb59m4is8bdjTT7VIjNfHVSLZnL+TkpeFyiublv1meM3F HdDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=VMwHltKJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si2967834ejb.315.2019.10.26.04.20.43; Sat, 26 Oct 2019 04:21:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=VMwHltKJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbfJZLUK (ORCPT + 99 others); Sat, 26 Oct 2019 07:20:10 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:21036 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfJZLUK (ORCPT ); Sat, 26 Oct 2019 07:20:10 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 470dn23HVBz9vBLY; Sat, 26 Oct 2019 13:20:06 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=VMwHltKJ; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 8T8h_3sGDPZb; Sat, 26 Oct 2019 13:20:06 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 470dn223dkz9vBLX; Sat, 26 Oct 2019 13:20:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1572088806; bh=cuRzeOKlaXy8moZYsilOlogmoVgTxTKDrbJaqzMZyMA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=VMwHltKJYJQdbu7PK4+xV1Dr9Besk731Q47erS5k6wafk2Ix2XG/xyFnG7Pvv7Pg5 SmFst9LS0rBqSvgtCWvAXLp7a5kvYO+9pNHWnD2vz3j6KcChDoxTB+LhKcXRTo1trv k1eZFRaooVdUouwfdY+ERrKOEab8qufUfRYCusww= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8F33F8B7A8; Sat, 26 Oct 2019 13:20:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id F8WsoAjdIp8i; Sat, 26 Oct 2019 13:20:07 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BD48D8B787; Sat, 26 Oct 2019 13:20:06 +0200 (CEST) Subject: Re: loop nesting in alignment exception and machine check To: "Wangshaobo (bobo)" Cc: "linux-arch@vger.kernel.org" , "alistair@popple.id.au" , "chengjian (D)" , Xiexiuqi , "linux-kernel@vger.kernel.org" , "oss@buserror.net" , "paulus@samba.org" , "Libin (Huawei)" , "agust@denx.de" , "linuxppc-dev@lists.ozlabs.org" References: From: Christophe Leroy Message-ID: <8215aeb3-57dd-223a-29d3-45ca22b0543c@c-s.fr> Date: Sat, 26 Oct 2019 13:20:06 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le 26/10/2019 ? 09:23, Wangshaobo (bobo) a ?crit?: > Hi, > > I encountered a problem about a loop nesting occurred in manufacturing > the alignment exception in machine check, trigger background is : > > problem: > > machine checkout or critical interrupt ->?->kbox_write[for recording > last words] -> memcpy(irremap_addr, src,size):_GLOBAL(memcpy)? > > when we enter memcpy,a command ?dcbz r11,r6? will cause a alignment > exception, in this situation,r11 loads the ioremap address,which leads > to the alignment exception, You can't use memcpy() on something else than memory. For an ioremapped area, you have to use memcpy_toio() Christophe > > then the command can not be process successfully,as we still in machine > check.at the end ,it triggers a new irq machine check in irq handler > function,a loop nesting begins. > > analysis: > > We have analysed a lot,but it still can not come to a reasonable > description,in common,the alignment triggered in machine check context > can still be collected into the Kbox > > after alignment exception be handled by handler function, but how does > the machine checkout can be triggered in the handler fucntion for any > causes? We print relevant registers > > as follow when first enter machine check and alignment exception handler > function: > > ???????? MSR:0x2????? MSR:0x0 > > ???????? SRR1:0x2????? SRR1:0x21002 > > ???????? But the manual says SRR1 should be set to MSR(0x2),why that > happened ? > > ???????? Then a branch in handler function copy the SRR1 to MSR,this > enble MSR[ME] and MSR[CE],system collapses. > > Conclusion: > > ???????? 1)? why the alignment exception can not be handled in machine > check ? > > ???????? 2)? besides memcpy,any other function can cause the alignment > exception ? > > We still recurrent it, the line as follows: > > ???????? Cpu dead lock->watch log->trigger > fiq->kbox_write->memcpy->alignment exception->print last words. > > ???????? but for those problems as below,what the kbox printed is empty. > > ------------------kbox restart:[?? 10.147594]---------------- > > kbox verify fs magic fail > > kbox mem mabye destroyed, format it > > kbox: load OK > > lock-task: major[249] minor[0] > > -----start show_destroyed_kbox_mem_head---- > > 00000000: 00000000 00000000 00000000 00000000? ................ > > 00000010: 00000000 00000000 00000000 00000000? ................ > > 00000020: 00000000 00000000 00000000 00000000? ................ > > 00000030: 00000000 00000000 00000000 00000000? ................ > > 00000040: 00000000 00000000 00000000 00000000? ................ > > 00000050: 00000000 00000000 00000000 00000000? ................ > > 00000060: 00000000 00000000 00000000 00000000? ................ > > 00000070: 00000000 00000000 00000000 00000000? ................ > > 00000080: 00000000 00000000 00000000 00000000? ................ > > 00000090: 00000000 00000000 00000000 00000000? ................ >