From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Message-ID: <52DFC1BA.8030001@huawei.com> Date: Wed, 22 Jan 2014 21:03:54 +0800 From: Wang Nan MIME-Version: 1.0 Subject: Re: [PATCH 2/3] ARM: kexec: copying code to ioremapped area References: <1390389916-8711-1-git-send-email-wangnan0@huawei.com> <1390389916-8711-3-git-send-email-wangnan0@huawei.com> In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: Vaibhav Bedia Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-mm@kvack.org, Eric Biederman , Geng Hui , Russell King , Andrew Morton , Linux ARM Kernel List On 2014/1/22 20:56, Vaibhav Bedia wrote: > On Wed, Jan 22, 2014 at 6:25 AM, Wang Nan > wrote: > > ARM's kdump is actually corrupted (at least for omap4460), mainly because of > cache problem: flush_icache_range can't reliably ensure the copied data > correctly goes into RAM. After mmu turned off and jump to the trampoline, kexec > always failed due to random undef instructions. > > This patch use ioremap to make sure the destnation of all memcpy() is > uncachable memory, including copying of target kernel and trampoline. > > > AFAIK ioremap on RAM in forbidden in ARM and device memory that ioremap() > ends up creating is not meant for executable code. > > Doesn't this trigger the WARN_ON() in _arm_ioremap_pfn_caller)? This patch is depend on the previous one: ARM: Premit ioremap() to map reserved pages However, Russell is opposed to it. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangnan0@huawei.com (Wang Nan) Date: Wed, 22 Jan 2014 21:03:54 +0800 Subject: [PATCH 2/3] ARM: kexec: copying code to ioremapped area In-Reply-To: References: <1390389916-8711-1-git-send-email-wangnan0@huawei.com> <1390389916-8711-3-git-send-email-wangnan0@huawei.com> Message-ID: <52DFC1BA.8030001@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2014/1/22 20:56, Vaibhav Bedia wrote: > On Wed, Jan 22, 2014 at 6:25 AM, Wang Nan > wrote: > > ARM's kdump is actually corrupted (at least for omap4460), mainly because of > cache problem: flush_icache_range can't reliably ensure the copied data > correctly goes into RAM. After mmu turned off and jump to the trampoline, kexec > always failed due to random undef instructions. > > This patch use ioremap to make sure the destnation of all memcpy() is > uncachable memory, including copying of target kernel and trampoline. > > > AFAIK ioremap on RAM in forbidden in ARM and device memory that ioremap() > ends up creating is not meant for executable code. > > Doesn't this trigger the WARN_ON() in _arm_ioremap_pfn_caller)? This patch is depend on the previous one: ARM: Premit ioremap() to map reserved pages However, Russell is opposed to it. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by kanga.kvack.org (Postfix) with ESMTP id 13B0C6B0071 for ; Wed, 22 Jan 2014 08:07:19 -0500 (EST) Received: by mail-pd0-f174.google.com with SMTP id z10so345489pdj.19 for ; Wed, 22 Jan 2014 05:07:18 -0800 (PST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com. [119.145.14.64]) by mx.google.com with ESMTPS id fu1si9761455pbc.344.2014.01.22.05.07.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 05:07:17 -0800 (PST) Message-ID: <52DFC1BA.8030001@huawei.com> Date: Wed, 22 Jan 2014 21:03:54 +0800 From: Wang Nan MIME-Version: 1.0 Subject: Re: [PATCH 2/3] ARM: kexec: copying code to ioremapped area References: <1390389916-8711-1-git-send-email-wangnan0@huawei.com> <1390389916-8711-3-git-send-email-wangnan0@huawei.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Vaibhav Bedia Cc: kexec@lists.infradead.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, Geng Hui , linux-mm@kvack.org, Eric Biederman , Russell King , Andrew Morton , Linux ARM Kernel List On 2014/1/22 20:56, Vaibhav Bedia wrote: > On Wed, Jan 22, 2014 at 6:25 AM, Wang Nan > wrote: > > ARM's kdump is actually corrupted (at least for omap4460), mainly because of > cache problem: flush_icache_range can't reliably ensure the copied data > correctly goes into RAM. After mmu turned off and jump to the trampoline, kexec > always failed due to random undef instructions. > > This patch use ioremap to make sure the destnation of all memcpy() is > uncachable memory, including copying of target kernel and trampoline. > > > AFAIK ioremap on RAM in forbidden in ARM and device memory that ioremap() > ends up creating is not meant for executable code. > > Doesn't this trigger the WARN_ON() in _arm_ioremap_pfn_caller)? This patch is depend on the previous one: ARM: Premit ioremap() to map reserved pages However, Russell is opposed to it. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755622AbaAVNFF (ORCPT ); Wed, 22 Jan 2014 08:05:05 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:25324 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755153AbaAVNFC (ORCPT ); Wed, 22 Jan 2014 08:05:02 -0500 Message-ID: <52DFC1BA.8030001@huawei.com> Date: Wed, 22 Jan 2014 21:03:54 +0800 From: Wang Nan User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Vaibhav Bedia CC: , , , Geng Hui , , Eric Biederman , Russell King , Andrew Morton , Linux ARM Kernel List Subject: Re: [PATCH 2/3] ARM: kexec: copying code to ioremapped area References: <1390389916-8711-1-git-send-email-wangnan0@huawei.com> <1390389916-8711-3-git-send-email-wangnan0@huawei.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.69.90] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2014/1/22 20:56, Vaibhav Bedia wrote: > On Wed, Jan 22, 2014 at 6:25 AM, Wang Nan > wrote: > > ARM's kdump is actually corrupted (at least for omap4460), mainly because of > cache problem: flush_icache_range can't reliably ensure the copied data > correctly goes into RAM. After mmu turned off and jump to the trampoline, kexec > always failed due to random undef instructions. > > This patch use ioremap to make sure the destnation of all memcpy() is > uncachable memory, including copying of target kernel and trampoline. > > > AFAIK ioremap on RAM in forbidden in ARM and device memory that ioremap() > ends up creating is not meant for executable code. > > Doesn't this trigger the WARN_ON() in _arm_ioremap_pfn_caller)? This patch is depend on the previous one: ARM: Premit ioremap() to map reserved pages However, Russell is opposed to it.