mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	 Will Deacon <will@kernel.org>, Thomas Gleixner <tglx@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	 Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Carlos O'Donell <carlos@redhat.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Florian Weimer <fweimer@redhat.com>,
	 Rich Felker <dalias@aerifal.cx>,
	Torvald Riegel <triegel@redhat.com>,
	 Darren Hart <dvhart@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	 Davidlohr Bueso <dave@stgolabs.net>,
	Arnd Bergmann <arnd@arndb.de>,
	 "Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Uros Bizjak <ubizjak@gmail.com>,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	 kernel-dev@igalia.com
Subject: Re: [PATCH v3 5/5] arm64: vdso32: Implement __vdso_futex_robust_try_unlock()
Date: Tue, 2 Jun 2026 10:30:28 +0200	[thread overview]
Message-ID: <67474c48-a49f-417c-b440-97db0baee602@t-8ch.de> (raw)
In-Reply-To: <20260529-tonyk-robust_arm-v3-5-a6f02684d4fe@igalia.com>

On 2026-05-29 13:33:57-0300, André Almeida wrote:
> Based on aarch64 implementation, provide a 32 bit entry point for this vDSO.
> 
> In order to keep compatibility with arm64_futex_robust_unlock_get_pop(),
> make sure to store the pop address at r2.
> 
> Signed-off-by: André Almeida <andrealmeid@igalia.com>
> ---
>  arch/arm64/kernel/vdso.c            |  9 +++++++++
>  arch/arm64/kernel/vdso32/Makefile   |  2 +-
>  arch/arm64/kernel/vdso32/vdso.lds.S |  5 +++++
>  arch/arm64/kernel/vdso32/vfutex.c   | 33 +++++++++++++++++++++++++++++++++
>  4 files changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
> index 76f22ea8e181..3ce9d9d79431 100644
> --- a/arch/arm64/kernel/vdso.c
> +++ b/arch/arm64/kernel/vdso.c
> @@ -71,6 +71,15 @@ static void vdso_futex_robust_unlock_update_ips(enum vdso_abi abi, struct mm_str
>  
>  		futex_set_vdso_cs_range(fd, 0, success, end, false);
>  	}
> +
> +#ifdef CONFIG_COMPAT_VDSO
> +	if (abi == VDSO_ABI_AA32) {
> +		success = (uintptr_t) VDSO_SYMBOL(vdso, futex_list32_try_unlock_cs_success);
> +		end = (uintptr_t) VDSO_SYMBOL(vdso, futex_list32_try_unlock_cs_end);
> +
> +		futex_set_vdso_cs_range(fd, 1, success, end, true);

Should also be idx = 0, I think.

> +	}
> +#endif
>  }
>  #else
>  static inline void vdso_futex_robust_unlock_update_ips(enum vdso_abi abi, struct mm_struct *mm) { }
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 2775843e53cd..cc4248539bec 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -97,7 +97,7 @@ VDSO_LDFLAGS += --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL)
>  munge := ../../../arm/vdso/vdsomunge
>  hostprogs := $(munge)
>  
> -c-obj-vdso := note.o
> +c-obj-vdso := note.o vfutex.o

#ifdef CONFIG_FUTEX_ROBUST_UNLOCK

>  c-obj-vdso-gettimeofday := vgettimeofday.o
>  
>  ifneq ($(c-gettimeofday-y),)
> diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S
> index c374fb0146f3..31e0a3770c32 100644
> --- a/arch/arm64/kernel/vdso32/vdso.lds.S
> +++ b/arch/arm64/kernel/vdso32/vdso.lds.S
> @@ -87,6 +87,11 @@ VERSION
>  		__vdso_clock_getres;
>  		__vdso_clock_gettime64;
>  		__vdso_clock_getres_time64;
> +		__vdso_futex_robust_list32_try_unlock;

#ifdef CONFIG_FUTEX_ROBUST_UNLOCK

>  	local: *;
>  	};
>  }
> +
> +VDSO_futex_list32_try_unlock_cs_success = __futex_list32_try_unlock_cs_success;
> +VDSO_futex_list32_try_unlock_cs_start = __futex_list32_try_unlock_cs_start;
> +VDSO_futex_list32_try_unlock_cs_end = __futex_list32_try_unlock_cs_end;

When support for 32-bit robust lists will be added to the 64-bit vDSO
then both vDSOs will have these symbols and they will conflict.
Maybe add VDSO32_SYMBOL() which uses a different namespace than the
regular VDSO_SYMBOL(). And teach gen_vdso_offsets.sh to use that
namespace.

(...)


Thomas

      parent reply	other threads:[~2026-06-02  8:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 16:33 [PATCH v3 0/5] arm64: vdso: " André Almeida
2026-05-29 16:33 ` [PATCH v3 1/5] arm64: vdso: Prepare for robust futex unlock support André Almeida
2026-05-29 17:16   ` Thomas Weißschuh
2026-06-01 16:17     ` André Almeida
2026-05-29 16:33 ` [PATCH v3 2/5] arm64: vdso: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-05-29 17:18   ` Thomas Weißschuh
2026-05-29 17:47   ` Mathieu Desnoyers
2026-06-01 16:22     ` André Almeida
2026-05-29 16:33 ` [PATCH v3 3/5] selftests: futex: Add support for aarch64 in robust_list_critical André Almeida
2026-05-29 16:33 ` [PATCH v3 4/5] arm64: vdso32: Bring vdso32-offsets.h back André Almeida
2026-05-29 16:33 ` [PATCH v3 5/5] arm64: vdso32: Implement __vdso_futex_robust_try_unlock() André Almeida
2026-05-29 19:15   ` Mathieu Desnoyers
2026-06-02  8:30   ` Thomas Weißschuh [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=67474c48-a49f-417c-b440-97db0baee602@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=Liam.Howlett@oracle.com \
    --cc=andrealmeid@igalia.com \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=carlos@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=dalias@aerifal.cx \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=fweimer@redhat.com \
    --cc=kernel-dev@igalia.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    --cc=triegel@redhat.com \
    --cc=ubizjak@gmail.com \
    --cc=will@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®