linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: hpa@zytor.com, linux-kernel@vger.kernel.org, x86@kernel.org
Cc: sstabellini@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de
Subject: Re: [PATCH] x86/boot: clear rsdp address in boot_params for broken loaders
Date: Tue, 4 Dec 2018 06:32:04 +0100	[thread overview]
Message-ID: <082a6607-09f2-72d3-84f7-794c68412c66@suse.com> (raw)
In-Reply-To: <2489CC78-0410-4F0D-9D79-7905868B51BC@zytor.com>

On 04/12/2018 00:07, hpa@zytor.com wrote:
> On December 3, 2018 2:38:11 AM PST, Juergen Gross <jgross@suse.com> wrote:
>> In case a broken boot loader doesn't clear its struct boot_params clear
>> rsdp_addr in sanitize_boot_params().
>>
>> This fixes commit e6e094e053af75 ("x86/acpi, x86/boot: Take RSDP
>> address from boot params if available") e.g. for the case of a boot via
>> systemd-boot.
>>
>> Fixes: e6e094e053af75 ("x86/acpi, x86/boot: Take RSDP address from boot
>> params if available")
>> Reported-by: Gunnar Krueger <taijian@posteo.de>
>> Tested-by: Gunnar Krueger <taijian@posteo.de>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> arch/x86/include/asm/bootparam_utils.h | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/x86/include/asm/bootparam_utils.h
>> b/arch/x86/include/asm/bootparam_utils.h
>> index a07ffd23e4dd..f6f6ef436599 100644
>> --- a/arch/x86/include/asm/bootparam_utils.h
>> +++ b/arch/x86/include/asm/bootparam_utils.h
>> @@ -36,6 +36,7 @@ static void sanitize_boot_params(struct boot_params
>> *boot_params)
>> 	 */
>> 	if (boot_params->sentinel) {
>> 		/* fields in boot_params are left uninitialized, clear them */
>> +		boot_params->acpi_rsdp_addr = 0;
>> 		memset(&boot_params->ext_ramdisk_image, 0,
>> 		       (char *)&boot_params->efi_info -
>> 			(char *)&boot_params->ext_ramdisk_image);
> 
> Isn't this already covered by the memset()? If not, we should extend the memset() to maximal coverage.

I'd like to send a followup patch doing that. And I'd like to not only
test sentinel for being non-zero, but all padding fields as well. This
should be 4.21 material, though.


Juergen

  reply	other threads:[~2018-12-04  5:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 10:38 [PATCH] x86/boot: clear rsdp address in boot_params for broken loaders Juergen Gross
2018-12-03 15:54 ` [tip:x86/urgent] x86/boot: Clear RSDP " tip-bot for Juergen Gross
2018-12-03 23:07 ` [PATCH] x86/boot: clear rsdp " hpa
2018-12-04  5:32   ` Juergen Gross [this message]
2018-12-04  5:49     ` H. Peter Anvin
2018-12-04  6:03       ` Juergen Gross

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=082a6607-09f2-72d3-84f7-794c68412c66@suse.com \
    --to=jgross@suse.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).