From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6862FC4332D for ; Fri, 5 Feb 2021 22:54:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3579265010 for ; Fri, 5 Feb 2021 22:54:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232198AbhBEWyF (ORCPT ); Fri, 5 Feb 2021 17:54:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbhBEOmy (ORCPT ); Fri, 5 Feb 2021 09:42:54 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9232CC061756 for ; Fri, 5 Feb 2021 08:20:17 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id q2so6299976eds.11 for ; Fri, 05 Feb 2021 08:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AYwzbRa5m9CR2V97fKwgd6SE184J0tEf0fKut5hCaio=; b=EyKTyzJyAI27MO+T5sTWBERnkvFIc6IPenn/KaWQtRtXFBG/rO041a/UCR1Ex5VwIT 3ytCUZ49tWW+raJDXBrWbQHEzu2p8+/I9m8viyg5cDqdNblIPpfheYcnOKfxrUga2WAu 6ZpDOX/IOStaTNS7rcYt5S8902GXSv1sD3bFKL3L3YlhMoSQ6tFEaWSpMfhC07uG54Lz i12Hxzp67gH842Kgx6d2S55fjHYvO6JfRCOCFGgJXI4Rn3JnzJS6smDuZ5wpQRc5JuGh G56mKaLmOVm/nBgojCXESXUtV3+LyslDttNF7nTnn9RuSE4tw4DilwIGyQjlW/zdRRsk g6YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AYwzbRa5m9CR2V97fKwgd6SE184J0tEf0fKut5hCaio=; b=k1lOM/BolcfNa9k3HdAK82hFQ+4bF+fATk5ao91MI06zmSZe9GwXnqmHllhStqNNXE kOI7GOHX0v9dWqaaGdgocVpEQrbtWj7bhf4Oodh+9kmQlksU0BADPrZfAetA5pkhAq/i ak7zl1xlV3jHquSUUYzKF2g2YpWZCZ9gCdyuU1DDQzecvVUtQ0y8qw+xxsyDilIxTkR/ WtvP3CcnsnH5x2RjwQbSSftsp8G92ZBH7Nw/i4xffC57yvJ7M0wPihdYZylM5wRXsnTq sdnan8ZerO3VJfm/16IrRAhu/pQMVGDT7IwxDWq5+Rafgac3hqpWWuQOqs1cq++kRcZN TmFw== X-Gm-Message-State: AOAM532rZJFvZcv3RAZ3iLFPKRwZbEIFYbHVSM1UFosRonH94zpWzMQG NSrXGopneTN8ncA3HVaDo3QUCnP6//UJ7g== X-Google-Smtp-Source: ABdhPJz8hv3Ud1aRHT/p3WUU2NRog/gn/GZMtrUlhnToB+h37r4RAbY6EH/FBw1bXKvDPPMBAUZ34w== X-Received: by 2002:adf:f303:: with SMTP id i3mr5330125wro.60.1612535812030; Fri, 05 Feb 2021 06:36:52 -0800 (PST) Received: from p4 ([151.36.48.125]) by smtp.gmail.com with ESMTPSA id c18sm23466763wmk.0.2021.02.05.06.36.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2021 06:36:51 -0800 (PST) Date: Fri, 5 Feb 2021 14:36:48 +0000 From: Giancarlo Ferrari To: Russell King - ARM Linux admin Cc: Mark Rutland , linux-kernel@vger.kernel.org, penberg@kernel.org, geert@linux-m68k.org, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, rppt@kernel.org, giancarlo.ferrari@nokia.com Subject: Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated Message-ID: <20210205143647.GA7376@p4> References: <20210201130344.GF1463@shell.armlinux.org.uk> <20210201135714.GB66060@C02TD0UTHF1T.local> <20210201160838.GH1463@shell.armlinux.org.uk> <20210201200734.GC15399@p4> <20210201201633.GJ1463@shell.armlinux.org.uk> <20210201202742.GA17243@p4> <20210204234841.GA19339@p4> <20210205001833.GE1463@shell.armlinux.org.uk> <20210205004050.GA3319@p4> <20210205094458.GF1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210205094458.GF1463@shell.armlinux.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2021 at 09:44:59AM +0000, Russell King - ARM Linux admin wrote: > On Fri, Feb 05, 2021 at 12:40:54AM +0000, Giancarlo Ferrari wrote: > > Russell, > > > > On Fri, Feb 05, 2021 at 12:18:33AM +0000, Russell King - ARM Linux admin wrote: > > > On Thu, Feb 04, 2021 at 11:48:42PM +0000, Giancarlo Ferrari wrote: > > > > Can I ask about having it integrated ? > > > > > > Thanks for testing. Are you willing for me to add: > > > > > > Tested-by: Giancarlo Ferrari > > > > > > to the commit log? > > > > > > > Sure. > > > > I have a question regarding the patch. I saw that the structure start at > > the end of the relocation code: > > > > data = reboot_code_buffer + relocate_new_kernel_size; > > > > which means it overlap with the global symbol relocate_new_kernel_size. > > I think is minor comment as the variable is only used in the fncpy() > > then thrown away. > > The same is true of the rest of the kernel image if that's how you'd > like to look at it. > > relocate_new_kernel_size is just there to tell the C code the size of > the function, nothing more nothing less. It isn't there to be copied. > The copied code doesn't use it. > Yes, clear. > > Something like: > > > > data = reboot_code_buffer + relocate_new_kernel_size + sizeof(long); > > No. That will place the structure after the size variable, which we > don't want, and... > > > and accordingly in the instruction (arch/arm/kernel/relocate_kernel.S): > > > > adr r7, relocate_new_kernel_end > > ... we will then need to follow this with: > add r7, r7, #4 > > or replace it with: > adr r7, relocate_new_kernel_end + 4 > > so that r7 points at "data". > It was what I meant with "accordingly". > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! Regards, GF From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8705C433E0 for ; Fri, 5 Feb 2021 14:38:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64C39650DA for ; Fri, 5 Feb 2021 14:38:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64C39650DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cpVJf13WihXyx4dzLYqYa2YYT0OXgssuu/b4kmx2JQ0=; b=OAmi7jLumDT/tOUnbqYOFE39r qdl43AYk7rGNinsePGB7CWiHXK/UW3hZcJHCfx+pPVkK2pCBmmA+On5XT56+gk/S1r9tI/A9DdyaC +mUQulfT5hMRkG6UdPlnk72NTXP0MSlTY4yGMjgFHYshFY555TU2DxLCVxqGiLe+fUKshtTBx/Lqg mXngERfKDc7BxWRPyiVCdYd1iZS73kTCKwYoYSurjwwYUD9uarYJv3omYFKagOu6VJ35UffEsDanW c1ZyzObtOj/jsNphkoGXqvMAIfo7DjdvAoLzLL551IKHtc4l9kwWvXAXtzvEsLOeAbUyB7A8hzPbu KpqnriV8Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l82EC-0003Bg-AC; Fri, 05 Feb 2021 14:36:56 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l82E9-0003BH-Bf for linux-arm-kernel@lists.infradead.org; Fri, 05 Feb 2021 14:36:54 +0000 Received: by mail-wr1-x434.google.com with SMTP id u14so7959494wri.3 for ; Fri, 05 Feb 2021 06:36:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AYwzbRa5m9CR2V97fKwgd6SE184J0tEf0fKut5hCaio=; b=EyKTyzJyAI27MO+T5sTWBERnkvFIc6IPenn/KaWQtRtXFBG/rO041a/UCR1Ex5VwIT 3ytCUZ49tWW+raJDXBrWbQHEzu2p8+/I9m8viyg5cDqdNblIPpfheYcnOKfxrUga2WAu 6ZpDOX/IOStaTNS7rcYt5S8902GXSv1sD3bFKL3L3YlhMoSQ6tFEaWSpMfhC07uG54Lz i12Hxzp67gH842Kgx6d2S55fjHYvO6JfRCOCFGgJXI4Rn3JnzJS6smDuZ5wpQRc5JuGh G56mKaLmOVm/nBgojCXESXUtV3+LyslDttNF7nTnn9RuSE4tw4DilwIGyQjlW/zdRRsk g6YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AYwzbRa5m9CR2V97fKwgd6SE184J0tEf0fKut5hCaio=; b=AJM20ZEvbwudKTqDVVmJQ5JN2QezFbbRZWUJwdCuD3ooTidkFpKCpyn5buZVBVp6c/ Tj12wkF70mLjWgzyd4RrtKKoDkJUy90hCrpiwI5Fmk9iKccYA29OPaSpeW3dLlu4kXLg RL/vzTu9l3gByqTgYCKHvSUbB+HhWbmqiBbPvRZduS8BV3suc8TFrs069AuwbCtik1VC lwdfUuV8j+854wBvJTW2hlSAMxClv/reK0uTDE5B76wkEa5DVMex9JD93ZQF/EaElLC5 8c5iZDyOE/j5gXnjt2ppHHlQ6cM46a65ic9D7kaKEv+6OL41rCkjvJ5kCFYDTzzVTiLk 4s/Q== X-Gm-Message-State: AOAM530TasQtJJ/xUlGGUp2YP+Y/c8kOMFCvDSSpztvVlzXNWUH1Dnf1 Qp0m2Fcnl+Do+7PIhTIlU20= X-Google-Smtp-Source: ABdhPJz8hv3Ud1aRHT/p3WUU2NRog/gn/GZMtrUlhnToB+h37r4RAbY6EH/FBw1bXKvDPPMBAUZ34w== X-Received: by 2002:adf:f303:: with SMTP id i3mr5330125wro.60.1612535812030; Fri, 05 Feb 2021 06:36:52 -0800 (PST) Received: from p4 ([151.36.48.125]) by smtp.gmail.com with ESMTPSA id c18sm23466763wmk.0.2021.02.05.06.36.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2021 06:36:51 -0800 (PST) Date: Fri, 5 Feb 2021 14:36:48 +0000 From: Giancarlo Ferrari To: Russell King - ARM Linux admin Subject: Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated Message-ID: <20210205143647.GA7376@p4> References: <20210201130344.GF1463@shell.armlinux.org.uk> <20210201135714.GB66060@C02TD0UTHF1T.local> <20210201160838.GH1463@shell.armlinux.org.uk> <20210201200734.GC15399@p4> <20210201201633.GJ1463@shell.armlinux.org.uk> <20210201202742.GA17243@p4> <20210204234841.GA19339@p4> <20210205001833.GE1463@shell.armlinux.org.uk> <20210205004050.GA3319@p4> <20210205094458.GF1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210205094458.GF1463@shell.armlinux.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210205_093653_514178_3B426728 X-CRM114-Status: GOOD ( 26.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-kernel@vger.kernel.org, penberg@kernel.org, geert@linux-m68k.org, rppt@kernel.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, giancarlo.ferrari@nokia.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 05, 2021 at 09:44:59AM +0000, Russell King - ARM Linux admin wrote: > On Fri, Feb 05, 2021 at 12:40:54AM +0000, Giancarlo Ferrari wrote: > > Russell, > > > > On Fri, Feb 05, 2021 at 12:18:33AM +0000, Russell King - ARM Linux admin wrote: > > > On Thu, Feb 04, 2021 at 11:48:42PM +0000, Giancarlo Ferrari wrote: > > > > Can I ask about having it integrated ? > > > > > > Thanks for testing. Are you willing for me to add: > > > > > > Tested-by: Giancarlo Ferrari > > > > > > to the commit log? > > > > > > > Sure. > > > > I have a question regarding the patch. I saw that the structure start at > > the end of the relocation code: > > > > data = reboot_code_buffer + relocate_new_kernel_size; > > > > which means it overlap with the global symbol relocate_new_kernel_size. > > I think is minor comment as the variable is only used in the fncpy() > > then thrown away. > > The same is true of the rest of the kernel image if that's how you'd > like to look at it. > > relocate_new_kernel_size is just there to tell the C code the size of > the function, nothing more nothing less. It isn't there to be copied. > The copied code doesn't use it. > Yes, clear. > > Something like: > > > > data = reboot_code_buffer + relocate_new_kernel_size + sizeof(long); > > No. That will place the structure after the size variable, which we > don't want, and... > > > and accordingly in the instruction (arch/arm/kernel/relocate_kernel.S): > > > > adr r7, relocate_new_kernel_end > > ... we will then need to follow this with: > add r7, r7, #4 > > or replace it with: > adr r7, relocate_new_kernel_end + 4 > > so that r7 points at "data". > It was what I meant with "accordingly". > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! Regards, GF _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel