From: Peter Zijlstra <peterz@infradead.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
Arjan van de Ven <arjan@linux.intel.com>,
Borislav Petkov <bp@alien8.de>,
Dan Williams <dan.j.williams@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix compilation of 64-bit kernel with 32-bit compiler
Date: Thu, 8 Mar 2018 10:39:44 +0100 [thread overview]
Message-ID: <20180308093944.GU25181@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.LRH.2.02.1803080406590.2871@file01.intranet.prod.int.rdu2.redhat.com>
On Thu, Mar 08, 2018 at 04:09:30AM -0500, Mikulas Patocka wrote:
>
>
> On Thu, 8 Mar 2018, Peter Zijlstra wrote:
>
> > On Thu, Mar 08, 2018 at 01:11:26AM -0500, Mikulas Patocka wrote:
> > > The patch b5bc2231b8ad4387c9641f235ca0ad8cd300b6df ("objtool: Add
> > > retpoline validation") broke compiling 64-bit kernel with 32-bit compiler.
> > >
> > > This patch fixes the following error and a large number of "can't find
> > > rela for retpoline_safe" errors that occur when using x32 or i386 gcc.
> > >
> > > You shouldn't use the type 'unsigned long' in objtool at all - because its
> > > size depends on the compiler and not on the kernel you are compiling.
> >
> > Your patch is wrong because the data field is actually a long. A correct
> > patch is already in merged in tip.
>
> I'm wondering, why is objtool using 'unsigned long' at all? Why not
> uint32_t and uint64_t? The size of 'unsigned long' is dependent on the
> compiler, so it will lead to different behavior.
Because pointers... As Josh said, I should've used the right ELF methods
which use the object's ABI.
next prev parent reply other threads:[~2018-03-08 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 6:11 Mikulas Patocka
2018-03-08 7:39 ` Peter Zijlstra
2018-03-08 9:09 ` Mikulas Patocka
2018-03-08 9:39 ` Peter Zijlstra [this message]
2018-03-08 15:17 ` Josh Poimboeuf
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=20180308093944.GU25181@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=arjan@linux.intel.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=mpatocka@redhat.com \
--cc=tglx@linutronix.de \
/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®