Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4514472pxf; Tue, 16 Mar 2021 15:58:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKkL9F17Mo7ITOScl3jTOnemaARy9OM77VG2a+UHCLfAJBGYbO6MmbSEvnBnK7FSGFyOc+ X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr39267517edb.10.1615935524149; Tue, 16 Mar 2021 15:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615935524; cv=none; d=google.com; s=arc-20160816; b=N9KZlriBDYwL7277M6tL4VTVTu2DeeR/cOAOC/UBOZfNI+xqxGX2QRQ3cOJbnGhTrE lu0YFDfx0tw3JhjlrhIoxa38Ja+IMCSc8TVfyZhJJjAE4yleUu0+4HC5EJdEjdW3npkR bBQMbXtirMJESA+HzwDSHAbqoHWOseLMsJjq1N/E8GR9E91rGNOuRP3TzVatZKZX4acN mQD+Z4xjvMqquyl8ubRLbmigtYRLpEVvvTmqt5TfsSrz5VHar4J15b0RmKnc+lNntfSp fMgsnYSicUSfxX81F1iJVHJjH2AkO/epUJy3wn9SH+EEVXyXiedBLw0kdG5Vm3+1j/fs jlIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gDfHHQqNdCKF2TVD3zv8SktMFtlk1eN7Hg9+miOhIuw=; b=IwE7iI+Lotn8QhR7eTVQQCQLvL4ncjXwG75wRVVsymCkoP1wbcSYGuhS7dr1bsiTe2 qIM+wOOpD+LksMHU0pHYPEjEoe/DGFr+RQamxPRH0xTE65xc4CINywjEVqVh74ym2FT/ +knpdJQgX9Z4rmpEiyTMVfKTxTtm/0QzzCMjWH+xTJDlpu2VyOV+OpcR1sedC9WIeqgw XRXUEEoe0CBeGkXgZHyMhisdHQoIw73Bs33E7MGcQj2JQCkOQ5M8NXgEco6OSlDaqhC5 9KeF9G+GodhStkQ3dbVqONWehBI+5tXb16ckA1nJ5OUj/Aau3O5rzR1uGqPtGMBnVRXs /nDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fx21si14575561ejb.91.2021.03.16.15.58.22; Tue, 16 Mar 2021 15:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230254AbhCPWFT (ORCPT + 99 others); Tue, 16 Mar 2021 18:05:19 -0400 Received: from elvis.franken.de ([193.175.24.41]:35191 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbhCPWEv (ORCPT ); Tue, 16 Mar 2021 18:04:51 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1lMHo2-0005CW-00; Tue, 16 Mar 2021 23:04:50 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 46743C093D; Tue, 16 Mar 2021 22:59:19 +0100 (CET) Date: Tue, 16 Mar 2021 22:59:19 +0100 From: Thomas Bogendoerfer To: Paul Cercueil Cc: od@zcrc.me, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, =?iso-8859-1?Q?Bj=F8rn?= Mork Subject: Re: [PATCH] MIPS: vmlinux.lds.S: Fix appended dtb not properly aligned Message-ID: <20210316215919.GA18538@alpha.franken.de> References: <20210316154515.171543-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210316154515.171543-1-paul@crapouillou.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 03:45:15PM +0000, Paul Cercueil wrote: > Commit 6654111c893f ("MIPS: vmlinux.lds.S: align raw appended dtb to 8 > bytes") changed the alignment from STRUCT_ALIGNMENT bytes to 8 bytes. > > The commit's message makes it sound like it was actually done on > purpose, but this is not the case. The commit was written when raw > appended dtb were not aligned at all. The STRUCT_ALIGN() was added a few > days before, in commit 7a05293af39f ("MIPS: boot/compressed: Copy DTB to > aligned address"). The true purpose of the commit was not to align > specifically to 8 bytes, but to make sure that the generated vmlinux' > size was properly padded to the alignment required for DTBs. > > While the switch to 8-byte alignment worked for vmlinux-appended dtb > blobs, it broke vmlinuz-appended dtb blobs, as the decompress routine > moves the blob to a STRUCT_ALIGNMENT aligned address. > > Fix this by changing the raw appended dtb blob alignment from 8 bytes > back to STRUCT_ALIGNMENT bytes in vmlinux.lds.S. > > Fixes: 6654111c893f ("MIPS: vmlinux.lds.S: align raw appended dtb to 8 bytes") > Cc: Bj?rn Mork > Signed-off-by: Paul Cercueil > --- > arch/mips/kernel/vmlinux.lds.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied to mips-fixes. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]