From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 396AE34FF79 for ; Wed, 22 Jul 2026 18:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784744353; cv=none; b=HIpcQmr5wkNwWLOSgkTF8sgzlr6hteOVCl7V9IlLdPiDAq7sWgfCH6VADYl8r9Pq+XEhq6pmJx2Ctnv29tUiWQhtgjEQscQzseJ5yRQZ3/LJUT1OR2n39Pxdym5Oac/duojZHu3njyCRA5UxX/3XVMLV2CaA0h6+yTDQ63I+290= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784744353; c=relaxed/simple; bh=gexUY3MO1NYMIt5+4b+Z9AIUlrWUUcj9/Dzpwo5+F+A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OEQEgleYC27xbOAII/oHcmB/FPPfkufWPeydct/tf8R/9mmoZj5SL6ATXrKfXEnzN8kiA+7PxLWTwsofDt3Scy/WWhtZ3hPMKjsYu21mzoPms0y2GI8/C4UDUwnqa0rDXpbVC8UAxe1mAg9u9ykHKsvjh/elkIGBCsMDMIHZnDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=bolhfH6n; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="bolhfH6n" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5FDE21595; Wed, 22 Jul 2026 11:19:05 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B5263F59E; Wed, 22 Jul 2026 11:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1784744349; bh=gexUY3MO1NYMIt5+4b+Z9AIUlrWUUcj9/Dzpwo5+F+A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bolhfH6nwRwlZ9Rt3oQdeQtyGNQNwRenYiTJbVSlKyM4HgMURSH7uIWdk9u24659s 2k1ZgV/+heCaAiqMwoGsFmvLA+hXuMW6ELfIoI9wb6jJ4oFjYfiYROeaVy0CbVald8 470GVt3Ty9QsOpWvz+uIJHVKDIrr1Y+DFPdxaTBY= Date: Wed, 22 Jul 2026 19:18:59 +0100 From: Mark Rutland To: Linus Walleij , Jinjie Ruan Cc: catalin.marinas@arm.com, will@kernel.org, kees@kernel.org, oleg@redhat.com, luto@amacapital.net, wad@chromium.org, thuth@redhat.com, peterz@infradead.org, ada.coupriediaz@arm.com, kevin.brodsky@arm.com, yeoreum.yun@arm.com, anshuman.khandual@arm.com, james.morse@arm.com, tglx@kernel.org, broonie@kernel.org, pengcan@kylinos.cn, ryan.roberts@arm.com, liqiang01@kylinos.cn, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v17 15/15] arm64: vdso: Expose sigreturn address on vdso to the kernel Message-ID: References: <20260721081858.1169276-1-ruanjinjie@huawei.com> <20260721081858.1169276-16-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jul 21, 2026 at 10:55:03AM +0200, Linus Walleij wrote: > On Tue, Jul 21, 2026 at 10:19 AM Jinjie Ruan wrote: > > > Syscall User Dispatch (SUD) must not intercept the signal trampoline > > code, otherwise returning from a signal with a locked selector may > > cause infinite recursion into the signal handler. > > > > Provide an arm64 implementation of arch_syscall_is_vdso_sigreturn() > > to exclude these sigreturn syscalls from dispatch. > > > > For native 64-bit tasks, check whether the current PC matches the 'svc #0' > > instruction inside the vDSO sigreturn trampoline (defined in > > arch/arm64/kernel/vdso/sigreturn.S as below). > > > > SYM_CODE_START(__kernel_rt_sigreturn) > > mov x8, #__NR_rt_sigreturn > > svc #0 > > SYM_CODE_END(__kernel_rt_sigreturn) > > > > For COMPAT tasks, verify that the instruction falls within the dedicated > > 'sigpage' range, since compat signal handlers use this architecture- > > specific page (not the vDSO) for their return trampoline. This prevents > > SUD from incorrectly dispatching syscalls issued during signal return. > > > > Suggested-by: Thomas Weißschuh > > Suggested-by: Kevin Brodsky > > Suggested-by: kemal > > Signed-off-by: Jinjie Ruan > > I'm a bit scared about SUD. > > Certainly we can merge patches 1-14 first and iron out > any trouble related to that and split this off so a separate > series to be applied lated? I had already asked Jinie to drop SUD back in v14, and he had agreed: https://lore.kernel.org/lkml/akegeU59jSK9t7FX@J2N7QTR9R3/ https://lore.kernel.org/lkml/3ac6d4be-7c57-44c2-80a0-408e2c6f8136@huawei.com/ Jinjie, please drop this for now, as we had _already_ agreed. I will look over the rest of the series soon. Mark.