mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Paul Cercueil <paul@crapouillou.net>
Cc: od@zcrc.me, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Bjørn Mork" <bjorn@mork.no>
Subject: Re: [PATCH] MIPS: vmlinux.lds.S: Fix appended dtb not properly aligned
Date: Tue, 16 Mar 2021 22:59:19 +0100	[thread overview]
Message-ID: <20210316215919.GA18538@alpha.franken.de> (raw)
In-Reply-To: <20210316154515.171543-1-paul@crapouillou.net>

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 <bjorn@mork.no>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  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 ]

      parent reply	other threads:[~2021-03-16 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 15:45 Paul Cercueil
2021-03-16 17:02 ` Bjørn Mork
2021-03-16 21:59 ` Thomas Bogendoerfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210316215919.GA18538@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=bjorn@mork.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=paul@crapouillou.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome