All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Sankar <nivedita@alum.mit.edu>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Arvind Sankar <nivedita@alum.mit.edu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] x86/purgatory: Make sure we fail the build if purgatory.ro has missing symbols
Date: Thu, 12 Mar 2020 14:23:23 -0400	[thread overview]
Message-ID: <20200312182322.GA506594@rani.riverdale.lan> (raw)
In-Reply-To: <e96ea0cc-954d-2cd3-8d9d-53d57856d8aa@redhat.com>

On Thu, Mar 12, 2020 at 06:46:44PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 3/12/20 1:10 AM, Arvind Sankar wrote:
> > On Wed, Mar 11, 2020 at 10:46:01PM +0100, Hans de Goede wrote:
> >> Since we link purgatory.ro with -r aka we enable "incremental linking"
> >> no checks for unresolved symbols is done while linking purgatory.ro.
> >>
> > 
> > Do we actually need to link purgatory with -r? We could use
> > --emit-relocs to get the relocation sections generated the way the main
> > x86 kernel does, no?
> > 
> > Eg like the below? This would avoid the double-link creating
> > purgatory.chk.
> 
> So I've changed the patch for this in my local tree over to the version
> suggested below and tested kexec with this (and I can confirm that it
> still works)
> 
> I'm wondering though if it would not be better to keep the purgatory.ro name ?  :
> 
> 1. The generated ELF binary should still be relocatable
> 2. .ro files are part of the global .gitignore settings, for the
>     new purgatory name we need to add an arch/x86/purgatory/.gitignore file
> 3. Keeping the purgatory.ro name will make the diff easier to read
> 
> Regards,
> 
> Hans
> 

No objections to the name, we can change it later to purgatory.elf or
something if we want in a separate patch.

There is one issue I noticed -- x86_64 kernel default LDFLAGS have
max-page-size=0x200000. If purgatory is linked into a real executable
this makes kexec-purgatory.o become quite large, from about 25k to just
over 4Mb.  Adding -z max-page-size=4096 to the LDFLAGS lowers this back
down to around 29k. arch/x86/entry/vdso/Makefile adds this flag too.

  reply	other threads:[~2020-03-12 18:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 21:45 [PATCH v4 0/2] x86/purgatory: Make sure we fail the build if purgatory.ro has missing symbols Hans de Goede
2020-03-11 21:46 ` [PATCH v4 1/2] x86/purgatory: Fix missing ftrace_likely_update symbol Hans de Goede
2020-03-11 21:46 ` [PATCH v4 2/2] x86/purgatory: Make sure we fail the build if purgatory.ro has missing symbols Hans de Goede
2020-03-12  0:10   ` Arvind Sankar
2020-03-12 11:31     ` Hans de Goede
2020-03-12 11:42       ` Borislav Petkov
2020-03-12 11:58         ` Hans de Goede
2020-03-12 12:50           ` Borislav Petkov
2020-03-12 13:34             ` Hans de Goede
2020-03-12 14:25               ` Borislav Petkov
2020-03-12 14:38                 ` Hans de Goede
2020-03-12 14:49                   ` Borislav Petkov
2020-03-12 14:57                     ` Hans de Goede
2020-03-12 15:12                       ` Borislav Petkov
2020-03-13  4:42             ` Arvind Sankar
2020-03-13  4:58               ` Arvind Sankar
2020-03-13  5:15                 ` Arvind Sankar
2020-03-16 18:52                 ` Nick Desaulniers
2020-03-13 10:47               ` Hans de Goede
2020-03-13 18:06               ` Borislav Petkov
2020-03-12 17:46     ` Hans de Goede
2020-03-12 18:23       ` Arvind Sankar [this message]
2020-03-12  5:56   ` kbuild test robot
2020-03-12 13:59   ` kbuild test robot

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=20200312182322.GA506594@rani.riverdale.lan \
    --to=nivedita@alum.mit.edu \
    --cc=bp@alien8.de \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.