LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: Alexander Potapenko <glider@google.com>,
	mingo@kernel.org, kirill.shutemov@linux.intel.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	mka@chromium.org, dvyukov@google.com, md@google.com
Subject: Re: [PATCH v2] x86/boot/64/clang: Use fixup_pointer() to access '__supported_pte_mask'
Date: Tue, 8 May 2018 09:49:39 -0700	[thread overview]
Message-ID: <a67943d1-f7e8-c465-ce8d-a9c9a0a6f653@linux.intel.com> (raw)
In-Reply-To: <20180508162829.7729-1-glider@google.com>

On 05/08/2018 09:28 AM, Alexander Potapenko wrote:
> Clang builds with defconfig started crashing after commit fb43d6cb91ef
> ("x86/mm: Do not auto-massage page protections")
> This was caused by introducing a new global access in __startup_64().
> 
> Code in __startup_64() can be relocated during execution, but the compiler
> doesn't have to generate PC-relative relocations when accessing globals
> from that function. Clang actually does not generate them, which leads
> to boot-time crashes. To work around this problem, every global pointer
> must be adjusted using fixup_pointer().

Looks good to me.  Thanks for adding the comment, especially!

Reviewed-by: Dave Hansen <dave.hansen@intel.com>

  reply	other threads:[~2018-05-08 16:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 16:28 Alexander Potapenko
2018-05-08 16:49 ` Dave Hansen [this message]
2018-05-08 21:44 ` Kirill A. Shutemov
2018-05-09  9:16   ` Alexander Potapenko

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=a67943d1-f7e8-c465-ce8d-a9c9a0a6f653@linux.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=md@google.com \
    --cc=mingo@kernel.org \
    --cc=mka@chromium.org \
    --subject='Re: [PATCH v2] x86/boot/64/clang: Use fixup_pointer() to access '\''__supported_pte_mask'\''' \
    /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

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).