From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEB8C431E68 for ; Thu, 2 Jul 2026 11:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.107.17.57 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782991048; cv=none; b=Su6q4YtKCoDYbWRh254NY0yUeOKJOANoFdorLQIp857RoxKODl3fHVYvjrQ1SnYDZVOGEPH6nI8xK3KD7UabWG2VEjgp8PSAXOrTmxrdTKbfXgOyWg7VEIvcBDpD7YzebLFtsJSGTO+RZsIiogmhTQUtKR3jyPLa9vXtrdjhG1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782991048; c=relaxed/simple; bh=5uTZC3UmsfX4YKeWjC0q1go4cpKEXVdN8/b3cBF4jhw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FUZOJa9DR050aHHsUsApLJ8z5BdGubxHaZXpctsDNGWK6xWoJHdIwdMnFprJgyeWYinq7/nOBRUYEpF1kLEObN88+fw9Ra0gKWB/W/psZBH42CgxyZbsyOPPw4L2fy1zAcNCQinhIwNucm7cNIC94AwSU+gzcmV5MckPZJALark= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strace.io; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=194.107.17.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strace.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id E251B72C8CC; Thu, 2 Jul 2026 14:07:55 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id D49D57CCB3A; Thu, 2 Jul 2026 14:07:55 +0300 (IDT) Date: Thu, 2 Jul 2026 14:07:55 +0300 From: "Dmitry V. Levin" To: Oleg Nesterov 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: <20260702110755.GA16303@strace.io> References: <20260701150558.330348-1-renzo@cs.unibo.it> <20260701150558.330348-2-renzo@cs.unibo.it> 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: 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. -- ldv