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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 28351C433EF for ; Tue, 21 Dec 2021 02:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UlYVccEjZ47TKFDgAno1kkKDcJOL8glR2sLTcC7/9Qw=; b=i/zMK2vDi2w/QM YZ2CtIrRk/9WRtkSBgbCiUMiGAaDtC1W68aWdXYWNvsIC5TXbzLEooNIbtphj2aioRYp+MktJXTFp cTbArwC3mHbSOhxYCIu/pzv9HPC/Vk3KPJOLaxCJF1t0BA+/4pgahZKK1BqfIiW6XVKHgkTvuX2a+ +byQCqK1+WAZrUs8qEd2yPMDqHC69KrL7DKNTzbaAzUouoKMyPISHIURqUP8sxWq6No87JN6oFe8w iIktbhnrQjX6Mo5X/37DKnYjnorTKNE44mV0Y7Na5gSOqkfog9AKMCUKD3sA6vdP3qytbaIUcVHZh 7DoYREQzRNyuYOj9Lp1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzUWt-005Bgz-WD; Tue, 21 Dec 2021 02:05:28 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzUTM-0059XV-7H; Tue, 21 Dec 2021 02:01:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA6DCB8110A; Tue, 21 Dec 2021 02:01:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF83CC36AE5; Tue, 21 Dec 2021 02:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640052105; bh=1Zi09LysPGvsPv/8d9w6nAFHTkfB3G2bKujERLUMp7E=; h=From:To:Cc:Subject:Date:From; b=ZzzTZnfyENIAMitcOYpHXOR1iXgbqQaoRysoyvq9jbVvTQ0kGi9yosA8aDa9dqKQg s04sXZQ5wteSnvqSmmZAKaPX3+766f3cNjUCxAfRuLYn0krH4HR0n05Sq3jFz9AreY yGAjOi3olDyds0Qt/vOWTk2duz8I4Yv3Q70JiIBCBweH5cdjh0+gHGq67Ev72Atg20 48B03QCDblEF/vQb4dDZg0GxAoGkfN1TTvv8rPjFYZ7JP52IdALJGdmflcsPDlSUld x5f2cuwgbwhpK8jLiRi+u3rDvLQjtFg1N1PE4DEfwBmDItg8hVJ/e4BrdPJesu0XPS rk2czg6yI0jMA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Ivan T. Ivanov" , Heiko Stuebner , Sasha Levin , linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 4.14 1/9] ARM: rockchip: Use memcpy_toio instead of memcpy on smp bring-up Date: Mon, 20 Dec 2021 21:01:15 -0500 Message-Id: <20211221020123.117380-1-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_180148_438153_AB15FF01 X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: "Ivan T. Ivanov" [ Upstream commit 423e85e97aaf69e5198bbec6811e3825c8b5019a ] This fixes a potential kernel panic on memcpy when FORTIFY_SOURCE is enabled. Because memory is iomem use appropriate function for accessing it. Signed-off-by: Ivan T. Ivanov Link: https://lore.kernel.org/r/20211116084616.24811-1-iivanov@suse.de Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin --- arch/arm/mach-rockchip/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index ecec340ca3457..bb69e6e6defe8 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -198,7 +198,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node) rockchip_boot_fn = __pa_symbol(secondary_startup); /* copy the trampoline to sram, that runs during startup of the core */ - memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); + memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); flush_cache_all(); outer_clean_range(0, trampoline_sz); -- 2.34.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C9ACC433EF for ; Tue, 21 Dec 2021 02:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=38L6f2I4ZEBejv782nX1aojpDLxWghbGgUm3mdOsMY4=; b=wJRxQH8rhC6NYc 51l6cl54ogbPidiuH1EuxVNj3T7xeGcJzDM+EPYKNWFhCtaE4hdtZUHYNhGk3jMnTEeRXoLqfiJ8Q c9Tn0aZ45h96t2QaDB3N6Iib08ICVtGqaYDyo9IGEaUfvI2lgVnNlchhspkvgGV2P7GulSLbSNoXE +5Pel3/yw84ol7JmvtuC0/8Cs70LBGwSGmxUJZxxiGyIPtK+ebnCsB39bO5cL3OrgEbhvsgvOP/QM 6jeXKKZEjB+IMaG7SAAYXYBpG2vpQEJ+U+fXR3yyOM3PRcK3VRGKvuIopEoAaIPcmsuWtR/PCKBPf GCAe3hHdHiYpvy9kqTuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzUWO-005BNn-Bn; Tue, 21 Dec 2021 02:04:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzUTM-0059XV-7H; Tue, 21 Dec 2021 02:01:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA6DCB8110A; Tue, 21 Dec 2021 02:01:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF83CC36AE5; Tue, 21 Dec 2021 02:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640052105; bh=1Zi09LysPGvsPv/8d9w6nAFHTkfB3G2bKujERLUMp7E=; h=From:To:Cc:Subject:Date:From; b=ZzzTZnfyENIAMitcOYpHXOR1iXgbqQaoRysoyvq9jbVvTQ0kGi9yosA8aDa9dqKQg s04sXZQ5wteSnvqSmmZAKaPX3+766f3cNjUCxAfRuLYn0krH4HR0n05Sq3jFz9AreY yGAjOi3olDyds0Qt/vOWTk2duz8I4Yv3Q70JiIBCBweH5cdjh0+gHGq67Ev72Atg20 48B03QCDblEF/vQb4dDZg0GxAoGkfN1TTvv8rPjFYZ7JP52IdALJGdmflcsPDlSUld x5f2cuwgbwhpK8jLiRi+u3rDvLQjtFg1N1PE4DEfwBmDItg8hVJ/e4BrdPJesu0XPS rk2czg6yI0jMA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Ivan T. Ivanov" , Heiko Stuebner , Sasha Levin , linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 4.14 1/9] ARM: rockchip: Use memcpy_toio instead of memcpy on smp bring-up Date: Mon, 20 Dec 2021 21:01:15 -0500 Message-Id: <20211221020123.117380-1-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_180148_438153_AB15FF01 X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 From: "Ivan T. Ivanov" [ Upstream commit 423e85e97aaf69e5198bbec6811e3825c8b5019a ] This fixes a potential kernel panic on memcpy when FORTIFY_SOURCE is enabled. Because memory is iomem use appropriate function for accessing it. Signed-off-by: Ivan T. Ivanov Link: https://lore.kernel.org/r/20211116084616.24811-1-iivanov@suse.de Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin --- arch/arm/mach-rockchip/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index ecec340ca3457..bb69e6e6defe8 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -198,7 +198,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node) rockchip_boot_fn = __pa_symbol(secondary_startup); /* copy the trampoline to sram, that runs during startup of the core */ - memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); + memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); flush_cache_all(); outer_clean_range(0, trampoline_sz); -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C124C4332F for ; Tue, 21 Dec 2021 02:04:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234078AbhLUCEX (ORCPT ); Mon, 20 Dec 2021 21:04:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232037AbhLUCCr (ORCPT ); Mon, 20 Dec 2021 21:02:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383D1C07E5C5; Mon, 20 Dec 2021 18:01:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F3A17B8110C; Tue, 21 Dec 2021 02:01:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF83CC36AE5; Tue, 21 Dec 2021 02:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640052105; bh=1Zi09LysPGvsPv/8d9w6nAFHTkfB3G2bKujERLUMp7E=; h=From:To:Cc:Subject:Date:From; b=ZzzTZnfyENIAMitcOYpHXOR1iXgbqQaoRysoyvq9jbVvTQ0kGi9yosA8aDa9dqKQg s04sXZQ5wteSnvqSmmZAKaPX3+766f3cNjUCxAfRuLYn0krH4HR0n05Sq3jFz9AreY yGAjOi3olDyds0Qt/vOWTk2duz8I4Yv3Q70JiIBCBweH5cdjh0+gHGq67Ev72Atg20 48B03QCDblEF/vQb4dDZg0GxAoGkfN1TTvv8rPjFYZ7JP52IdALJGdmflcsPDlSUld x5f2cuwgbwhpK8jLiRi+u3rDvLQjtFg1N1PE4DEfwBmDItg8hVJ/e4BrdPJesu0XPS rk2czg6yI0jMA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Ivan T. Ivanov" , Heiko Stuebner , Sasha Levin , linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 4.14 1/9] ARM: rockchip: Use memcpy_toio instead of memcpy on smp bring-up Date: Mon, 20 Dec 2021 21:01:15 -0500 Message-Id: <20211221020123.117380-1-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Ivan T. Ivanov" [ Upstream commit 423e85e97aaf69e5198bbec6811e3825c8b5019a ] This fixes a potential kernel panic on memcpy when FORTIFY_SOURCE is enabled. Because memory is iomem use appropriate function for accessing it. Signed-off-by: Ivan T. Ivanov Link: https://lore.kernel.org/r/20211116084616.24811-1-iivanov@suse.de Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin --- arch/arm/mach-rockchip/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index ecec340ca3457..bb69e6e6defe8 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -198,7 +198,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node) rockchip_boot_fn = __pa_symbol(secondary_startup); /* copy the trampoline to sram, that runs during startup of the core */ - memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); + memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); flush_cache_all(); outer_clean_range(0, trampoline_sz); -- 2.34.1