[{"id":3680657,"web_url":"http://patchwork.ozlabs.org/comment/3680657/","msgid":"<e76adca7-8325-4a0a-bfe1-ec6250d10c5c@linaro.org>","list_archive_url":null,"date":"2026-04-22T14:40:54","subject":"Re: [PATCH v5] elf: Support THP segment load with madvise enabled THP","submitter":{"id":66065,"url":"http://patchwork.ozlabs.org/api/people/66065/","name":"Adhemerval Zanella Netto","email":"adhemerval.zanella@linaro.org"},"content":"On 20/04/26 22:31, H.J. Lu wrote:\n> \n> The added THP tests pass on x86 and aarch64.  Some of them failed on\n> arm:\n> \n> https://patchwork.sourceware.org/project/glibc/patch/CAMe9rOqKfFXMDY07GRuppudP3V9fsCDXoyxDesPMNQLDrRhzvg@mail.gmail.com/\n> \n> Produces 4 regressions:\n>    |\n>    | regressions.sum:\n>    | Running glibc:elf ...\n>    | FAIL: elf/tst-thp-1-no-s-code-pde\n>    | FAIL: elf/tst-thp-1-no-s-code-static\n>    | FAIL: elf/tst-thp-1-pde\n>    | FAIL: elf/tst-thp-1-static\n> \n> It looks like PIE works, but PDE and static PIE don't work on arm.  The\n> Linaro report doesn't have useful information for these failures.  My\n> arm glibc test binaries look like\n> \n\nIt seems to be a limitation of arm32 kABI. The strace of elf/tst-thp-1-static\nshows that execve failed to load the binary:\n\n  $ strace -f elf/tst-thp-1-static --direct\n  execve(\"elf/tst-thp-1-static\", [\"elf/tst-thp-1-static\", \"--direct\"], 0xbeda8468 /* 31 vars */) = -1 EINVAL (Invalid argument)\n  +++ killed by SIGSEGV +++\n  Segmentation fault\n\nAnd tracing where kernel triggers and error shows:\n\n  # echo function_graph > /sys/kernel/debug/tracing/current_tracer\n  # echo vm_mmap > /sys/kernel/debug/tracing/set_graph_function\n  # echo 0 > /sys/kernel/debug/tracing/tracing_on\n\n  # Clear the buffer\n  echo > /sys/kernel/debug/tracing/trace\n\n  # Filter to just the shell's PID\n  # echo $$ > /sys/kernel/debug/tracing/set_ftrace_pid\n\n  # echo 1 > /sys/kernel/debug/tracing/tracing_on\n  # elf/tst-thp-1-static --direct\n  # echo 0 > /sys/kernel/debug/tracing/tracing_on\n\n  # cat /sys/kernel/debug/tracing/trace\n\nThe trace output shows:\n\n[...]\n 3)               |      do_mmap() {\n 3)   9.760 us    |        __get_unmapped_area();\n 3) + 32.176 us   |      }\n 3)   1.344 us    |      up_write();\n 3)   7.152 us    |      userfaultfd_unmap_complete();\n[...]\n\nThe ARM defines a arch_mmap_check hook (arch/arm/include/uapi/asm/mman.h):\n\n  #define arch_mmap_check(addr, len, flags) \\\n          (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)\n\nwhich is the first thing called by __get_unmapped_area. For MMU configuration,\nFIRST_USER_ADDRESS is 2 times the page size:\n\narch/arm/include/asm/pgtable.h:\n  /*\n   * This is the lowest virtual address we can permit any user space\n   * mapping to be mapped at.  This is particularly important for\n   * non-high vector CPUs.\n   */\n  #define FIRST_USER_ADDRESS      (PAGE_SIZE * 2)\n\nThe kernel issues arch_mmap_check(0x0, 0x1000, MAP_FIXED|...), since the file\nis ET_EXEC (and SUPPORT_STATIC_PIE is not currently defined for arm32):\n\n﻿﻿fs/binfmt_elf.c:\n1066                 } else if (elf_ex->e_type == ET_EXEC) {\n1067                         /*\n1068                          * This logic is run once for the first LOAD Program\n1069                          * Header for ET_EXEC binaries. No special handling\n1070                          * is needed.\n1071                          */\n1072                         elf_flags |= MAP_FIXED_NOREPLACE;\n\nAfaik the FIRST_USER_ADDRESS is a requirement to handle the exception vector table\nplacement in ARMv4T/ARMv5 eras and with modern kernels on recent hardware all\nthe required machinery is mapped on high addresses:\n\n  $ cat /proc/self/maps\n  [...]\n  bed3d000-bed5e000 rw-p 00000000 00:00 0          [stack]\n  beda9000-bedaa000 r-xp 00000000 00:00 0          [sigpage]\n  bedaa000-bedae000 r--p 00000000 00:00 0          [vvar]\n  bedae000-bedb0000 r-xp 00000000 00:00 0          [vdso]\n  ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors] \n\nTo test this, I removed the arch_mmap_check and process startup fails with a different\nerror:\n\n  $ strace -f elf/tst-thp-1-static --direct\n  execve(\"elf/tst-thp-1-static\", [\"elf/tst-thp-1-static\", \"--direct\"], 0xbeda8468 /* 31 vars */) = -1 EPERM (Operation not permitted)\n  +++ killed by SIGSEGV +++\n  Segmentation fault\n\nAnd this is due a missing capability:\n\n  $ ./tst-thp-1-static\n  Segmentation fault\n  $ sudo setcap cap_sys_rawio+ep tst-thp-1-static\n  $ ./tst-thp-1-static\n  $\n\nThis is the same issue for dynamic linked binaries:\n\n  $ strace -f -e mmap ./elf/ld.so --library-path . elf/tst-thp-1-pde --direct\n  [pid 1197551] mmap(NULL, 73728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = -1 EPERM (Operation not permitted)\n\nSo in theory it would be possible to run such binaries on arm32, but I do not \nknow all the implications of allowing binaries mapping the low addresses\n(and requiring cap_sys_rawio+ep has other implications as well). \n\nIt seems to be a ARM32 idiosyncrasy, so I think maybe we should enable this along\nwith arch-specific knob as we for the static-pie (SUPPORT_STATIC_PIE).","headers":{"Return-Path":"<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":["incoming@patchwork.ozlabs.org","libc-alpha@sourceware.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","libc-alpha@sourceware.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=Wu7aFTdJ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=Wu7aFTdJ","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=linaro.org","sourceware.org; spf=pass smtp.mailfrom=linaro.org","server2.sourceware.org;\n arc=none smtp.remote-ip=2607:f8b0:4864:20::132b"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g123W1Vx0z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 00:41:27 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E61084BB58E9\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 14:41:24 +0000 (GMT)","from mail-dy1-x132b.google.com (mail-dy1-x132b.google.com\n [IPv6:2607:f8b0:4864:20::132b])\n by sourceware.org (Postfix) with ESMTPS id 883804B9700C\n for <libc-alpha@sourceware.org>; Wed, 22 Apr 2026 14:41:02 +0000 (GMT)","by mail-dy1-x132b.google.com with SMTP id\n 5a478bee46e88-2de831d2b20so1964018eec.1\n for <libc-alpha@sourceware.org>; Wed, 22 Apr 2026 07:41:02 -0700 (PDT)","from ?IPV6:2804:1b3:a7c3:d5d0:bddf:fa51:e156:c28b?\n ([2804:1b3:a7c3:d5d0:bddf:fa51:e156:c28b])\n by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2e53ccce440sm22865723eec.14.2026.04.22.07.40.57\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Wed, 22 Apr 2026 07:40:59 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org E61084BB58E9","OpenDKIM Filter v2.11.0 sourceware.org 883804B9700C"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 883804B9700C","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 883804B9700C","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776868862; cv=none;\n b=tTBsAzKwaSjf07+BNQv3VCkysrwyUpqUsZyksTqOI0/67s0xTF7BwaARg80pBVlDYfQAW0ZowfJminybEdJBDsK7IHO0d5b6XaMzzjM5/06pq3jprSfmtZhydQnnNCoOjURxi6zJ/3AfZ7OtmG1D9wALWYv1g9H1Jsfj+y+yWM8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776868862; c=relaxed/simple;\n bh=/OzMOTJdTl9PH05B8Cr7Bhav/w4YEI2bIsi8Q59OgkQ=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=c/OQKFV/ddXD/6vVYanqKSBBaDkVsUDJTLyEbATDrQerQqYoeFIZyuV/MrOQyV1h8DaaQHCrSQUktErAof5Ld94vXyNeuJc47XG3K1M5mtvm0HkVzw8Y+mkeupgqbpi6lM93AMcwYJQhEJFfvyelv8ZYSDATpUMA6SUWmjRmFbU=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776868860; x=1777473660; darn=sourceware.org;\n h=content-transfer-encoding:in-reply-to:organization:from\n :content-language:references:to:subject:user-agent:mime-version:date\n :message-id:from:to:cc:subject:date:message-id:reply-to;\n bh=7EtIXL9E2WWs39syBE45Vi2JIkhj2eeE73lGB4h5SyY=;\n b=Wu7aFTdJ4WI/gb6e68SeYxdOmch4eZBH75MWRjerr7LAiZNEG1OsRZoA5sSYoPFEbf\n jUhF6l0NTALbBSFdP8cFyZ7iNRdG2vqTpt6/a4c2HMbXT2tdxwxFciOKh958Rqne3C4D\n GveAaFYuackh/Efviw9b0ZOeK8jiSdsRQ8gZl4hZteMtfvQuhr5Y//QFDJ5xf+MBXaNv\n KCSvEjsocG81Lr0KH5yV18R+cAdX2ADsohGf8vETU3Y5IjV2wyVa6GX4XctVs8TTen9G\n 6x8bmnAx3plGCXEUMTN+kTficAQj03P7XYVQARFNzhn+IQJxWhSloiuwVM/trKSm0iSi\n BMzg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776868860; x=1777473660;\n h=content-transfer-encoding:in-reply-to:organization:from\n :content-language:references:to:subject:user-agent:mime-version:date\n :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=7EtIXL9E2WWs39syBE45Vi2JIkhj2eeE73lGB4h5SyY=;\n b=cHN8/rsGXgrxq60q3LiTU8EdWrZpnE7n2fisBe7KquEPqz5aevs2Y3s77sCn17gGrW\n ZK3goH6CT5gRnGHpL215p6IM3TO0iioWbC+htJWzvHgmLYKvTrAU0vb/r+jCSCirjsTW\n XDCMetG8nvMcISN15256KiIuOUz2nGIaDrW/URk8HY/GliYcjq05N9kfQHJEUPanjo/k\n ZAPql/OQWaDr2SlC2e4tTpic2VGfcWX1q3IBJox5A0WE1tz2vJJ4pNUXZJ1Du5KX0Tgt\n LEnc7TXitXehqMLhRM5W5SclhqpExNE3Xw6z/t6nnCZrD/YGZCg6RWhnuHmcs5RP4o2a\n t3uw==","X-Gm-Message-State":"AOJu0YweDnWhthiZo2jjtQcdBdLuLm1nQ0wTiR5ymEC405zOUxyaei1h\n p84NkKqA3w2wMTDQjVW+Hq9GCRkiwDeZwDPtNtuhltmxB7PyXf+mdtymt/2XoY/Rh5m3ywNj9PI\n +33Aa","X-Gm-Gg":"AeBDieumGEcaenGyeK7HUh2pzmpZOZYzd+bI2YoB7BMWOwA6Mw3lP9RGT88vxWO6e5x\n OnU2haH09Do4ZFGXKvqEKnVYqSkxmSh4qPjJIf842So2TcBE8m6kmglcMWhsFTCRZsk9iR7vhwe\n Fzur6K0cl3sFff5PpUBvLE2uwbiZ5CL3rL3Jvb359fmSN2olbSqMwMIPGuUiSj/l+Fg+UUEJYUU\n ZmCs3nHA9i9v7EYTXxK1zO6ZRMVMOISVDRketjTrWoM6jtZIFkaG8xe8yFJFeqyXbWr+r5AxeaI\n ccphI9CrXyJCvvVHKZ6AmpjmnC/SapLvQFAp3uYEEJr3Qp7ebmSExWAy3GvJOoQf5NfYQbo/E1E\n 03I3Ybg22Uh79hzlfU0vuAtjLzhEcbhqH3ydWmqvWMxjtOmrQDMvFTVVQEmMU0OucLeQVo6/rvK\n fhGpsrGjFx5moXaiD2sEWMcYRNaWnHiL/FvPH2OsqRkJDB5VJm3DhecVkLTBp0YmpC66KKBoCvn\n ZXT8fQIw6zImRHru3V0FNR4vuLYHV1ARjvd36ZacHO3","X-Received":"by 2002:a05:7300:641b:b0:2df:7fe3:96a with SMTP id\n 5a478bee46e88-2e4522010e4mr14870011eec.0.1776868859624;\n Wed, 22 Apr 2026 07:40:59 -0700 (PDT)","Message-ID":"<e76adca7-8325-4a0a-bfe1-ec6250d10c5c@linaro.org>","Date":"Wed, 22 Apr 2026 11:40:54 -0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v5] elf: Support THP segment load with madvise enabled THP","To":"libc-alpha@sourceware.org, WANG Rui <wangrui@loongson.cn>,\n \"H.J. Lu\" <hjl.tools@gmail.com>, Carlos O'Donell <carlos@redhat.com>","References":"\n <CAMe9rOpuLjOmaFDiXVf+LOx54H5Nss95RBziKk91LyceH4Dibg@mail.gmail.com>","Content-Language":"en-US","From":"Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>","Organization":"Linaro","In-Reply-To":"\n <CAMe9rOpuLjOmaFDiXVf+LOx54H5Nss95RBziKk91LyceH4Dibg@mail.gmail.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-BeenThere":"libc-alpha@sourceware.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Libc-alpha mailing list <libc-alpha.sourceware.org>","List-Unsubscribe":"<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>","List-Archive":"<https://sourceware.org/pipermail/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-request@sourceware.org?subject=help>","List-Subscribe":"<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>","Errors-To":"libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org"}},{"id":3681195,"web_url":"http://patchwork.ozlabs.org/comment/3681195/","msgid":"<CAMe9rOriP4WT8d2YW3J0Ua6N41dAR2Z4_Q4_6jSANr1FV8yBtg@mail.gmail.com>","list_archive_url":null,"date":"2026-04-22T22:28:27","subject":"Re: [PATCH v5] elf: Support THP segment load with madvise enabled THP","submitter":{"id":4387,"url":"http://patchwork.ozlabs.org/api/people/4387/","name":"H.J. Lu","email":"hjl.tools@gmail.com"},"content":"On Wed, Apr 22, 2026 at 10:41 PM Adhemerval Zanella Netto\n<adhemerval.zanella@linaro.org> wrote:\n>\n>\n>\n> On 20/04/26 22:31, H.J. Lu wrote:\n> >\n> > The added THP tests pass on x86 and aarch64.  Some of them failed on\n> > arm:\n> >\n> > https://patchwork.sourceware.org/project/glibc/patch/CAMe9rOqKfFXMDY07GRuppudP3V9fsCDXoyxDesPMNQLDrRhzvg@mail.gmail.com/\n> >\n> > Produces 4 regressions:\n> >    |\n> >    | regressions.sum:\n> >    | Running glibc:elf ...\n> >    | FAIL: elf/tst-thp-1-no-s-code-pde\n> >    | FAIL: elf/tst-thp-1-no-s-code-static\n> >    | FAIL: elf/tst-thp-1-pde\n> >    | FAIL: elf/tst-thp-1-static\n> >\n> > It looks like PIE works, but PDE and static PIE don't work on arm.  The\n> > Linaro report doesn't have useful information for these failures.  My\n> > arm glibc test binaries look like\n> >\n>\n> It seems to be a limitation of arm32 kABI. The strace of elf/tst-thp-1-static\n> shows that execve failed to load the binary:\n>\n>   $ strace -f elf/tst-thp-1-static --direct\n>   execve(\"elf/tst-thp-1-static\", [\"elf/tst-thp-1-static\", \"--direct\"], 0xbeda8468 /* 31 vars */) = -1 EINVAL (Invalid argument)\n>   +++ killed by SIGSEGV +++\n>   Segmentation fault\n>\n> And tracing where kernel triggers and error shows:\n>\n>   # echo function_graph > /sys/kernel/debug/tracing/current_tracer\n>   # echo vm_mmap > /sys/kernel/debug/tracing/set_graph_function\n>   # echo 0 > /sys/kernel/debug/tracing/tracing_on\n>\n>   # Clear the buffer\n>   echo > /sys/kernel/debug/tracing/trace\n>\n>   # Filter to just the shell's PID\n>   # echo $$ > /sys/kernel/debug/tracing/set_ftrace_pid\n>\n>   # echo 1 > /sys/kernel/debug/tracing/tracing_on\n>   # elf/tst-thp-1-static --direct\n>   # echo 0 > /sys/kernel/debug/tracing/tracing_on\n>\n>   # cat /sys/kernel/debug/tracing/trace\n>\n> The trace output shows:\n>\n> [...]\n>  3)               |      do_mmap() {\n>  3)   9.760 us    |        __get_unmapped_area();\n>  3) + 32.176 us   |      }\n>  3)   1.344 us    |      up_write();\n>  3)   7.152 us    |      userfaultfd_unmap_complete();\n> [...]\n>\n> The ARM defines a arch_mmap_check hook (arch/arm/include/uapi/asm/mman.h):\n>\n>   #define arch_mmap_check(addr, len, flags) \\\n>           (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)\n>\n> which is the first thing called by __get_unmapped_area. For MMU configuration,\n> FIRST_USER_ADDRESS is 2 times the page size:\n>\n> arch/arm/include/asm/pgtable.h:\n>   /*\n>    * This is the lowest virtual address we can permit any user space\n>    * mapping to be mapped at.  This is particularly important for\n>    * non-high vector CPUs.\n>    */\n>   #define FIRST_USER_ADDRESS      (PAGE_SIZE * 2)\n>\n> The kernel issues arch_mmap_check(0x0, 0x1000, MAP_FIXED|...), since the file\n> is ET_EXEC (and SUPPORT_STATIC_PIE is not currently defined for arm32):\n>\n> ﻿﻿fs/binfmt_elf.c:\n> 1066                 } else if (elf_ex->e_type == ET_EXEC) {\n> 1067                         /*\n> 1068                          * This logic is run once for the first LOAD Program\n> 1069                          * Header for ET_EXEC binaries. No special handling\n> 1070                          * is needed.\n> 1071                          */\n> 1072                         elf_flags |= MAP_FIXED_NOREPLACE;\n>\n> Afaik the FIRST_USER_ADDRESS is a requirement to handle the exception vector table\n> placement in ARMv4T/ARMv5 eras and with modern kernels on recent hardware all\n> the required machinery is mapped on high addresses:\n>\n>   $ cat /proc/self/maps\n>   [...]\n>   bed3d000-bed5e000 rw-p 00000000 00:00 0          [stack]\n>   beda9000-bedaa000 r-xp 00000000 00:00 0          [sigpage]\n>   bedaa000-bedae000 r--p 00000000 00:00 0          [vvar]\n>   bedae000-bedb0000 r-xp 00000000 00:00 0          [vdso]\n>   ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]\n>\n> To test this, I removed the arch_mmap_check and process startup fails with a different\n> error:\n>\n>   $ strace -f elf/tst-thp-1-static --direct\n>   execve(\"elf/tst-thp-1-static\", [\"elf/tst-thp-1-static\", \"--direct\"], 0xbeda8468 /* 31 vars */) = -1 EPERM (Operation not permitted)\n>   +++ killed by SIGSEGV +++\n>   Segmentation fault\n>\n> And this is due a missing capability:\n>\n>   $ ./tst-thp-1-static\n>   Segmentation fault\n>   $ sudo setcap cap_sys_rawio+ep tst-thp-1-static\n>   $ ./tst-thp-1-static\n>   $\n>\n> This is the same issue for dynamic linked binaries:\n>\n>   $ strace -f -e mmap ./elf/ld.so --library-path . elf/tst-thp-1-pde --direct\n>   [pid 1197551] mmap(NULL, 73728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = -1 EPERM (Operation not permitted)\n>\n> So in theory it would be possible to run such binaries on arm32, but I do not\n> know all the implications of allowing binaries mapping the low addresses\n> (and requiring cap_sys_rawio+ep has other implications as well).\n>\n> It seems to be a ARM32 idiosyncrasy, so I think maybe we should enable this along\n> with arch-specific knob as we for the static-pie (SUPPORT_STATIC_PIE).\n\nI added:\n\ndiff --git a/sysdeps/unix/sysv/linux/arm/Makefile\nb/sysdeps/unix/sysv/linux/arm/Makefile\nindex e73ce4f811..1ee8bec9b9 100644\n--- a/sysdeps/unix/sysv/linux/arm/Makefile\n+++ b/sysdeps/unix/sysv/linux/arm/Makefile\n@@ -3,6 +3,13 @@ sysdep-rtld-routines += aeabi_read_tp libc-do-syscall\n # The test uses INTERNAL_SYSCALL_CALL.  In thumb mode, this uses\n # an undefined reference to __libc_do_syscall.\n CFLAGS-tst-nolink-libc.c += -marm\n+\n+# These tests fail on arm due to limitations of arm32 kABI:\n+# https://sourceware.org/bugzilla/show_bug.cgi?id=34096\n+test-xfail-tst-thp-1-no-s-code-pde = yes\n+test-xfail-tst-thp-1-no-s-code-static = yes\n+test-xfail-tst-thp-1-pde = yes\n+test-xfail-tst-thp-1-static = yes\n endif\n\nto the v6 patch.\n\nThanks.","headers":{"Return-Path":"<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":["incoming@patchwork.ozlabs.org","libc-alpha@sourceware.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","libc-alpha@sourceware.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=h7BaHOSm;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=h7BaHOSm","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","sourceware.org; spf=pass smtp.mailfrom=gmail.com","server2.sourceware.org;\n arc=pass smtp.remote-ip=2607:f8b0:4864:20::1035"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1DRZ2V2Xz1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 08:29:30 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 2F5324BABF1D\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 22:29:28 +0000 (GMT)","from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com\n [IPv6:2607:f8b0:4864:20::1035])\n by sourceware.org (Postfix) with ESMTPS id 6F8734BA23DF\n for <libc-alpha@sourceware.org>; Wed, 22 Apr 2026 22:29:05 +0000 (GMT)","by mail-pj1-x1035.google.com with SMTP id\n 98e67ed59e1d1-35fb16e56efso3942095a91.2\n for <libc-alpha@sourceware.org>; Wed, 22 Apr 2026 15:29:05 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 2F5324BABF1D","OpenDKIM Filter v2.11.0 sourceware.org 6F8734BA23DF"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 6F8734BA23DF","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 6F8734BA23DF","ARC-Seal":["i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1776896945; cv=pass;\n b=ZCP2MXT+Nx8IqqpMfrC9uTHhXAMqEU1In1L+fR9W5QEg8K91eQryZAaLjlFz+V1ryfJZdvRh2gSfwoSJf8U9bJkN+ArZIBIUBJRljasBuSVFbyXd3LZdFvHRgX6wMY3/82HMTdhrLO8HhgFa7gnJdGI2WLMiL+vLKqCh5PvktaI=","i=1; a=rsa-sha256; t=1776896944; cv=none;\n d=google.com; s=arc-20240605;\n b=gqI1cE6fI0wF3Z/GjBH6zqrDqr6cdNLkWhI1Q3z7kVeoCc2bMgVcFAcV0ywk87G1j0\n zs1IQ6g1CdVrWCrPkdCgiVDjH9OD50qIIRqKc85NM9DwHsWM9jyIOfHvCk5CJ5c1oWTD\n bOGaCnROdM/9UkSrP9oFH+8mQCMEb4QUGnFEMUi2qSyOP9IFG5qXKJEaoqBYXRO4STrM\n DO+Ni6amoj6njjEzYQipi5Ou6YIeu49Ys3m+AeZbtGw/bQGHsKyDkt6c9DXnC+FbJjh0\n V31auJ7rLdqwHF9irWZHeDpc2bGJpOrZp1mio2FL5a/FFlCORfKc1Rm/lA72nVu4sTeZ\n N1Pg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776896945; c=relaxed/simple;\n bh=UYVxboLVKdFEesOvcQ65fR7e+YjcE5Przpi11jVQbGE=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=vEnq4nLmFKQJmiiTiZnwygmFDiSgjzEX8RVMmoIexBSeNBJjm6/3jpXn7Pr8FPxlghwwvJ5zwtw/VrVoPxpkzN2Q2ZZGbIcMNgVilrq+0MsAf1uaIMkVDXh4vw3Zvy/wNptLga4ER0GFgt67ojt/NoIl6DdEwVeMgxpZQkolQyg=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:dkim-signature;\n bh=mwMiUCfn4Yz1n+PWIGYqYD6UfaC4GOyDRhAhMogFZ7M=;\n fh=lfiIl531w7obQEYckMOncxWN09WDQ4l3w/XRk7gv/GQ=;\n b=FnDhOMWKYOSiHJp3rtbpK8po929UCRDje5HtA2aIBpugU1uLtWZyaweObjICxs7vR0\n 1xu9u0b8aT2KMrXTqzB1ObcAclFdQdXmFOWj3/GtFPgONz2laaUiq+ocOR/G2BJNdPao\n TleOVmFrO86AMysfMJFvemVN/dXeUt+mj2oD6PVyvQ44mJlqL+PygNGpCzWe/pjyYPt/\n wCUXx+ngydTo4qnOmMFLYWCuqFvtvpYzgzkJuza3d7s8csP/1PDTiefgDGZLrH62YUfV\n Gbl2TVr+TfGMybVCr5GKCvyUBxgqHJR61gqiqvn2q6RFstjTfAAeI2Yc0cxZHKgQKQqG\n +nYA==; darn=sourceware.org"],"ARC-Authentication-Results":["i=2; server2.sourceware.org","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776896944; x=1777501744; darn=sourceware.org;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:from:to:cc:subject:date\n :message-id:reply-to;\n bh=mwMiUCfn4Yz1n+PWIGYqYD6UfaC4GOyDRhAhMogFZ7M=;\n b=h7BaHOSm1bu8aHx40KC308rxO77hwCXVtZkyphwqLt2NsA4f4q79t4IqdcXP9RfX3d\n nJRcm+IUiGWiCALzXzHa2biwL//FxLC6ZC2fIwydlTP2hkLk4BuFpRw5lCC3GYcXlyJ/\n 9Gn/c97b3rWdidx6UanhWwFSvsGhwZWWrSugMcPm+wDFU43ELzL0bZ6fRbChxdecTH8+\n ZDTtTkSXo0IINv9Tt7F0WXpUz9uBEglPS/7V6gJr/p+Q6flwZgCwLsTDfLvZEsQ9M/tw\n slbJWpY+i+nHl1YLTAFwIQ2sw0Mz+JZ7wmus8Y3xqCQgFOZD3PQhTBH3XkeivpDqYBc2\n +9DQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776896944; x=1777501744;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=mwMiUCfn4Yz1n+PWIGYqYD6UfaC4GOyDRhAhMogFZ7M=;\n b=ee4JoqDQt4VrEwag2SWcn7OjhLCOzh4qeU3MNfpTmG6L4EtWo8aG1+pU/DEnD2SyJT\n fwDA8rMqaWzlHBsvBajOf6xs7M3eZ+IodLvQ/ZaJvnCs8tQaX5EyDjxkzDesUP9MVO1U\n Li3SmrRwyNnQhGuBQJNpQYFrA+kjr2uWsfe9JJEZHVeA4DqysP9PR26nTEfPlHKQaAlv\n PaiSEd4BO8LkRWJPRkdSC8BO/EkZQvMUPZJB7tWTnKw22X+KfMECo53BjoKQ2JFMkufa\n Asx1vcZBrtvx8KikUkMr1hU0lfCmuACVzuqhleCyucpMw6SAqxdhIETP+U+Ozp85yx/K\n M2Rw==","X-Gm-Message-State":"AOJu0YziUEnxbzXDe/61xcsnIqDqM/Vomt1zNO581Fa81bWB8o+N9rdO\n 8fmZph20KVNQ2Ng+GxH5GShFP1UW2hoTbnSLoYpcjBjr96B3OttiXoAe0XLueRVbTVbX5H3xPMg\n w5U7IDX7zzNPLmdfwbctZRvHxpk+K0x0=","X-Gm-Gg":"AeBDieuQUxCmzUgMUTxdBZjY6Nv/D8ruCifQnqiizgvAmAImvakjoO+wHFtwTmtZywH\n wjZ3018BB1x40T4t9aP++9hwEWefzlA/KwJ+qpX08NIEZMxPQZFR1J84fPk4IfrpdBm4ZHtbRUw\n IG0j8VRpLLMDBGjSTZw6AVPjnu2TaNtt82zOjDZnwnzyOIqW/q32E8+y6vqH8ipgcH5mbFeBq47\n hPfrTmmDNAzkTW/bb4BlCKRuiO7Pg1CnCAtQSz97xIqhIWn81hXFyDCquTF3EV8/U1aGNm6K4z7\n iy1frbuYulUwdg5+PQ==","X-Received":"by 2002:a17:90b:1642:b0:35f:b107:f1ae with SMTP id\n 98e67ed59e1d1-361403adbcfmr24649188a91.4.1776896944341; Wed, 22 Apr 2026\n 15:29:04 -0700 (PDT)","MIME-Version":"1.0","References":"\n <CAMe9rOpuLjOmaFDiXVf+LOx54H5Nss95RBziKk91LyceH4Dibg@mail.gmail.com>\n <e76adca7-8325-4a0a-bfe1-ec6250d10c5c@linaro.org>","In-Reply-To":"<e76adca7-8325-4a0a-bfe1-ec6250d10c5c@linaro.org>","From":"\"H.J. Lu\" <hjl.tools@gmail.com>","Date":"Thu, 23 Apr 2026 06:28:27 +0800","X-Gm-Features":"AQROBzBW_wh1Z2o1fBBIQnhoeBA3PIKXdxd7CamnGCktW8P0Gh9PdYfQDxMUV_0","Message-ID":"\n <CAMe9rOriP4WT8d2YW3J0Ua6N41dAR2Z4_Q4_6jSANr1FV8yBtg@mail.gmail.com>","Subject":"Re: [PATCH v5] elf: Support THP segment load with madvise enabled THP","To":"Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>","Cc":"libc-alpha@sourceware.org, WANG Rui <wangrui@loongson.cn>,\n \"Carlos O'Donell\" <carlos@redhat.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libc-alpha@sourceware.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Libc-alpha mailing list <libc-alpha.sourceware.org>","List-Unsubscribe":"<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>","List-Archive":"<https://sourceware.org/pipermail/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-request@sourceware.org?subject=help>","List-Subscribe":"<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>","Errors-To":"libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org"}}]