mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: tip-bot2 for Kairui Song <tip-bot2@linutronix.de>,
	linux-tip-commits@vger.kernel.org
Cc: Kairui Song <kasong@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [tip: x86/urgent] x86/kexec: Use up-to-dated screen_info copy to fill boot params
Date: Tue, 27 Oct 2020 21:07:06 +0100	[thread overview]
Message-ID: <877drb1lhx.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <160269020077.7002.6607120194042289745.tip-bot2@tip-bot2>

On Wed, Oct 14 2020 at 15:43, tip-bot wrote:
> The following commit has been merged into the x86/urgent branch of tip:
> x86/kexec: Use up-to-dated screen_info copy to fill boot params
>
> kexec_file_load() currently reuses the old boot_params.screen_info,
> but if drivers have change the hardware state, boot_param.screen_info
> could contain invalid info.
>
> For example, the video type might be no longer VGA, or the frame buffer
> address might be changed. If the kexec kernel keeps using the old screen_info,
> kexec'ed kernel may attempt to write to an invalid framebuffer
> memory region.
>
> There are two screen_info instances globally available, boot_params.screen_info
> and screen_info. Later one is a copy, and is updated by drivers.
>  
>  	/* Copying screen_info will do? */
> -	memcpy(&params->screen_info, &boot_params.screen_info,
> -				sizeof(struct screen_info));
> +	memcpy(&params->screen_info, &screen_info, sizeof(struct screen_info));

Well, that's better than what we had before, but how is this correct
vs. the following sequence:

    kexec_load()
    change_screen()
    kexec()

Hmm?

Thanks,

        tglx

  reply	other threads:[~2020-10-27 20:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  9:24 [PATCH 0/2] x86/hyperv: fix kexec/kdump hang on some VMs Kairui Song
2020-10-14  9:24 ` [PATCH 1/2] x86/kexec: Use up-to-dated screen_info copy to fill boot params Kairui Song
2020-10-14 15:43   ` [tip: x86/urgent] " tip-bot2 for Kairui Song
2020-10-27 20:07     ` Thomas Gleixner [this message]
2020-11-17  3:39   ` [PATCH 1/2] " Dexuan Cui
2020-11-25 23:39     ` Dexuan Cui
2020-10-14  9:24 ` [PATCH 2/2] hyperv_fb: Update screen_info after removing old framebuffer Kairui Song
2020-10-14 15:43   ` [tip: x86/urgent] " tip-bot2 for Kairui Song

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=877drb1lhx.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=kasong@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tip-bot2@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

all inboxes | Powered by JetHome®