From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 A76863988EB for ; Thu, 2 Jul 2026 11:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782992400; cv=none; b=PNX7MD2qOK0WMJ8KD34sEcLri6+j8J16GPdOi8re1UL2+34w9+KdpYGmnnailiWSS2VxLyEszoAx53Q0F4vIr/6xawhuCncEzCH4DltNYEkzdiAwNDcYG/nYougE/o4d8T55W/PZWvuw1H9fYgnTUw5mPOGhaucNOKy5FxgFw1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782992400; c=relaxed/simple; bh=fxHQEF2MYyOHG93rBQ+8PQ2eGnANOxwHeageaJvPX0A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s6/XsDVT3KdbGfED4vc2qMQDdsdNPa/qRO+NzcnHaG1qkYJM7A8MVoexbZRlqbRzlTkOL7xa2ct6GaCsEhex5cAcW9NX+whr8tiYxs9hqFHhDHFvQzmLPK0riQWPOD/JXEYb9iaKMqCobiKqdkhzTU13mA94Zp4BXhUEfxpzrCo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=A5Z1tTYc; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="A5Z1tTYc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782992397; 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: in-reply-to:in-reply-to:references:references; bh=bOBUFC/JNBhmF26Slbmh2BlXnShbi4ZSuuc4Qr+m3Sw=; b=A5Z1tTYciXwPosBLRXIIw0jI/zGgHNOK8GAzLGxYbF/HSgsC4knHQHln+P6TFt2GDB7iab 35pMgA3N8l4ptP0bxkskOYZRaJRHhLLJJos7txU0OJkIMRvR03LlDVFQk2aCukijIlvIT4 y/sOdqFMYz7yCo8BDZSVlIV+4oh2Hl0= Received: from mx-prod-mc-06.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-633-1cTjEjt0NXCqIRB-RrKVqg-1; Thu, 02 Jul 2026 07:39:51 -0400 X-MC-Unique: 1cTjEjt0NXCqIRB-RrKVqg-1 X-Mimecast-MFC-AGG-ID: 1cTjEjt0NXCqIRB-RrKVqg_1782992390 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DCBB61833391; Thu, 2 Jul 2026 11:39:49 +0000 (UTC) Received: from fedora (unknown [10.44.32.200]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 3B83218007F5; Thu, 2 Jul 2026 11:39:45 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 2 Jul 2026 13:39:49 +0200 (CEST) Date: Thu, 2 Jul 2026 13:39:44 +0200 From: Oleg Nesterov To: "Dmitry V. Levin" Cc: Renzo Davoli , linux-kernel@vger.kernel.org, Andrew Morton , Shuah Khan , Alexey Gladkov , Eugene Syromyatnikov , Mike Frysinger , Davide Berardi , strace-devel@lists.strace.io Subject: Re: [PATCH 1/5] ptrace: add PTRACE_SYSCALL_INFO_SECCOMP_SKIP Message-ID: References: <20260701150558.330348-1-renzo@cs.unibo.it> <20260701150558.330348-2-renzo@cs.unibo.it> <20260702110755.GA16303@strace.io> 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=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Or we can simply allow the ENTRY/SECCOMP -> EXIT transition, I dunno. This is more safe. But somehow I don't like the new PTRACE_SYSCALL_INFO_SECCOMP_SKIP... Oleg. On 07/02, Oleg Nesterov wrote: > > On 07/02, Dmitry V. Levin wrote: > > > > On Thu, Jul 02, 2026 at 11:58:14AM +0200, Oleg Nesterov wrote: > > [...] > > > @@ -1047,6 +1069,11 @@ ptrace_set_syscall_info_entry(struct task_struct *child, struct pt_regs *regs, > > > if (nr != info->entry.nr) > > > return -ERANGE; > > > > > > + syscall_set_nr(child, regs, nr); > > > + if (nr == -1) > > > + return __set_syscall_info_exit(child, regs, > > > + info->entry.rval, info->entry.is_error); > > > > The kernel shouldn't suddenly start interpreting info->entry.rval and > > info->entry.is_error because the current users of this interface are not > > aware that the kernel might be doing it. If we want to extend > > PTRACE_SYSCALL_INFO_ENTRY/PTRACE_SYSCALL_INFO_SECCOMP this way, we would > > have to require setting a flag in info->flags signalling the kernel that > > the user requests this new behaviour. > > Ah. I forgot to mention that (obviously) this is a user-visible change, > and a new flag in info->flags will be safer. Of course. > > Or we can define a special SKIP_AND_SET_RVAL value for info->entry.nr. > > But I am just curious, will this change (without new flag) actually break > strace? What does strace do when it uses PTRACE_SYSCALL_INFO_ENTRY with > info->entry.nr == -1? > > Oleg.