public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Chris Kennelly <ckennelly@google.com>,
	Paul Turner <pjt@google.com>, Peter Oskolkov <posk@posk.io>,
	libc-alpha <libc-alpha@sourceware.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: Aligning tcmalloc with glibc 2.35 rseq ABI
Date: Wed, 2 Feb 2022 06:36:44 -0500 (EST)	[thread overview]
Message-ID: <1375227765.27051.1643801804042.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <875ypx1x0d.fsf@oldenburg.str.redhat.com>

----- On Feb 2, 2022, at 3:41 AM, Florian Weimer fweimer@redhat.com wrote:

> * Florian Weimer:
> 
>> * Chris Kennelly:
>>
>>> Thanks for the heads up.
>>>
>>> I did have a question about whether the new protocol would introduce
>>> an extra memory reference while initializing a critical section.
>>>
>>> * With initial-exec TLS, I can directly reference __rseq_abi.
>>> * With the new ABI, I might need to ask glibc for the address of the
>>> registered rseq structure in its thread data.
>>
>> You can write __rseq_offset to a static/hidden variable in an ELF
>> constructor, and then use pretty much the same assembler sequences as
>> for initial-exec TLS on most architectures.
> 
> And now I'm kind of worried that we should be using ptrdiff_t for
> __rseq_offset because that's what the initial-exec relocations use. 8-/

I suspect the underlying question here is: how likely is it that a libc
requires an offset of more than 2GB either way from the thread pointer
to allocate its rseq thread area on a 64-bit architecture ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  parent reply	other threads:[~2022-02-02 11:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 14:58 Aligning tcmalloc with glibc 2.35 rseq ABI Mathieu Desnoyers
2022-02-01 20:33 ` Chris Kennelly
     [not found]   ` <87mtja1fuz.fsf@oldenburg.str.redhat.com>
     [not found]     ` <875ypx1x0d.fsf@oldenburg.str.redhat.com>
2022-02-02 11:36       ` Mathieu Desnoyers [this message]
2022-02-02 13:08         ` Mathieu Desnoyers
2022-02-02 15:01           ` Florian Weimer
2022-02-02 17:31             ` Carlos O'Donell
2022-02-02 22:28               ` Carlos O'Donell

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=1375227765.27051.1643801804042.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=ckennelly@google.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=posk@posk.io \
    /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