aboutsummaryrefslogtreecommitdiff
path: root/nptl/allocatestack.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-03-19 12:53:40 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-03-19 15:04:17 -0700
commit3e2f285c5f12045e425060b6cbdf7a7cab540594 (patch)
treed85f4e33fd6caa432c8e877555d0a573c1523db4 /nptl/allocatestack.c
parent9cbe4ed14ec66415be34ad142abf4fa83aed3f58 (diff)
downloadglibc-3e2f285c5f12045e425060b6cbdf7a7cab540594.tar
glibc-3e2f285c5f12045e425060b6cbdf7a7cab540594.tar.gz
glibc-3e2f285c5f12045e425060b6cbdf7a7cab540594.tar.bz2
glibc-3e2f285c5f12045e425060b6cbdf7a7cab540594.zip
nptl: Remove MULTI_PAGE_ALIASING [BZ #23554]
MULTI_PAGE_ALIASING was introduced to mitigate an aliasing issue on Pentium 4. It is no longer needed for processors after Pentium 4.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r--nptl/allocatestack.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 149b999603..00fddbd409 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -31,7 +31,6 @@
#include <lowlevellock.h>
#include <futex-internal.h>
#include <kernel-features.h>
-#include <stack-aliasing.h>
#ifndef NEED_SEPARATE_REGISTER_STACK
@@ -547,15 +546,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
pd = get_cached_stack (&size, &mem);
if (pd == NULL)
{
- /* To avoid aliasing effects on a larger scale than pages we
- adjust the allocated stack size if necessary. This way
- allocations directly following each other will not have
- aliasing problems. */
-#if MULTI_PAGE_ALIASING != 0
- if ((size % MULTI_PAGE_ALIASING) == 0)
- size += pagesize_m1 + 1;
-#endif
-
/* If a guard page is required, avoid committing memory by first
allocate with PROT_NONE and then reserve with required permission
excluding the guard page. */