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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BE5BEC43458 for ; Fri, 10 Jul 2026 11:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a6+T95IkMzcHe6opJKwBhvdfil1bdp0R8F91fjg0AV8=; b=L19sLHhdDFxIqb IT9W+/2yLNx/9F4v8jykcVTa1d48lDNtuGazVGiagKqQQzA4I3QCKYnm5yQ4YMqzo9Tdy1+FKy1WY gOh5NsVkQmlLhWgI1iL2uBzrkF1YA6zxV/1CMiVnPbRe5EyCowcwY3n5fZxE5PD/+XCY863ROtNrd 1KZBqaM2/l+wPudSl4qTn7VRWLNOPlAqsLmc6AHoJQ3do4rk4ErT2CBJu17Ku/zUAT/JrhzjW0k+m BOcgssGXJCIGH0j52H+VQ7hMIzWooA+ac3TZIUduh0kycwdTYYdXFKeVnPzqx+ucgBBEmX3oio83F MSO+p1uoHiuaHZ6O77KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wi9E1-00000004oNw-4AZ6; Fri, 10 Jul 2026 11:16:57 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wi9Dz-00000004oK0-2AHh for linux-riscv@lists.infradead.org; Fri, 10 Jul 2026 11:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783682213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hft+KFsru/NQK2GFVwrW+rNgrjQeb+hZeEo2ASl1/i4=; b=ZiKBCJyyRh1QDSgXHAhHhxlW1FNyf7Ep7K9ys5KUmHOPgG4nJ87zqzlpADMjXDNjYS9lx2 orhTPa4/SQbV7dEs6FmOg8U6c42e5tcKkYQ+XDFPlb6lsfWszp5ilJW4KM+e7rId49cuQp tjoyAd1gF3CQDHYI23ELdMi7PmAAP/w= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-640-1rPiqdCGMI-DqX1kFaFhcQ-1; Fri, 10 Jul 2026 07:16:50 -0400 X-MC-Unique: 1rPiqdCGMI-DqX1kFaFhcQ-1 X-Mimecast-MFC-AGG-ID: 1rPiqdCGMI-DqX1kFaFhcQ_1783682205 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D3A3E1800BDF; Fri, 10 Jul 2026 11:16:41 +0000 (UTC) Received: from fedora (unknown [10.44.49.164]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 4B2CE195419E; Fri, 10 Jul 2026 11:16:21 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 10 Jul 2026 13:16:41 +0200 (CEST) Date: Fri, 10 Jul 2026 13:16:20 +0200 From: Oleg Nesterov To: Michal =?iso-8859-1?Q?Such=E1nek?= Cc: Thomas Gleixner , LKML , Peter Zijlstra , Arnd Bergmann , Richard Henderson , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Guo Ren , Brian Cain , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Helge Deller , Yoshinori Sato , "David S. Miller" , Andreas Larsson , Chris Zankel , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-arch@vger.kernel.org, Michael Ellerman , Shrikanth Hegde , linuxppc-dev@lists.ozlabs.org, Kees Cook , Huacai Chen , loongarch@lists.linux.dev, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Sven Schnelle , linux-s390@vger.kernel.org, x86@kernel.org, Mark Rutland , Jinjie Ruan , Andy Lutomirski , Richard Weinberger , Jonathan Corbet , linux-doc@vger.kernel.org Subject: Re: [patch 12/18] ptrace, treewide: Rename ptrace_report_syscall_entry() to ptrace_report_syscall_permit_entry() Message-ID: References: <20260707181957.433213175@kernel.org> <20260707190254.280015701@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-MFC-PROC-ID: F7NJUt5IWjKfsmwQMXFtvR6AejpNoLh3YZjVGKmLKnk_1783682205 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260710_041655_637372_E32C0574 X-CRM114-Status: GOOD ( 14.36 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 07/10, Michal Such=E1nek wrote: > > > --- a/arch/alpha/kernel/ptrace.c > > +++ b/arch/alpha/kernel/ptrace.c > > @@ -375,7 +375,7 @@ asmlinkage unsigned long syscall_trace_e > > struct pt_regs *regs =3D current_pt_regs(); > > > > if (test_thread_flag(TIF_SYSCALL_TRACE) && > > - ptrace_report_syscall_entry(regs)) { > > + !ptrace_report_syscall_permit_entry(regs)) { > > syscall_set_nr(current, regs, -1); > > Why is this done here? > > Presumably the ptrace_report_syscall_entry returns false here becasue > the tracer put -1 into whatever register specifies the syscall number > (or it was there to start with) which was then read back, compared to > -1, leading to returning false. Now it's set to -1 again? I don't know why arch/alpha/ does syscall_set_nr(-1). But note that ptrace_report_syscall_entry() doesn't even check whether the syscall number was changed. It only checks fatal_signal_pending(). Oleg. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv