From: Stefan Liebler <stli@linux.ibm.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org, devel@otheo.eu,
adhemerval.zanella@linaro.org, bergner@linux.ibm.com
Subject: Re: [RFC 0/9] Remove legacy platform bits and cleanups
Date: Mon, 10 Jun 2024 15:23:04 +0200 [thread overview]
Message-ID: <c8741c64-d059-4834-86e8-a505edb2f5b2@linux.ibm.com> (raw)
In-Reply-To: <87frtp6j4g.fsf@oldenburg.str.redhat.com>
On 07.06.24 14:18, Florian Weimer wrote:
> * Stefan Liebler:
>
>> - "elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask"
>> The environment variable LD_HWCAP_MASK / glibc-tunable
>> glibc.cpu.hwcap_mask is not used anymore after removal in
>> elf/dl-cache.c:search_cache() despite of sparc32 where it is used in
>> elf_machine_matches_host().
>
> Are you sure about that? It is used to update GLRO(dl_hwcap), and that
> _rtld_global_ro member is consulted in various places. Its value is
> also returned by getauxval (AT_HWCAP).
>
> Thanks,
> Florian
>
I've had a look, but did not found the place where this update happens.
I've also tried out this:
cat tst-LD_HWCAP_MASK.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/auxv.h>
int
main (int argc, char *argv[])
{
printf ("LD_HWCAP_MASK=\"%s\" GLIBC_TUNABLES=\"%s\" %s\n"
"=> getauxval(AT_HWCAP)= 0x%lx\n",
getenv("LD_HWCAP_MASK") ?: "", getenv("GLIBC_TUNABLES") ?: "",
argv[0], getauxval (AT_HWCAP));
return EXIT_SUCCESS;
}
LD_HWCAP_MASK="" GLIBC_TUNABLES="" ./tst-LD_HWCAP_MASK-s390x.old
=> getauxval(AT_HWCAP)= 0x7fffff
LD_HWCAP_MASK="0x0" GLIBC_TUNABLES="" ./tst-LD_HWCAP_MASK-s390x.old
=> getauxval(AT_HWCAP)= 0x7fffff
LD_HWCAP_MASK="0xFFFFFFFF" GLIBC_TUNABLES="" ./tst-LD_HWCAP_MASK-s390x.old
=> getauxval(AT_HWCAP)= 0x7fffff
LD_HWCAP_MASK="" GLIBC_TUNABLES="glibc.cpu.hwcap_mask=0x0"
./tst-LD_HWCAP_MASK-s390x.old
=> getauxval(AT_HWCAP)= 0x7fffff
LD_HWCAP_MASK="" GLIBC_TUNABLES="glibc.cpu.hwcap_mask=0xFFFFFFFF"
./tst-LD_HWCAP_MASK-s390x.old
=> getauxval(AT_HWCAP)= 0x7fffff
There is the e.g. GLIBC_TUNABLES=glibc.cpu.hwcaps= which let you
disable/enable the hwcaps used for glibc internal ifuncs.
Before I've implemented GLIBC_TUNABLES=glibc.cpu.hwcaps= for s390x, I've
asked on libc-alpha and Szabolcs Nagy answered this:
(see full question/answer:
Questions regarding manipulation of IFUNC selection and tunables like
glibc.cpu.hwcap_mask
https://sourceware.org/pipermail/libc-alpha/2022-August/141648.html
)
iirc LD_HWCAP_MASK was purely for the old hwcap based
lib path lookup.
...
i think hwcap_mask was not for completely hiding hwcaps
like that.
Attached to the old question is also a program which dumps the hwcaps
passed to s390x-ifunc-resolver. But it was also not changed by the
environment variables.
Please also have a look, if you find the update of GLRO(dl_hwcap).
Thanks,
Stefan
next prev parent reply other threads:[~2024-06-10 13:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 11:42 Stefan Liebler
2024-06-07 11:42 ` [RFC 1/9] x86: Remove HWCAP_START and HWCAP_COUNT Stefan Liebler
2024-06-11 18:14 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 2/9] elf: Remove loading legacy hwcaps/platform entries in dynamic loader Stefan Liebler
2024-06-11 18:57 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 3/9] elf: Remove _dl_string_platform Stefan Liebler
2024-06-11 19:09 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 4/9] elf: Remove platform strings in dl-procinfo.c Stefan Liebler
2024-06-11 19:20 ` Adhemerval Zanella Netto
2024-06-12 7:32 ` [V2] " Stefan Liebler
2024-06-14 12:58 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 5/9] elf: Remove _DL_HWCAP_PLATFORM Stefan Liebler
2024-06-11 19:28 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 6/9] elf: Remove _DL_FIRST_PLATFORM Stefan Liebler
2024-06-11 19:29 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 7/9] elf: Remove _DL_PLATFORMS_COUNT Stefan Liebler
2024-06-11 19:48 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 8/9] elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask Stefan Liebler
2024-06-11 20:04 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 9/9] elf: Remove HWCAP_IMPORTANT Stefan Liebler
2024-06-11 20:07 ` Adhemerval Zanella Netto
2024-06-07 12:18 ` [RFC 0/9] Remove legacy platform bits and cleanups Florian Weimer
2024-06-10 13:23 ` Stefan Liebler [this message]
2024-06-10 14:03 ` Florian Weimer
2024-06-11 12:24 ` Stefan Liebler
2024-06-08 11:09 ` Florian Weimer
2024-06-10 13:36 ` Stefan Liebler
2024-06-11 12:13 ` Stefan Liebler
2024-06-12 7:50 ` Stefan Liebler
2024-06-18 8:55 ` Stefan Liebler
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=c8741c64-d059-4834-86e8-a505edb2f5b2@linux.ibm.com \
--to=stli@linux.ibm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=bergner@linux.ibm.com \
--cc=devel@otheo.eu \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).