mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>,
	Carlos O'Donell <carlos@redhat.com>,
	Florian Weimer <fweimer@redhat.com>,
	Michael Jeanson <mjeanson@efficios.com>
Subject: Re: [PATCH v2 2/2] rseq: slice ext: Ensure rseq feature size differs from original rseq size
Date: Fri, 20 Feb 2026 14:59:54 -0500	[thread overview]
Message-ID: <7b55798b-1fdb-4734-9635-14f8920c94ea@efficios.com> (raw)
In-Reply-To: <20260218201413.1187745-3-mathieu.desnoyers@efficios.com>

On 2026-02-18 15:14, Mathieu Desnoyers wrote:
[...]
> diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h
> index 863c4a00a66b..d5b3c489901e 100644
> --- a/include/uapi/linux/rseq.h
> +++ b/include/uapi/linux/rseq.h
> @@ -87,8 +87,10 @@ struct rseq_slice_ctrl {
>   };
>   
>   /*
> - * struct rseq is aligned on 4 * 8 bytes to ensure it is always
> - * contained within a single cache-line.
> + * The alignment of struct rseq used by the kernel needs to be 32 bytes
> + * so the kernel can interact with legacy userspace which allocate
> + * struct rseq with its original alignment.
> + * Userspace aligns struct rseq allocation on 32 bytes or more.

I plan to send a v3 of this series to clarify this uapi comment with:

/*
  * The original size and alignment of the allocation for struct rseq is
  * 32 bytes.
  *
  * The allocation size needs to be greater or equal to
  * max(getauxval(AT_RSEQ_FEATURE_SIZE), 32), and the allocation needs to
  * be aligned on max(getauxval(AT_RSEQ_ALIGN), 32).
  *
  * As an alternative, userspace is allowed to use both the original size
  * and alignment of 32 bytes for backward compatibility.
  *
  * A single active struct rseq registration per thread is allowed.
  */

Thanks,

Mathieu


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

      reply	other threads:[~2026-02-20 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 20:14 [PATCH v2 0/2] Last minute rseq fixes for 7.0 Mathieu Desnoyers
2026-02-18 20:14 ` [PATCH v2 1/2] rseq: Clarify rseq registration rseq_size bound check comment Mathieu Desnoyers
2026-02-18 20:14 ` [PATCH v2 2/2] rseq: slice ext: Ensure rseq feature size differs from original rseq size Mathieu Desnoyers
2026-02-20 19:59   ` 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=7b55798b-1fdb-4734-9635-14f8920c94ea@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mjeanson@efficios.com \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.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

all inboxes | Powered by JetHome®