From: David Laight <david.laight.linux@gmail.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Ard Biesheuvel <ardb+git@google.com>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Gerd Hoffmann <kraxel@redhat.com>,
Juergen Gross <jgross@suse.com>, Jan Beulich <jbeulich@suse.com>,
Paul Durrant <paul@xen.org>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [RFC PATCH resend] x86/boot: Drop CRC-32 checksum and the build tool that generates it
Date: Wed, 12 Mar 2025 18:57:39 +0000 [thread overview]
Message-ID: <20250312185739.426a8229@pumpkin> (raw)
In-Reply-To: <CAMj1kXGmyssEYer_Su1N+s9svNd3yNm7W4bf9DYHsJszxHoyUg@mail.gmail.com>
On Tue, 11 Mar 2025 18:44:09 +0100
Ard Biesheuvel <ardb@kernel.org> wrote:
> On Tue, 11 Mar 2025 at 18:29, H. Peter Anvin <hpa@zytor.com> wrote:
> >
> > On March 11, 2025 10:25:15 AM PDT, Ard Biesheuvel <ardb@kernel.org> wrote:
> > >On Tue, 11 Mar 2025 at 18:14, H. Peter Anvin <hpa@zytor.com> wrote:
> > >>
> > >> >Ard Biesheuvel <ardb+git@google.com> writes:
> > >> >
> > >...
> > >> >> it seems quite unlikely that this checksum is being used, so let's just
> > >> >> drop it, along with the tool that generates it.
> > >> >>
> > >> >> Instead, use simple file concatenation and truncation to combine the two
> > >> >> pieces into bzImage, and replace the checks on the size of the setup
> > >> >> block with a couple of ASSERT()s in the linker script.
> > >> >>
> > >...
> > >>
> > >> Please leave the bytes in question as explicit zeroes if possible.
> > >
> > >Keeping the
> > >
> > >. = ALIGN(. + 4, 0x200);
> > >
> > >in arch/x86/boot/compressed/vmlinux.lds.S should be sufficient to
> > >guarantee that the last 4 bytes of the file are zero, so it is quite
> > >trivial to implement. However, I'm not quite sure what purpose that
> > >would serve: could you elaborate?
> >
> > It means if someone *does* care it will be easier for them to adjust.
>
> I.e., someone can always stick a CRC-32 into the last 4 bytes if they
> wanted to? Yeah that makes sense.
I think you'd need a comment saying the last 4 bytes are reserved in case
anyone wants to add a hash.
David
>
prev parent reply other threads:[~2025-03-12 18:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 16:48 Ard Biesheuvel
2025-03-07 23:11 ` [tip: x86/build] " tip-bot2 for Ard Biesheuvel
2025-04-11 19:33 ` Dave Hansen
2025-04-11 19:52 ` Dave Hansen
2025-04-12 8:48 ` Ingo Molnar
2025-04-18 7:05 ` Ard Biesheuvel
2025-03-11 16:59 ` [RFC PATCH resend] " Vitaly Kuznetsov
2025-03-11 17:14 ` H. Peter Anvin
2025-03-11 17:25 ` Ard Biesheuvel
2025-03-11 17:29 ` H. Peter Anvin
2025-03-11 17:44 ` Ard Biesheuvel
2025-03-12 1:34 ` H. Peter Anvin
2025-03-12 18:57 ` David Laight [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=20250312185739.426a8229@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@xen.org \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®