linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 1/6] ARM: Use PAGE_SIZE for ELF_EXEC_PAGESIZE
Date: Fri, 12 Jun 2020 12:50:08 +0100	[thread overview]
Message-ID: <20200612115007.GB19739@gaia> (raw)
In-Reply-To: <CAK8P3a2BpNVSE86zEYSGd7x+OF-7spjGmU331TbQX=DRAkpMoQ@mail.gmail.com>

On Fri, Jun 12, 2020 at 10:46:17AM +0200, Arnd Bergmann wrote:
> On Fri, Jun 12, 2020 at 10:35 AM Russell King - ARM Linux admin
> <linux@armlinux.org.uk> wrote:
> > On Fri, Jun 12, 2020 at 10:22:17AM +0200, Arnd Bergmann wrote:
> > > On Thu, Jun 11, 2020 at 3:49 PM Gregory CLEMENT
> > > <gregory.clement@bootlin.com> wrote:
> > > >
> > > > Currently ELF_EXEC_PAGESIZE is 4096 which is also the page size. In
> > > > order to be able to use other size of page than 4K, use PAGE_SIZE
> > > > instead of the hardcoded value.
> > > >
> > > > The use of PAGE_SIZE will be also aligned with what we find in other
> > > > architectures such as arm64.
> > > >
> > > > This is inspired from fa0ca2726ea9 ("DSMP 64K support") and
> > > > 4ef803e12baf ("mmu: large-page: Added support for multiple kernel page
> > > > sizes") from
> > > > https://github.com/MarvellEmbeddedProcessors/linux-marvell.git
> > > >
> > > > Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
> > >
> > > IIRC using page sizes above 16KB here also requires using a
> > > non-ancient linker in user space that places sections on
> > > ELF_EXEC_PAGESIZE boundaries, right?
> 
> Correction: I was thinking of SHMLBA, not ELF_EXEC_PAGESIZE.
> SHMLBA is defined to 16KB in arch/arm/ at the moment (based on 4K
> page size), or (4 * PAGE_SIZE) on arm64, which can blow up to 256KB.
> 
> AFAICT, SHMLBA should now be defined as "min(16384, PAGE_SIZE)".

Good point. We should do this with the COMPAT_SHMLBA on arm64 (we didn't
bother since COMPAT had a dependency on 4K but you can override it with
EXPERT).

> > Doesn't that mean that this change breaks all existing userspace when
> > ELF_EXEC_PAGESIZE is not 4k?
> 
> I think a lot of older user space would be broken with page sizes larger
> than 16KB, but would still work with 8KB or 16KB. Larger page sizes
> would only work with user space that was linked in the last five years
> or so, using a toolchain that has the workarounds for running on arm64
> with 64KB page size.

FWIW, Debian armhf now boots fine on an arm64 kernel with 64K pages (it
wasn't the case some years ago).

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-06-12 11:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 13:49 [PATCH v2 0/6] ARM: Add support for large kernel page (from 8K to 64K) Gregory CLEMENT
2020-06-11 13:49 ` [PATCH v2 1/6] ARM: Use PAGE_SIZE for ELF_EXEC_PAGESIZE Gregory CLEMENT
2020-06-12  8:22   ` Arnd Bergmann
2020-06-12  8:35     ` Russell King - ARM Linux admin
2020-06-12  8:46       ` Arnd Bergmann
2020-06-12  8:50         ` Russell King - ARM Linux admin
2020-06-12 11:50         ` Catalin Marinas [this message]
2020-06-12 12:06         ` Gregory CLEMENT
2020-06-12  8:52     ` Gregory CLEMENT
2020-06-11 13:49 ` [PATCH v2 2/6] ARM: pagetable: prepare hardware page table to use large page Gregory CLEMENT
2020-06-11 13:49 ` [PATCH v2 3/6] ARM: Make the number of fix bitmap depend on the page size Gregory CLEMENT
2020-06-11 13:49 ` [PATCH v2 4/6] ARM: mm: Aligned pte allocation to one page Gregory CLEMENT
2020-06-12  8:37   ` Arnd Bergmann
2020-06-12 10:25     ` Catalin Marinas
2020-06-12 11:56     ` Gregory CLEMENT
2020-06-11 13:49 ` [PATCH v2 5/6] ARM: Add large kernel page support Gregory CLEMENT
2020-06-11 13:49 ` [PATCH v2 6/6] ARM: Add 64K page support at MMU level Gregory CLEMENT
2020-06-11 16:21 ` [PATCH v2 0/6] ARM: Add support for large kernel page (from 8K to 64K) Russell King - ARM Linux admin
2020-06-12  9:15   ` Gregory CLEMENT
2020-06-12  9:23   ` Arnd Bergmann
2020-06-12 12:21     ` Catalin Marinas
2020-06-12 12:49       ` Arnd Bergmann

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=20200612115007.GB19739@gaia \
    --to=catalin.marinas@arm.com \
    --cc=arnd@arndb.de \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=thomas.petazzoni@bootlin.com \
    /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).