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=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 3C9D4C433E0 for ; Thu, 4 Feb 2021 23:49:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11CE664FA9 for ; Thu, 4 Feb 2021 23:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231321AbhBDXt3 (ORCPT ); Thu, 4 Feb 2021 18:49:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbhBDXt1 (ORCPT ); Thu, 4 Feb 2021 18:49:27 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3ACEC0613D6 for ; Thu, 4 Feb 2021 15:48:46 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id q7so5545332wre.13 for ; Thu, 04 Feb 2021 15:48:46 -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=M+Q2uu3mtJ218GEh+NneAkHcQuIWLoAibVLNNnrJdfE=; b=mbdtuBQrIF7f3POD+AzUG3U1qpgi1DQcg/y/2DlRgeTlRjCdPgBivfC38oVMs8r6zJ xaRjgU4BXPvtuLeXU0zZsrlHeMNLvRMq2g/myiOekb2peUtDCbtfCkVNZCQuiI31RbgV hQh2cm0VVNGL3jes/7symOYkLM8aKlvwnA7WrnIc7DABrI4fTwdbhLb7tshTCakVskBd UrB+MBJ74yiADMT9PmHoTHNrvliNfvd/3R4Kcl3nhdHyydIiTHhU0L2zQHZRRpfkOgld rpHlUj0YJcKelAKSk6VCDIhgz6RXJNvKlSH+QgXVjKFV9+6ic3Dz2LwEnT1fahZfnyNP qsBQ== 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=M+Q2uu3mtJ218GEh+NneAkHcQuIWLoAibVLNNnrJdfE=; b=P9D0zmFmNZDTr+eKA9TDkuBZF5+yW+5Z82g4DCobD6McUxmyvmG4/t1X0nKdTey0lo i5kAxvbyHId2K96LrUj74a9qKe1opVpffSNyJR6d2oaCnWLBOD+D5pJxq7JKthtn6g6k cS7E6eC3nMWpAnZGI9HbqFjN/tIHkaUMUQhH7/X912pcftwtwXgInexuoIpDzxaTIf9P Q9JdQeJw2N6KdgV/rDnqcEj5UdSTU/an0F1RUM0jUVHCCHuGxWhpJ+LfTNC1rL8HwTfu yc3duVxTDZBzWFuS3VXEedmSr+waQbnFqtftXUwsVBaru2eg8VsB/tlFVG0vKMIIk3Cc /Gow== X-Gm-Message-State: AOAM530U+KP5b5f2GVLM+3OcSbdohtEcGR08FWwWGzduEjMXoUoyr+T/ K9TILCa3ytKuSfcp1t0DREF4Kz5Lglu1Xg== X-Google-Smtp-Source: ABdhPJy18vZLH/ZELwQPE5pvoEkmF+U8yvZ9YDbEiV/e2jmo6TKlyeSEuiu0f60mdaHlVWCptBo9jQ== X-Received: by 2002:a05:6000:1364:: with SMTP id q4mr1822415wrz.335.1612482525672; Thu, 04 Feb 2021 15:48:45 -0800 (PST) Received: from p4 ([151.82.81.135]) by smtp.gmail.com with ESMTPSA id m22sm11173232wrh.66.2021.02.04.15.48.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2021 15:48:45 -0800 (PST) Date: Thu, 4 Feb 2021 23:48:42 +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: <20210204234841.GA19339@p4> References: <1612140296-12546-1-git-send-email-giancarlo.ferrari89@gmail.com> <20210201124720.GA66060@C02TD0UTHF1T.local> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210201202742.GA17243@p4> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, On Mon, Feb 01, 2021 at 10:18:26PM +0000, Giancarlo Ferrari wrote: > Russell, > > On Mon, Feb 01, 2021 at 08:16:33PM +0000, Russell King - ARM Linux admin wrote: > > On Mon, Feb 01, 2021 at 08:07:37PM +0000, Giancarlo Ferrari wrote: > > > Hi, > > > > Hi, > > > > > Why we should align 3 ? For the fncpy I suppose. > > > > Slightly arbitary really - it gives a nice 8-byte alignment to the data. > > .align 2 would also be sufficient. > > > > > I don't know now how to proceed now, as you (Mark and you) do completely > > > the patch. > > > > Please can you test my patch and let us know if it solves your problem > > (or even if it works! I haven't tested it beyond build-testing.) > > I have tested your patch and it works. I have tested using kexec -l/kexec -e. Considering that .text var are no more written, I assume the issue is gone. > > sure, unfortunately due to restriction, I hope to test it by the end of the > week. I hope there will be no rush. Otherwise, please let me know. > > > > You see is my first kernel patch submission :) . > > > > Yay. Sorry for giving you a different patch - Mark is quite right that > > there's a better solution to this problem, which is eliminating the > > set_kernel_text_rw() call. The only reason I cooked up the patch was > > doing that would be more in-depth (as you can see from the increased > > size of the patch.) > > > > I definitely agree with you. > > > -- > > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! > > Thanks again, > > > GF Can I ask about having it integrated ? Thanks in advance, 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=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 6666DC433DB for ; Thu, 4 Feb 2021 23:50:08 +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 085E364FA4 for ; Thu, 4 Feb 2021 23:50:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 085E364FA4 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=dsBS83sI62XtP/iHvYGP1RRTb9je789nuYVi76iWg+o=; b=aGQVYAsq6P6SztH5NpOR7A5DT pilqAnHIbL9/IKZKYTRKV1P8n/P84PSB2t+08L21Pc2yLtrDKaxYN6m4RAj8o2UBuMIie8lp99IRa GEQjS/pbFcMdM4m9q1zy8MCtLtAb3eE7ZzLPuY8GjdwvIxgBHvNUfXOx0XIbbxWqMUXyhZZiJPi31 AuE0YnLG78TNIPbReWGi78fqkAfUH94CNFjNQzh6blZMjyWQI8ni3APpIQ89zGazkvHxQMXucjCTd L7YgaxKvv7s+sOZSxek1K154Ysqf/blAA8yPbpvEm6c/S0edZJDfF1gzWqUicq75vULrlpieqZgZK sc53RSHhg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7oMl-0005q5-Fw; Thu, 04 Feb 2021 23:48:51 +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 1l7oMi-0005pY-DS for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 23:48:49 +0000 Received: by mail-wr1-x434.google.com with SMTP id a1so5614086wrq.6 for ; Thu, 04 Feb 2021 15:48:46 -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=M+Q2uu3mtJ218GEh+NneAkHcQuIWLoAibVLNNnrJdfE=; b=mbdtuBQrIF7f3POD+AzUG3U1qpgi1DQcg/y/2DlRgeTlRjCdPgBivfC38oVMs8r6zJ xaRjgU4BXPvtuLeXU0zZsrlHeMNLvRMq2g/myiOekb2peUtDCbtfCkVNZCQuiI31RbgV hQh2cm0VVNGL3jes/7symOYkLM8aKlvwnA7WrnIc7DABrI4fTwdbhLb7tshTCakVskBd UrB+MBJ74yiADMT9PmHoTHNrvliNfvd/3R4Kcl3nhdHyydIiTHhU0L2zQHZRRpfkOgld rpHlUj0YJcKelAKSk6VCDIhgz6RXJNvKlSH+QgXVjKFV9+6ic3Dz2LwEnT1fahZfnyNP qsBQ== 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=M+Q2uu3mtJ218GEh+NneAkHcQuIWLoAibVLNNnrJdfE=; b=p8NzcEXieXC1rwToP05KtJxQhD+9z3sNqoo834iS9GXcq1v+IRfOoSkHudpPWHgooG 0w6gX/gEtUmdQFtCZ0ejCJvolLo6+ToXo++Xqo4GfZqxXQtKlGgSdyhRNUWT3s2BhoTc nWeKnjQdfPgH3rUdXh0fyw4e4YBNT/msvpH6m35NLejZ+H0uIFl8VvsetvBoT2tPq6m9 pudk6g+NgA7N9dmJ+PZhAEmQxwfndAFQwS+iDy1OYyiyi3eWSVoy9V0EtM5G2efQNRA3 1dAfKmj98MowUFu1RgvYZb2xmU9AT5kuNF4vqyVUlTyC2vwyrLfKVqeMvRWFKL2jr4gD hhYg== X-Gm-Message-State: AOAM531Bcfy3wmDSm1N+xWCxAGhZc3vS8jKNzWhECk2QjKehIyu3rXuE LubbP4275Iu8V7pC8cGtLwM= X-Google-Smtp-Source: ABdhPJy18vZLH/ZELwQPE5pvoEkmF+U8yvZ9YDbEiV/e2jmo6TKlyeSEuiu0f60mdaHlVWCptBo9jQ== X-Received: by 2002:a05:6000:1364:: with SMTP id q4mr1822415wrz.335.1612482525672; Thu, 04 Feb 2021 15:48:45 -0800 (PST) Received: from p4 ([151.82.81.135]) by smtp.gmail.com with ESMTPSA id m22sm11173232wrh.66.2021.02.04.15.48.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2021 15:48:45 -0800 (PST) Date: Thu, 4 Feb 2021 23:48:42 +0000 From: Giancarlo Ferrari To: Russell King - ARM Linux admin Subject: Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated Message-ID: <20210204234841.GA19339@p4> References: <1612140296-12546-1-git-send-email-giancarlo.ferrari89@gmail.com> <20210201124720.GA66060@C02TD0UTHF1T.local> <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210201202742.GA17243@p4> 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-20210204_184848_473034_AA75590A X-CRM114-Status: GOOD ( 27.23 ) 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 Hi all, On Mon, Feb 01, 2021 at 10:18:26PM +0000, Giancarlo Ferrari wrote: > Russell, > > On Mon, Feb 01, 2021 at 08:16:33PM +0000, Russell King - ARM Linux admin wrote: > > On Mon, Feb 01, 2021 at 08:07:37PM +0000, Giancarlo Ferrari wrote: > > > Hi, > > > > Hi, > > > > > Why we should align 3 ? For the fncpy I suppose. > > > > Slightly arbitary really - it gives a nice 8-byte alignment to the data. > > .align 2 would also be sufficient. > > > > > I don't know now how to proceed now, as you (Mark and you) do completely > > > the patch. > > > > Please can you test my patch and let us know if it solves your problem > > (or even if it works! I haven't tested it beyond build-testing.) > > I have tested your patch and it works. I have tested using kexec -l/kexec -e. Considering that .text var are no more written, I assume the issue is gone. > > sure, unfortunately due to restriction, I hope to test it by the end of the > week. I hope there will be no rush. Otherwise, please let me know. > > > > You see is my first kernel patch submission :) . > > > > Yay. Sorry for giving you a different patch - Mark is quite right that > > there's a better solution to this problem, which is eliminating the > > set_kernel_text_rw() call. The only reason I cooked up the patch was > > doing that would be more in-depth (as you can see from the increased > > size of the patch.) > > > > I definitely agree with you. > > > -- > > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! > > Thanks again, > > > GF Can I ask about having it integrated ? Thanks in advance, GF _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel