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 2531D263C7F for ; Thu, 2 Jul 2026 11:31:17 +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=1782991879; cv=none; b=qdFDsgvS1oBosVvuIG1vYrrK9MPVagto5SnpOa3qDaZYcjv1rjxCJ4ViyBdIkgI5MOXuTMFrLAsjHjdQ6sRSkdqdjl1WiBUXe168a1dLFrdYKgzMcZYVo6gvDvJNte0cflQAV+3bHU3ABk7obDrBG7vqoPdgqmKmXP42+QDtHWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782991879; c=relaxed/simple; bh=QnaXGePglpASIduzc6ppAT+eR/MPUS3qNDqtfQlDeXE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TS31SIOu82M1gnJvM6OH6aVy3Xh1Jx5JOqUvZ9o6hPJf6osQHYwlADzQb0EgiYSCYv+Zgq/DESY9NUS6GWaJGBCRH4UvKHv4rWyoCaHav3v6OA8ctmUuDsNqSoNLgDR6eoRamY6Yq9SQUVgM7XnxZV7odxpID4q+pjeQ0QoJkcs= 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=SW3dCivM; 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="SW3dCivM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782991877; 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=VKuYHy3Hsr7FHJ9xCGncoUKWjDqPeWltk/Gh4UrtS4w=; b=SW3dCivMDzT3ONR9+X3uS+SzBFdbgT21JkaEa7dH9fShBjkhyCZS1ZCmvPwPmVaV44+Fk4 dM+ntzsqjGLdrSiEzcXIp5nBWJT6Sv7AOPX7YW6b23uNrWSNYROs/bihSi+oRSpjgwJ3bU xbs3C2ssJvhpsQusuXpOKILys9vrn1w= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-yXeuFtuiPtakROsWOeVRKA-1; Thu, 02 Jul 2026 07:31:15 -0400 X-MC-Unique: yXeuFtuiPtakROsWOeVRKA-1 X-Mimecast-MFC-AGG-ID: yXeuFtuiPtakROsWOeVRKA_1782991874 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 612DF1944B36; Thu, 2 Jul 2026 11:31:13 +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 8396D18007EB; Thu, 2 Jul 2026 11:31:09 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 2 Jul 2026 13:31:12 +0200 (CEST) Date: Thu, 2 Jul 2026 13:31:08 +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: <20260702110755.GA16303@strace.io> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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.