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 6E9E247AF66 for ; Thu, 2 Jul 2026 09:09:07 +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=1782983351; cv=none; b=ueO8WKaUtv693hEVGxLEzgAZCUgWgVR+N6EPFYLYm5TGc0CdtMePXJlr/zhdkIrsBRpynEtYQb+xNofJlZe7xI9aLGl2JRaIVKKFDttyCKP/VQUa0VGRU2gdHcFUY6iDa54kXalcwgN3gDEV8U5tjgdexUz8832ZVdd5spLCgZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782983351; c=relaxed/simple; bh=yBwtSxsntScGCJ90Sw7lCB7Cd9O3c4CeSvje1lGKQU8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JMGnq7SMEht3K7DOj5QpfjqzMYvEJ6+xNC1jrGSKn+AKEyLD5K00vyLKU6h3s4Znh8uFhCq405IMI0ZHr2J1DNV+v4W/QoYuaxAV7Md3n3/wfortUs4g1ln9V6Z4vGBS+PdI88PKZE+GVVSJQQqDRzdgUhHJsMJPuA4PtElmas4= 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=b9UJAHo7; 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="b9UJAHo7" Received: from cs.unibo.it (host0.studiodavoli.it [109.234.61.1]) by mail.virtlab.unibo.it (Postfix) with ESMTPSA id 0FB941C0095; Thu, 2 Jul 2026 11:09:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.unibo.it; s=virtlab; t=1782983345; bh=yBwtSxsntScGCJ90Sw7lCB7Cd9O3c4CeSvje1lGKQU8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b9UJAHo72hIuK4tGNVzJgSSjXU1MQy8+gvPLBgKM0JPsLftmGaURmYkd3OMFOqsZW f75DpjII6sEzawxklOwxLRAz2YCUwcxKZ7SrA0lm0M7XAlVac/n+4slCVSfLVoGp8a BChulrDg12N6YGXxtsiOw1ibO9YaQPSQeGW0UMb0= Date: Thu, 2 Jul 2026 11:09:03 +0200 From: Renzo Davoli To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, Andrew Morton , Shuah Khan , Alexey Gladkov , Eugene Syromyatnikov , Mike Frysinger , Davide Berardi , strace-devel@lists.strace.io, Dmitry Levin 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> 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: Hi Oleg, > Rather than add the new PTRACE_SYSCALL_INFO_SECCOMP_SKIP, can't we teach > ptrace_set_syscall_info_seccomp() to treat info->entry.nr == -1 as "skip" ? it already does > Note that ptrace_set_syscall_info_seccomp() -> ptrace_set_syscall_info_entry() > already does syscall_set_nr(). Syscall skipping is useless if there is not a way to set the return value/errno. As I explain in the cover letter + The tracer can skip the system call by setting the system call number + to -1. However, the current PTRACE_SET_SYSCALL_INFO interface does not + provide a way to specify the return value or error code that should be + reported to the tracee after skipping the call. currently retvalue/errno can be set only at PTRACE_SYSCALL_INFO_EXIT renzo