unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Szabolcs Nagy <szabolcs.nagy@arm.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH v6 1/1] <sys/tagged-address.h>: An API for tagged address
Date: Fri, 17 Sep 2021 12:19:42 +0200	[thread overview]
Message-ID: <87mtobec75.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAMe9rOrZiHgoBx4tQMcQsx4kwy3ZgEvx7_kuONzpe243PgQHQQ@mail.gmail.com> (H. J. Lu's message of "Mon, 6 Sep 2021 06:34:18 -0700")

* H. J. Lu:

> But I don't think we should add LAM to the list of the long-standing
> issues.  Without an API, we can never safely use LAM in glibc at
> all.

Yet you were able to backport it.

>> Setting up LAM is just one more issue in a long list of things that can
>> go wrong.  And if LAM does not have an ABI impact, it can be backported,
>> which would be nice.
>
> I backported it to glibc 2.33:
>
> [hjl@gnu-cfl-2 tmp]$ ar -t /lib64/libc_nonshared.a
> elf-init.oS
> atexit.oS
> at_quick_exit.oS
> pthread_atfork.oS
> set-translated-address-mask.oS
> stack_chk_fail_local.oS
> [hjl@gnu-cfl-2 tmp]$ ar -x /lib64/libc_nonshared.a  tagged-address.oS
> set-translated-address-mask.oS
> [hjl@gnu-cfl-2 tmp]$ nm set-translated-address-mask.oS
>                  U errno
>                  U _GLOBAL_OFFSET_TABLE_
>                  U _rtld_global
> 0000000000000000 T set_translated_address_mask
>                  U __stack_chk_fail_local
> [hjl@gnu-cfl-2 tmp]
>
> At least, the same source can compile with glibc 2.33 and the
> binary linked against glibc 2.33 will run with newer glibc.

Why can't you do this while we experiment with HWSAN?

>> Note that in glibc 2.34, we freed up DF_1_INITFIRST, so you could use
>> that to set up things really early.
>
> What do you have in mind for LAM with DF_1_INITFIRST?  How can it
> address the LAM issues I have?

It can make sure that the constructor runs as early as possible, so that
the appropriate system calls are made before any thread creation.

If the kernel interface does not provide coordination capabilities
between different LAM consumers within the same process (even a minimal
capability, like “has this been enabled yet?”), that sounds like a
serious drawback.

Thanks,
Florian


      reply	other threads:[~2021-09-17 10:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 12:45 [PATCH v6 0/1] RFC: Add <sys/tagged-address.h> H.J. Lu via Libc-alpha
2021-08-22 12:45 ` [PATCH v6 1/1] <sys/tagged-address.h>: An API for tagged address H.J. Lu via Libc-alpha
2021-08-23  9:28   ` Florian Weimer via Libc-alpha
2021-08-23 13:40     ` H.J. Lu via Libc-alpha
2021-08-23 13:49       ` Florian Weimer via Libc-alpha
2021-08-23 14:15         ` H.J. Lu via Libc-alpha
2021-09-03  9:12           ` Szabolcs Nagy via Libc-alpha
2021-09-03 13:58             ` H.J. Lu via Libc-alpha
2021-09-06  8:52               ` Florian Weimer via Libc-alpha
2021-09-06 13:34                 ` H.J. Lu via Libc-alpha
2021-09-17 10:19                   ` Florian Weimer via Libc-alpha [this message]

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtobec75.fsf@oldenburg.str.redhat.com \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=szabolcs.nagy@arm.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 read-only IMAP folder(s) and NNTP newsgroup(s).