Message ID | 20210118113335.175375354@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 37DF1C43381 for <stable@archiver.kernel.org>; Mon, 18 Jan 2021 19:54:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0351122B49 for <stable@archiver.kernel.org>; Mon, 18 Jan 2021 19:54:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393972AbhARTym (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 18 Jan 2021 14:54:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:33364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390340AbhARLhX (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 18 Jan 2021 06:37:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 43D13223E8; Mon, 18 Jan 2021 11:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610969765; bh=LVeGv/PO5hWNIpSt54n1uxyxR6fR1r3KSv8sBo48LTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x06sl2czUQAXvxbLoZpqmDzdZEtZT/VjPocSNdBc4aDb/QMZBv7UQ5n/SY52h4uNB BMR2+I1ZYe4v0FiP5Flcx9U4zpc2dXDAf6ZJNESPnPeRn1SgnWOcGeiXk4XU65QwQT EUUHne2WvxbQ4js8LLB4UfFNW6JlxpRPnUZv3mVY= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Paul Cercueil <paul@crapouillou.net>, Nick Desaulniers <ndesaulniers@google.com>, =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= <f4bug@amsat.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de> Subject: [PATCH 4.19 04/43] MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB Date: Mon, 18 Jan 2021 12:34:27 +0100 Message-Id: <20210118113335.175375354@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118113334.966227881@linuxfoundation.org> References: <20210118113334.966227881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/arch/mips/boot/compressed/decompress.c +++ b/arch/mips/boot/compressed/decompress.c @@ -17,6 +17,7 @@ #include <linux/libfdt.h> #include <asm/addrspace.h> +#include <asm/unaligned.h> /* * These two variables specify the free mem region @@ -117,7 +118,7 @@ void decompress_kernel(unsigned long boo dtb_size = fdt_totalsize((void *)&__appended_dtb); /* last four bytes is always image size in little endian */ - image_size = le32_to_cpup((void *)&__image_end - 4); + image_size = get_unaligned_le32((void *)&__image_end - 4); /* copy dtb to where the booted kernel will expect it */ memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,