From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.virtlab.unibo.it (mail.virtlab.unibo.it [130.136.161.50]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57F65256C8B for ; Sat, 4 Jul 2026 14:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=130.136.161.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783175126; cv=none; b=dymP4R3YuDGqtiBdpWO/8S3nj0JVV81xBRPgqhSX/7KTnzwcYsd/J6+mu/mzJyeEH30cXngJmGmUysHbMQ63qk7mCaKZfcZNtPsovNwoORfxTy9I1KiiAwB6rcLHWsdRAp6N69arxSdBNkPLVRU5Qyso1ivuHQEM7Mq7YVxMZlU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783175126; c=relaxed/simple; bh=vkY5Id5sgYfddu2dMfb1hrpho8ScVH/tZfuSA7+R93g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hc3jmOJCv/+9hZWO+I35G7Tdg3KVBYnJEeZmZZJZUhMp3hPk0kkRPRHztbS7s1BYVfQoLFD1wz1BVFJtv31iYEiflUE7c6lTXOqqq6q1+jwn29cdbjO9S4pFixG5oDsfYHo50RLCgNsBaSk2xp0yO4oueVBqrfDt2JsxTRs8Snw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cs.unibo.it; spf=pass smtp.mailfrom=cs.unibo.it; dkim=pass (1024-bit key) header.d=cs.unibo.it header.i=@cs.unibo.it header.b=Jg1Tfs35; arc=none smtp.client-ip=130.136.161.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cs.unibo.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cs.unibo.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cs.unibo.it header.i=@cs.unibo.it header.b="Jg1Tfs35" Received: from cs.unibo.it (unknown [94.32.99.206]) by mail.virtlab.unibo.it (Postfix) with ESMTPSA id B30CF1C0095; Sat, 4 Jul 2026 16:25:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.unibo.it; s=virtlab; t=1783175122; bh=vkY5Id5sgYfddu2dMfb1hrpho8ScVH/tZfuSA7+R93g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Jg1Tfs35SijAABenMpZ2f3RNSABsMMxP65mTkjNn3G4xpjCuJxYiJta8O67CRHXHM zyWrq8WkcCDvZiLEBlbJpK60sTCXEFEbCpRnnSjI+XRdNb84zczcHw/H6fh+ybrz25 QLV48Uqs74j326l/nN+oNQokbRwoKPRLP1MQ5fWo= Date: Sat, 4 Jul 2026 16:25:20 +0200 From: Renzo Davoli To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, Andrew Morton , Shuah Khan , Alexey Gladkov , Eugene Syromyatnikov , Davide Berardi , strace-devel@lists.strace.io, "Dmitry V . Levin" Subject: Re: [PATCH 1/2] ptrace: PTRACE_SET_SYSCALL_INFO syscall skipping support Message-ID: References: <20260704083359.632410-1-renzo@cs.unibo.it> <20260704083359.632410-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: You are right, fixing in v2. renzo On Sat, Jul 04, 2026 at 01:17:48PM +0200, Oleg Nesterov wrote: > On 07/04, Renzo Davoli wrote: > > > > - /* Changing the type of the system call stop is not supported yet. */ > > - if (ptrace_get_syscall_info_op(child) != info.op) > > - return -EINVAL; > > + /* > > + * Changing the type of the system call stop is not allowed, with the > > + * following exception: > > + * PTRACE_SYSCALL_INFO_SECCOMP or PTRACE_SYSCALL_INFO_ENTRY can be changed > > + * to PTRACE_SYSCALL_INFO_EXIT to skip the system call > > + */ > > + > > + if (ptrace_get_syscall_info_op(child) != info.op) { > > + if (info.op != PTRACE_SYSCALL_INFO_EXIT) > > + return -EINVAL; > > + skip_syscall = true; > > + } > > Ah... I forgot that ptrace_get_syscall_info_op() can return _NONE. > > We should not allow _NONE -> _EXIT transition. > > Oleg.