From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46B45D2E008 for ; Wed, 23 Oct 2024 01:53:58 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XYBsw5hqjz2xpn; Wed, 23 Oct 2024 12:53:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2404:9400:2221:ea00::3" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1729648436; cv=none; b=TxaPLwwgVLo9whXQp9xhc1WPlS+Fo/LI3gmotX1yGkMt/cn5B/GCoPIZQH7+mTofREeKyXrhwPuwIlWHj+lK+DNh5tZmUzEaO1Xwb6IvtjB24yoOmdl8/PmJFVhYWROappNYWFqyT5xhINdzv6W3OKFHUbtinwrfUR7ecz0cTJP3K2JpwvGNXd4HFHRYPgHtml0l+EUG57UPDZA6L3yVp4k0mjztObJcYDYgkEbRyWHJQd+se/021q1WEiROu1GcKR9Mx/lkjYi4IKqxJORwJ+Hw7uBTFx2A6Nbw+mkH48yceK8k6z3ZZZFYR5SE1bl7EJon9MqsLrjhwpdUYJ9WcA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1729648436; c=relaxed/relaxed; bh=Prey1zqDyFSBZaOzoYCxWeGlOrbQcMsbN15eTVtd0ew=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=a02HY7sAsL7h+BSDZ1qhbrG7qry7aihA4UCrmBgteDwVPnJ+GiBsRnG6GsxPa5i4W2I9JHmR3MIkiFdUCyvBRtZwV1NVRi2uBarZLGJPYK9dvyeSrdo3eBct70+CqcIwVRIvzRL+HYTsH57cpUUo4QL6PEIx6ftfFyZMx0uqdsAnPFJJHtNd6jj6rcH98dP1gsXG0M9T/OytQg9BYo+5JbUVHTlarDuxyE24zkKc24Lap/sCfo78k3KYX5YadW4MTNY223HdURubHCWMV/ZJOe3lWP4ZvumdouLb7V4Rw3s+YbTMnyDOFhSAF+srQ5w5cM9dL0SGF88GZ+ggaSGybw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=pXRHKFR7; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=pXRHKFR7; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XYBsv1KTGz2xm5 for ; Wed, 23 Oct 2024 12:53:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1729648429; bh=Prey1zqDyFSBZaOzoYCxWeGlOrbQcMsbN15eTVtd0ew=; h=From:To:Subject:In-Reply-To:References:Date:From; b=pXRHKFR7ntVrXNcEIMLtFDlIuYC9/RRWyeq7NWNa6x0JqBjVbSKPksqvhtzlWDrI5 6sl05Gembdrue4GMcW+S/PYRMYqWnuqa5R9VOeFddEAY6+2aU25e9TMjrTAqrVqIbq bY3rjKC+5yw00HVLBA8Pf6D4osB6TZYKsCYEyGG9rZfw+NN8s1X7kyAoFSIVogJYSn qSYYsg2o3pN4gB9q9sMmAV+Dqk4WnVfA6JYJk/vzv1biDHWVfye8FzXNL4u7X4yaid vdjCHF46WPEz89qMqOZQtPmc/GiXQ9/mH1ACbu5v77mNlh154+rViT4jtnrKSJCNNd IGl6gkj4uucFA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.ozlabs.org (Postfix) with ESMTPSA id 4XYBsn65Fxz4wb1; Wed, 23 Oct 2024 12:53:49 +1100 (AEDT) From: Michael Ellerman To: =?utf-8?B?6Jme6ZmG6ZOt?= , Christophe Leroy , linuxppc-dev , linux-kernel , npiggin , "jialong.yang" , "luming.yu" Subject: Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry In-Reply-To: References: <88E2581B1D024E9A+20241012035621.1245-3-luming.yu@shingroup.cn> Date: Wed, 23 Oct 2024 12:53:47 +1100 Message-ID: <87o73b37pw.fsf@mail.lhotse> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "=E8=99=9E=E9=99=86=E9=93=AD" writes: >>Le 12/10/2024 =C3=A0 05:56, Luming Yu a =C3=A9crit : >>> convert powerpc entry code in syscall and fault to use syscall_work >>> and irqentry_state as well as common calls implemented in generic >>> entry infrastructure. >>>=20 >>> Signed-off-by: Luming Yu >>> --- >>> arch/powerpc/Kconfig | 1 + >>> arch/powerpc/include/asm/hw_irq.h | 5 +++++ >>> arch/powerpc/include/asm/processor.h | 6 ++++++ >>> arch/powerpc/include/asm/syscall.h | 5 +++++ >>> arch/powerpc/include/asm/thread_info.h | 1 + >>> arch/powerpc/kernel/syscall.c | 5 ++++- >>> arch/powerpc/mm/fault.c | 3 +++ >>> 7 files changed, 25 insertions(+), 1 deletion(-) >>>=20 >> >>... >> >>> diff --git a/arch/powerpc/kernel/syscall.c b/arch/powerpc/kernel/syscal= l.c >>> index 77fedb190c93..e0338bd8d383 100644 >>> --- a/arch/powerpc/kernel/syscall.c >>> +++ b/arch/powerpc/kernel/syscall.c >>> @@ -3,6 +3,7 @@ >>> #include >>> #include >>> #include >>> +#include >>>=20=20=20 >>> #include >>> #include >>> @@ -131,7 +132,7 @@ notrace long system_call_exception(struct pt_regs *= regs, unsigned long r0) >>> * and the test against NR_syscalls will fail and the return >>> * value to be used is in regs->gpr[3]. >>> */ >>> - r0 =3D do_syscall_trace_enter(regs); >>> + r0 =3D syscall_enter_from_user_mode(regs, r0); >> >>Can you provide details on how this works ? > I assume the common entry would take over th details. > So I just made the switch from the high level call. > > As you said as the subtle ABI requirement about regs->r3 needs to > be restored, I'm wondering which test can capture the lost > ABI feature. As simple Boot test is insufficient, what is the test set > that can capture it? The seccomp selftest did exercise it back when I originally wrote that code. I don't know for sure that it still does, but that would be a good start. It's in tools/testing/selftests/seccomp/ cheers