[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMe9rOp4_=_8twdpTyAP2DhONOCeaTOsniJLoppzhoNptL8xzA@mail.gmail.com>
Date: Mon, 19 Mar 2018 13:57:46 -0700
From: "H.J. Lu" <hjl.tools@...il.com>
To: LKML <linux-kernel@...r.kernel.org>,
"the arch/x86 maintainers" <x86@...nel.org>
Subject: [PATCH] x86-64: Force linker to use 2MB page size
Binutils 2.31 will enable -z separate-code by default for x86 to avoid
mixing code pages with data to improve cache performance as well as
security. To reduce x86-64 executable and shared object sizes, the
maximum page size is reduced from 2MB to 4KB. But x86-64 kernel must
be aligned to 2MB. Pass -z max-page-size=0x200000 to linker to force
2MB page size regardless of the default page size used by linker.
Tested with Linux kernel 4.15.6 on x86-64.
Signed-off-by: H.J. Lu <hjl.tools@...il.com>
--
H.J.
View attachment "0001-x86-64-Force-linker-to-use-2MB-page-size.patch" of type "text/x-patch" (1510 bytes)
Powered by blists - more mailing lists