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.133.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 E0F0B1F471C for ; Tue, 21 Jan 2025 16:45:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737477928; cv=none; b=nhSUew+tyhhNGwJU9OhlEQzFjm3Qo/9yTJYMjqevf2edZppykWkszjyrmOV+xiCqyRcuwKlakftP7RiYFqi4czE16wkc67uQBdpMx499Dxu0M1Tn8HiOMOAKi0rFKhUA3uMeJfhnKGm3t76HAbD4+yKoCBbC6O3x6iJvu5z/vEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737477928; c=relaxed/simple; bh=XO/Ymj0ibVxkJr0ihO0VzEhAo9m9O2dsS+oq11HBXQA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FrEMxaRG7MD0Xsya4+/fQDsGVVSR1xQNMPAqAFCp68HOYSfT05WS46dvRMLSMUkdKf5t8RBdtfau3lYA1itkxdlRuHIMMgRA3HDArv9eCg9viiKutNrm1RUzFvflL4GhMrSKKHcgWxDmvHtubSc1uI2ga501/CBYzfR/xkteCcQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=Hzf3XFA6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="Hzf3XFA6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737477925; 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=TLVsHBbZSrA/NKOjlCOjlNdrdUsp4BXx8cgZinvUkW0=; b=Hzf3XFA6S8soKdjajYdvKkQnOnC2f0RWa1L9Of+D1GOsYLs2DfLRgceiaMAGCQB7XYg8vu dGUxApvtPHxLIFwLVHjqlgqMAQ0aGq7M9mJmcupaYI3mKGF6pH/Z81H9HjL1CD1YzCCjCl PnZ2pyJpkcSNkGZmsp2o+FO3QHblekI= 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-262-sO44-CrMMTaemhFpBg_rog-1; Tue, 21 Jan 2025 11:45:17 -0500 X-MC-Unique: sO44-CrMMTaemhFpBg_rog-1 X-Mimecast-MFC-AGG-ID: sO44-CrMMTaemhFpBg_rog Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 403171956066; Tue, 21 Jan 2025 16:45:12 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.31]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 11A5019560A7; Tue, 21 Jan 2025 16:45:02 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 21 Jan 2025 17:44:46 +0100 (CET) Date: Tue, 21 Jan 2025 17:44:35 +0100 From: Oleg Nesterov To: Steven Rostedt Cc: Jiri Olsa , Eyal Birger , Kees Cook , luto@amacapital.net, wad@chromium.org, ldv@strace.io, mhiramat@kernel.org, andrii@kernel.org, alexei.starovoitov@gmail.com, cyphar@cyphar.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, peterz@infradead.org, tglx@linutronix.de, bp@alien8.de, daniel@iogearbox.net, ast@kernel.org, andrii.nakryiko@gmail.com, rafi@rbk.io, shmulik.ladkani@gmail.com, bpf@vger.kernel.org, linux-api@vger.kernel.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] seccomp: passthrough uretprobe systemcall without filtering Message-ID: <20250121164435.GA17215@redhat.com> References: <20250117005539.325887-1-eyal.birger@gmail.com> <202501181212.4C515DA02@keescook> <8B2624AC-E739-4BBE-8725-010C2344F61C@kernel.org> <20250121111631.6e830edd@gandalf.local.home> Precedence: bulk X-Mailing-List: stable@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: <20250121111631.6e830edd@gandalf.local.home> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On 01/21, Steven Rostedt wrote: > > I think this may have been mentioned, but is there a way that the kernel > could know that this system call is being monitored by seccomp, and if so, > just stick with the interrupt version? If not, enable the system call? Consider int func_to_uretprobe() { seccomp(SECCOMP_SET_MODE_STRICT/whatever); return 123; } by the time it is called, the kernel can't know that this function will call seccomp/install-the-filters/etc, so prepare_uretprobe() can't know if it is safe to use uretprobe or not. Oleg.