From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
paulmck <paulmck@kernel.org>, Boqun Feng <boqun.feng@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>, Paul Turner <pjt@google.com>,
linux-api <linux-api@vger.kernel.org>,
Christian Brauner <christian.brauner@ubuntu.com>,
Florian Weimer <fw@deneb.enyo.de>,
David Laight <David.Laight@aculab.com>,
carlos <carlos@redhat.com>, Peter Oskolkov <posk@posk.io>,
libc-coord@lists.openwall.com
Subject: Re: [RFC PATCH 1/3] rseq: Introduce feature size and alignment ELF auxiliary vector entries
Date: Sun, 6 Feb 2022 18:53:56 -0500 (EST) [thread overview]
Message-ID: <1576236784.46087.1644191636055.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <YgBCdExhei7VmfHd@hirez.programming.kicks-ass.net>
----- On Feb 6, 2022, at 4:49 PM, Peter Zijlstra peterz@infradead.org wrote:
> On Thu, Feb 03, 2022 at 02:38:51PM -0500, Mathieu Desnoyers wrote:
>
>> @@ -286,6 +287,10 @@ create_elf_tables(struct linux_binprm *bprm, const struct
>> elfhdr *exec,
>> if (bprm->have_execfd) {
>> NEW_AUX_ENT(AT_EXECFD, bprm->execfd);
>> }
>> +#ifdef CONFIG_RSEQ
>> + NEW_AUX_ENT(AT_RSEQ_FEATURE_SIZE, offsetof(struct rseq, end));
>
> I've gotta ask, what's up with offsetof(, end) vs sizeof() ?
sizeof() includes the 12 bytes of padding at the end of struct rseq, for a
total of 32 bytes (currently). offsetof(, end) is currently 20 bytes, which
is the offset exactly after the last field.
For the "feature size" (meaning the populated fields), we really want a size
that excludes padding.
Thanks,
Mathieu
>
>> + NEW_AUX_ENT(AT_RSEQ_ALIGN, __alignof__(struct rseq));
> > +#endif
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
prev parent reply other threads:[~2022-02-07 0:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 19:38 [RFC PATCH 1/3] rseq: Introduce feature size and alignment ELF auxiliary vector entries Mathieu Desnoyers
2022-02-03 19:38 ` [RFC PATCH 2/3] rseq: Introduce extensible rseq ABI Mathieu Desnoyers
2022-02-03 19:38 ` [RFC PATCH 3/3] rseq: extend struct rseq with numa node id Mathieu Desnoyers
2022-02-06 21:52 ` Peter Zijlstra
2022-02-07 16:39 ` Mathieu Desnoyers
2022-02-06 21:49 ` [RFC PATCH 1/3] rseq: Introduce feature size and alignment ELF auxiliary vector entries Peter Zijlstra
2022-02-06 23:53 ` Mathieu Desnoyers [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576236784.46087.1644191636055.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=David.Laight@aculab.com \
--cc=boqun.feng@gmail.com \
--cc=carlos@redhat.com \
--cc=christian.brauner@ubuntu.com \
--cc=fw@deneb.enyo.de \
--cc=hpa@zytor.com \
--cc=libc-coord@lists.openwall.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=posk@posk.io \
--cc=tglx@linutronix.de \
/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