All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: "Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"André Almeida" <andrealmeid@igalia.com>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: Nam Cao <namcao@linutronix.de>
Subject: [PATCH v4 0/3] riscv: vdso: Implement __vdso_futex_robust_try_unlock()
Date: Wed, 22 Jul 2026 11:06:41 +0200	[thread overview]
Message-ID: <cover.1784710768.git.namcao@linutronix.de> (raw)

This series adds new vdso futex entries, allowing user to address the
robust futex race condition regarding clearing the
robust_list_head::list_op_pending pointer.

Thomas wrote a summary of the problem:
https://lore.kernel.org/lkml/20260602084648.462672743@kernel.org/

The core infrastructure has been implemented along with x86 support. This
series adds RISC-V support.

The first 4 patches prepare compat vdso Makefile. The final patch is the
main show.

v4:
  - fix minor whitespace issue
  - stop touching -march in Makefile, instead use .option arch

v3:
  - add missing include guard
  - switch to if/else for compare-and-exchange vs load-reserved/store-conditional

v2:
  - address Sashiko's comments


Nam Cao (3):
  riscv: compat_vdso: switch to standard kbuild rule
  riscv: compat_vdso: Allow *.c source files
  riscv: vdso: Implement __vdso_futex_robust_try_unlock()

 arch/riscv/Kconfig                         |  1 +
 arch/riscv/include/asm/cpufeature-macros.h |  2 +
 arch/riscv/include/asm/futex_robust.h      | 16 ++++
 arch/riscv/include/asm/vdso/futex.h        | 14 ++++
 arch/riscv/kernel/compat_vdso/Makefile     | 16 ++--
 arch/riscv/kernel/compat_vdso/futex.c      |  3 +
 arch/riscv/kernel/vdso.c                   | 61 +++++++++++++++
 arch/riscv/kernel/vdso/Makefile            |  7 +-
 arch/riscv/kernel/vdso/futex.c             | 87 ++++++++++++++++++++++
 arch/riscv/kernel/vdso/vdso.lds.S          |  8 ++
 10 files changed, 206 insertions(+), 9 deletions(-)
 create mode 100644 arch/riscv/include/asm/futex_robust.h
 create mode 100644 arch/riscv/include/asm/vdso/futex.h
 create mode 100644 arch/riscv/kernel/compat_vdso/futex.c
 create mode 100644 arch/riscv/kernel/vdso/futex.c

-- 
2.47.3


WARNING: multiple messages have this Message-ID (diff)
From: Nam Cao <namcao@linutronix.de>
To: "Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"André Almeida" <andrealmeid@igalia.com>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: Nam Cao <namcao@linutronix.de>
Subject: [PATCH v4 0/3] riscv: vdso: Implement __vdso_futex_robust_try_unlock()
Date: Wed, 22 Jul 2026 11:06:41 +0200	[thread overview]
Message-ID: <cover.1784710768.git.namcao@linutronix.de> (raw)

This series adds new vdso futex entries, allowing user to address the
robust futex race condition regarding clearing the
robust_list_head::list_op_pending pointer.

Thomas wrote a summary of the problem:
https://lore.kernel.org/lkml/20260602084648.462672743@kernel.org/

The core infrastructure has been implemented along with x86 support. This
series adds RISC-V support.

The first 4 patches prepare compat vdso Makefile. The final patch is the
main show.

v4:
  - fix minor whitespace issue
  - stop touching -march in Makefile, instead use .option arch

v3:
  - add missing include guard
  - switch to if/else for compare-and-exchange vs load-reserved/store-conditional

v2:
  - address Sashiko's comments


Nam Cao (3):
  riscv: compat_vdso: switch to standard kbuild rule
  riscv: compat_vdso: Allow *.c source files
  riscv: vdso: Implement __vdso_futex_robust_try_unlock()

 arch/riscv/Kconfig                         |  1 +
 arch/riscv/include/asm/cpufeature-macros.h |  2 +
 arch/riscv/include/asm/futex_robust.h      | 16 ++++
 arch/riscv/include/asm/vdso/futex.h        | 14 ++++
 arch/riscv/kernel/compat_vdso/Makefile     | 16 ++--
 arch/riscv/kernel/compat_vdso/futex.c      |  3 +
 arch/riscv/kernel/vdso.c                   | 61 +++++++++++++++
 arch/riscv/kernel/vdso/Makefile            |  7 +-
 arch/riscv/kernel/vdso/futex.c             | 87 ++++++++++++++++++++++
 arch/riscv/kernel/vdso/vdso.lds.S          |  8 ++
 10 files changed, 206 insertions(+), 9 deletions(-)
 create mode 100644 arch/riscv/include/asm/futex_robust.h
 create mode 100644 arch/riscv/include/asm/vdso/futex.h
 create mode 100644 arch/riscv/kernel/compat_vdso/futex.c
 create mode 100644 arch/riscv/kernel/vdso/futex.c

-- 
2.47.3


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2026-07-22  9:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  9:06 Nam Cao [this message]
2026-07-22  9:06 ` [PATCH v4 0/3] riscv: vdso: Implement __vdso_futex_robust_try_unlock() Nam Cao
2026-07-22  9:06 ` [PATCH v4 1/3] riscv: compat_vdso: switch to standard kbuild rule Nam Cao
2026-07-22  9:06   ` Nam Cao
2026-07-22  9:06 ` [PATCH v4 2/3] riscv: compat_vdso: Allow *.c source files Nam Cao
2026-07-22  9:06   ` Nam Cao
2026-07-22  9:06 ` [PATCH v4 3/3] riscv: vdso: Implement __vdso_futex_robust_try_unlock() Nam Cao
2026-07-22  9:06   ` Nam Cao

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=cover.1784710768.git.namcao@linutronix.de \
    --to=namcao@linutronix.de \
    --cc=alex@ghiti.fr \
    --cc=andrealmeid@igalia.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pjw@kernel.org \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.