linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: bp@alien8.de
Cc: luto@kernel.org, Fangrui Song <maskray@google.com>,
	Andi Kleen <ak@linux.intel.com>,
	andi@firstfloor.org, Dmitry Golovin <dima@golovin.in>,
	Bill Wendling <morbo@google.com>, Rui Ueyama <ruiu@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	rafael@espindo.la, Stephen Hines <srhines@google.com>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] x86/vdso: drop implicit common-page-size linker flag
Date: Fri, 7 Dec 2018 09:45:42 -0800	[thread overview]
Message-ID: <CAKwvOd=75MRjaDbEjHRaMTm1MSC1wkLxPKhH_S3KXreP8yU9Uw@mail.gmail.com> (raw)
In-Reply-To: <20181207101814.GA9385@zn.tnic>

On Fri, Dec 7, 2018 at 2:18 AM Borislav Petkov <bp@alien8.de> wrote:
>
> On Thu, Dec 06, 2018 at 11:12:31AM -0800, ndesaulniers@google.com wrote:
> > These are implied by the target architecture and for x86_64 match the
> > max-page-size. The default for non-NaCl x86_64 is 0x1000 (4096).
> >
> > In bfd the common page size is defined as 0x1000 (4096) for non-NaCl
>
> Sodium Chloride?

Google's Native Client, a technology for running native code in a web
browser.  It's since been superseded by Portable Native Client (pNaCl)
and to an extent Web Assembly.  It seems that BFD still contains code
for NaCl.

>
> > x86_64 targets:
> >
> > bfd/elf64-x86-64.c:
> > 4998:#define ELF_COMMONPAGESIZE             0x1000
> >
> > For gold, the common page size is defined as 0x1000 (4096) for non-NaCl
> > x86_64 targets:
> >
> > gold/x86_64.cc:
> > 1413:  0x1000, // common_pagesize (overridable by -z common-page-size)
> > 1442:  0x1000, // common_pagesize (overridable by -z common-page-size)
> >
> > (ELF_COMMONPAGESIZE also defaults to ELF_MAXPAGESIZE when not set
> > explicitly for a target architecture in bfd/elfxx-target.h, but that's
> > not relevant for x86_64).
> >
> > Because it's implied by the target architecture, it's of questionable
> > use to implement in LLD.  This patch resolves one of the issues towards
> > using LLD to link an x86_64 kernel.
>
> LLD?

LLD is LLVM's linker.
https://lld.llvm.org/

>
> I can only guess what this commit message is about and have to look at
> the patch itself and then look at the LD(1) man page and rhyme up what
> it is aiming to do.
>
> How about rewriting it for mere mortals?

How does this sound:
TL;DR
-z common-page-size's default value is based on the target
architecture.  arch/x86/entry/vdso/Makefile sets it to the
architecture default, which is implicit and redundant.  Drop it.

-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2018-12-07 17:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 19:12 [PATCH] x86/vdso: drop implicit common-page-size linker flag ndesaulniers
2018-12-06 20:29 ` Andy Lutomirski
2018-12-07 10:18 ` Borislav Petkov
2018-12-07 17:45   ` Nick Desaulniers [this message]
2018-12-07 17:52     ` Borislav Petkov
2018-12-07 18:00       ` Nick Desaulniers
2018-12-07 18:33 ` [tip:x86/urgent] x86/vdso: Drop " tip-bot for Nick Desaulniers
2018-12-11 13:12 ` [tip:x86/build] x86/um/vdso: " tip-bot for ndesaulniers@google.com
2018-12-11 17:39   ` Nick Desaulniers
2018-12-11 17:43     ` Richard Weinberger
2018-12-11 17:46       ` Borislav Petkov
2018-12-11 17:53         ` Nick Desaulniers
2018-12-11 18:05           ` Borislav Petkov
2018-12-11 19:08             ` Nick Desaulniers
2018-12-11 20:14               ` Richard Weinberger
2018-12-11 20:53               ` Borislav Petkov
2018-12-11 13:25 ` tip-bot for Nick Desaulniers

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='CAKwvOd=75MRjaDbEjHRaMTm1MSC1wkLxPKhH_S3KXreP8yU9Uw@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=bp@alien8.de \
    --cc=dima@golovin.in \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=maskray@google.com \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=rafael@espindo.la \
    --cc=ruiu@google.com \
    --cc=srhines@google.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 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).