[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] loader/i386/linux: calculate the size of the setup header
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] loader/i386/linux: calculate the size of the setup header |
Date: |
Fri, 18 May 2018 13:53:01 +0200 |
User-agent: |
Mutt/1.3.28i |
Re-added grub-devel. Next time please do not drop GRUB ML from the addresses.
On Thu, May 17, 2018 at 03:40:32PM -0700, Andrew Jeddeloh wrote:
> Sorry about the long delay, I agree with all the sugguestions, except
> shouldn't
No problem.
> if (len > &linux_params.e820_map - &linux_params)
>
> be
>
> if (len > sizeof(linux_params))
>
> since at that point len is the total size of the header which
> linux_params represents?
Please take a look at arch/x86/include/uapi/asm/bootparam.h in latest
Linux kernel source. My proposal is better but it seems to me right now
that it is still too much. I have a feeling that we should not go beyond
the end of boot_params._pad7. Am I right?
Daniel