From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 E7FA31A0712 for ; Thu, 28 May 2026 01:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779930893; cv=none; b=t2M1GXZHBtIxqrkcdiEUXoIeVl4KuBRGAqku2CbPXZw7/IZpGvNPlno/T+VmUYW/jWPflk9sP6V1ZC3P8WGiA3Yl/SdkXUK+m0V2Q20qmCgd8ZYaIoH/b33SWSH0UL5GNTXszpAeVsK4LWEYvgtO+802WL3zeql6DnZclEf+cC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779930893; c=relaxed/simple; bh=qEDuxKpYu/Jwv5SpN+9rNq3miM2xUd9AHiCfXVzlwGY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ijZnPTY1MoC5T2KYpCHfUyv6dVbQpAAF5pVxQN0mELA+HyXYhiyeZ/Z7c7mb5jOkdigvnJTFLs1HXMXx9bNjd9gUeh0z26hOHSE0u32n5O1dmpyyzp9XKnd5nkmhVffa1/GEgm6ejq7JqR1EjYCsbfZbm80LiLbIRJ1H0VD5Dvk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=YQGf4Pei; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="YQGf4Pei" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uUz48efGZoxP5TaBgF8P8tqlrDZBbm9UzNNGvfQMA8A=; b=YQGf4PeiwBsQJrU2ko3qFSR8hc gIC9O0StHF2sL6k+iMoqZiPgNOz6mIvbBKy4SfbZPuHapdcpj01P0loq3HOC1p0ZNUs3jjBcbjEgP /VeC3DjeBrWsqc4jTOo8AlytDmydNH484q58qLtGuRJHKynjDrmRXwsNaMys8o1pzrO+Ip3sdvD7M umf+mFGefOkr1p4oVnT5BwGA+FaHDu2j+DDpSL1KPnkQScuSR2B1ycsDz8OyiT/PbuY9QRIOA4hMO sReuhL00/PbV0QsTHyoqyV0eRfaDnCT/9/uIvZdzUnb8F7pbUytX7kBH9Lhu+meDj/nOgYf5aDbIQ SEKPYlKg==; Received: from [179.118.191.12] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1wSPKX-0099Rd-Nw; Thu, 28 May 2026 03:14:38 +0200 Message-ID: <5425af56-e319-4577-b61e-fa1dc848586e@igalia.com> Date: Wed, 27 May 2026 22:14:30 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch V4 11/14] x86/vdso: Prepare for robust futex unlock support To: Thomas Gleixner Cc: Mathieu Desnoyers , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , LKML , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" , Uros Bizjak , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= References: <20260402151131.876492985@kernel.org> <20260402151940.349951884@kernel.org> Content-Language: en-US From: =?UTF-8?Q?Andr=C3=A9_Almeida?= In-Reply-To: <20260402151940.349951884@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Em 02/04/2026 12:21, Thomas Gleixner escreveu: > There will be a VDSO function to unlock non-contended robust futexes in > user space. The unlock sequence is racy vs. clearing the list_pending_op > pointer in the task's robust list head. To plug this race the kernel needs > to know the critical section window so it can clear the pointer when the > task is interrupted within that race window. The window is determined by > labels in the inline assembly. > > Add these symbols to the vdso2c generator and use them in the VDSO VMA code > to update the critical section addresses in mm_struct::futex on (re)map(). > > The symbols are not exported to user space, but available in the debug > version of the vDSO. > > Signed-off-by: Thomas Gleixner A left a minor nit bellow, but Reviewed-by: André Almeida > --- > V3: Rename the symbols once more > V2: Rename the symbols > --- [...] > @@ -80,6 +106,7 @@ static int vdso_mremap(const struct vm_s > > vdso_fix_landing(image, new_vma); > current->mm->context.vdso = (void __user *)new_vma->vm_start; > + vdso_futex_robust_unlock_update_ips(); > > return 0; > } > @@ -189,6 +216,8 @@ static int map_vdso(const struct vdso_im > current->mm->context.vdso = (void __user *)text_start; > current->mm->context.vdso_image = image; > No need for this empty space. > + vdso_futex_robust_unlock_update_ips(); > + > up_fail: > mmap_write_unlock(mm); > return ret;