From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D921523D283 for ; Fri, 17 Jul 2026 08:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784275614; cv=none; b=Tuo+Zjao5UAjmH0jAout+Ggn9uh56u/VrAQtNsldKN+m/Ryb3PAARPF6Xuw2ffyqQ/ElNnsAB7pT06I0ZbnUZrlJFMyVhxh1szLFgNTKkU/08ZS6d+HPowN9k0mlDcLl66sHZwOExHahcs4twVUH0Z/d0rqYwZnRJxncX9hG3mk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784275614; c=relaxed/simple; bh=e/4AdL8JlLKLRyZMUuOvYzvDoDuxOs+j7qpHnOT6HbA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WOCUVAxdoVSlaJ/XGTXyI6wJ3RrnUhXXmiR+Ml6myh4JqZOpZAgFT/AKeWgnFwFI4edPHcaeiGW/IJgBcTjVEtCiuCaGntWBujC8TDKrt5Dm/Xk/HzUol4zo7gD7pRssviPedBrr3LVMY/ytIWZR2p8EkLXEsiVQNiGcf3Fikls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vMe+mOG8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3T2ZNlAw; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vMe+mOG8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3T2ZNlAw" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784275607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2IXv/auCQMOhlYTdD7CsRZfqNYTIs41d1Ye7bpHKjwA=; b=vMe+mOG83SvgEtWLYjE3csuliX4kB/W/lvZ0+s5RRQgB9zwSc23LynJ3NliSmHGv/tDPsz 8S0kR4N1U5uXGcyoJ86Fjlsj459w9XCzda63PRm2rsZ109ZvjxdjSfMBUlpTYvPZ5WDf8R GdbajTODBfOMdtbPtLQXUtUHfk40oOmDESCC4IbOsAEjabkRBx6SV/9Iz0qaMhvbEZZmOM o5f0/7/xTyVIE1VgZOdkz9+civLWb4ngIDq1ciXzsMcNPxaOcys/jkI8lcZGHpp50lbi7h hneQRHEJowPA2OMcJOCDE2/uwEzoQ4Upj3oEdHOm2+7yqITQQrqHeCPdrWbleg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784275607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2IXv/auCQMOhlYTdD7CsRZfqNYTIs41d1Ye7bpHKjwA=; b=3T2ZNlAws//NKt9Qti7hKJErNcdK1lkkVJxGOOtKgRGcCZwDGLuO5kSr5/knGpZC+oeN0k u268y9kauXrlHICg== To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , =?UTF-8?q?Andr=C3=A9=20Almeida?= , Mathieu Desnoyers , Thomas Gleixner , Peter Zijlstra , Sebastian Andrzej Siewior Cc: Nam Cao Subject: [PATCH v3 0/5] riscv: vdso: Implement __vdso_futex_robust_try_unlock() Date: Fri, 17 Jul 2026 10:06:33 +0200 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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. v3: - add missing include guard - switch to if/else for compare-and-exchange vs load-reserved/store-condi= tional v2: - address Sashiko's comments Nam Cao (5): riscv: compat_vdso: switch to standard kbuild rule riscv: compat_vdso: Allow *.c source files riscv: compat_vdso: Introduce COMPAT_MARCH variable riscv: compat_vdso: Build with zacas if available 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 | 27 ++++--- arch/riscv/kernel/compat_vdso/futex.c | 3 + arch/riscv/kernel/vdso.c | 61 ++++++++++++++++ arch/riscv/kernel/vdso/Makefile | 14 +++- arch/riscv/kernel/vdso/futex.c | 84 ++++++++++++++++++++++ arch/riscv/kernel/vdso/vdso.lds.S | 8 +++ 10 files changed, 219 insertions(+), 11 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 --=20 2.47.3